\qquad 下面是HD-GR GNSS导航软件的GPS L1电文处理相关定义:
// gps_message.h -- Header file for the gps_message.c file
/*
* Copyright (C) 2005 Andrew Greenberg
* Distributed under the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 (June 1991).
* See the "COPYING" file distributed with this software for more information.
*/
/* Namuru GPS receiver project
* Original : message.h
* Modes : None
* version : V1.0
* date : 21st/Dec/2006
*/
/*
* HD-GR GNSS receiver project
* Modes : Inherited the definitions of message.h in the Namuru GPS receiver
* project V1.0 and made necessary adjustments to adapt to the new
* RTOS and functions.
* version : V1.0
* date : xx/xx/2015
*/
#ifndef __GPS_MESSAGE_H__
#define __GPS_MESSAGE_H__
#include "main_message.h"
/*******************************************************************************
* Definitions
******************************************************************************/
// Macro definition : rotate left the y-bit of 32-bit X
#define Rotation_left(x,y) (((x)<<(y))|((x)>>(32-(y))))
/*******************************************************************************
* Declarations
******************************************************************************/
typedef struct{
unsigned long word[10];
unsigned long TOW; // "Truncated time Of Week" That is, time since beginning of the week in 6 second (subframe) increments
unsigned long valid; // 10 bits of word validity flags; all good = 0x3ff
} gps_subframe_t;
typedef struct {
unsigned short prn; // satellite prn
unsigned short t_count; // in tracking.[ch] this is a long also not used in message.c
unsigned short frame_sync;
unsigned short set_epoch_flag; // only set the epoch counter once per sync on a channel
unsigned short data_inverted;
unsigned short bitcount; // # of bits in the current word
unsigned short wordcount; // # of words in the subframe so far
unsigned long wordbuf0; // Current word (2+30 format)
unsigned long wordbuf1; // previous word (2+30 format)
unsigned short subframe; // Current subframe #
gps_subframe_t subframes[5]; // Array of 5 subframes (1 frame)
} gps_message_t;
/*******************************************************************************
* Prototypes (Globally visible functions)
******************************************************************************/
void gps_clear_messages(unsigned short ch) __attribute__ ((section(".isrcode.txt")));
void gps_process_message(OS_FLAGS channels_with_bits, OS_FLAGS channel_bits) __attribute__ ((section(".isrcode.txt")));
/*******************************************************************************
* Externs
******************************************************************************/
extern gps_message_t m_gps_messages[GPS_MAX_CHANNELS] __attribute__ ((section(".isrdata.rwdata")));
#endif // __GPS_MESSAGE_H__