\qquad 下面是HD-GR GNSS导航软件的GPS L1信号捕获和跟踪相关定义:
// gps_accum_task.h -- Header file for the gps_accum_task.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 : tracking.h
* Modes : modified for Namuru HW by Peter Mumford (December 2006)
* accum_status_a, accum_status_b removed
* status, new_data declared for Namuru HW
* version : V1.0
* date : 21st/Dec/2006
*/
/*
* HD-GR GNSS receiver project
* Modes : Inherited the definitions of tracking.h in the Namuru GPS receiver
* project V1.0 and made necessary adjustments to adapt to the new HW,
* RTOS.
* version : V1.0
* date : xx/xx/2015
*/
#ifndef __GPS_ACCUM_TASK_H__
#define __GPS_ACCUM_TASK_H__
#include "main_accum_task.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define GPS_CODE_LOOP_20MS_RATE
#define GPS_FALSE_PHASE_LOCK_DETECTOR
#define GPS_USING_NAMURU_DLL
/*******************************************************************************
* Structures
******************************************************************************/
typedef struct {
TRACKING_ENUM state;
unsigned short prn;
signed long i_p_1, q_p_1;
signed long i_e, q_e; // early arms
signed long i_p, q_p; // Prompt arms
signed long i_l, q_l; // late arms
long carrier_corr;
long carrier_freq; // in DCO hex units
long code_freq; // in DCO hex units
signed short n_freq; // Carrier frequency search bin
unsigned short codes; // Current code phase (in 1/2 chips, 0 - 2044)
signed long e_mag; // sqrt(i_e^2 +q_e^2)
signed long p_mag; // sqrt(i_p^2 +q_p^2)
signed long l_mag; // sqrt(i_l^2 +q_l^2)
long n_confirm; //
long m_thresh; //
unsigned short ch_time;
long th_rms;
long dcode_freq_1; //
long dcarr_phase_1; //
long dcarr_phase_2;
unsigned short epoch_codes;
unsigned long ms_sign;
unsigned short ms_count;
// pull_in
signed long ef_out; //
signed long ef_max; //
signed long ef_min; //
signed long i_p_20;
signed long q_p_20;
signed long i_e_20;
signed long q_e_20;
signed long i_l_20;
signed long q_l_20;
#ifdef GPS_CODE_LOOP_20MS_RATE
#endif // GPS_CODE_LOOP_20MS_RATE
#ifdef GPS_FALSE_PHASE_LOCK_DETECTOR
signed long i_p_20_1;
signed long q_p_20_1;
// False Phase Lock Detector (FPLD)
signed long c_fpld;
signed long d_fpld;
signed long cnt_fpld;
signed long tot_fpld;
#endif // GPS_FALSE_PHASE_LOCK_DETECTOR
unsigned short bit_sync;
// unsigned short bit;
unsigned short load_1ms_epoch_count; // Flags to coordinate loading
unsigned short sync_20ms_epoch_count; // the epoch counters.
unsigned short backto_pull_in; // back to pull_in.
unsigned long time_in_bits; // Time of week, in bits
signed short tang;
} gps_chan_t;
/*******************************************************************************
* Prototypes (Globally visible functions)
******************************************************************************/
void gps_initialize_tracking( void) __attribute__ ((section(".isrcode.txt")));
inline void gps_set_code_dco_rate( unsigned short ch, unsigned long freq) __attribute__ ((section(".isrcode.txt")));
inline void gps_set_carrier_dco_rate( unsigned short ch, unsigned long freq) __attribute__ ((section(".isrcode.txt")));
void gps_accum_newdata(unsigned long new_data) __attribute__ ((section(".isrcode.txt")));
void gps_track_channels(unsigned long new_data) __attribute__ ((section(".isrcode.txt")));
/*******************************************************************************
* Externs
******************************************************************************/
extern gps_chan_t m_GPS_CH[GPS_MAX_CHANNELS] __attribute__ ((section(".isrdata.rwdata")));
extern short m_GpsCarrSrchStep __attribute__ ((section(".isrdata.rwdata")));
#endif // __GPS_ACCUM_TASK_H__