\qquad 下面是HD-GR GNSS导航软件的BDS B1I信号捕获和跟踪相关定义:
// b1i_accum_task.h -- Header file for the b1i_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 and functions.
* version : V1.0
* date : xx/xx/2015
*/
#ifndef __B1I_ACCUM_TASK_H__
#define __B1I_ACCUM_TASK_H__
#include "main_accum_task.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define B1I_CODE_LOOP_20MS_RATE
#define B1I_FALSE_PHASE_LOCK_DETECTOR
//#define B1I_SYNC_PROCESS_FRAME_SYNC
// B1I频点上的D1导航电文
#define IS_D1_NAVMESSAGE(P) (P>5)
// B1I频点D1信号上的二次编码矩阵: {0,0,0,0,0,1,0,0,1,1,0,1,0,1,0,0,1,1,1,0}
#define D1_SECONDARY_CODE 0x4d4e
/*******************************************************************************
* 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;
unsigned short ms_maxval;
unsigned short ms_count_20;
// 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 B1I_CODE_LOOP_20MS_RATE
#endif // B1I_CODE_LOOP_20MS_RATE
#ifdef B1I_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 // B1I_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;
} b1i_chan_t;
/*******************************************************************************
* Prototypes (Globally visible functions)
******************************************************************************/
void b1i_initialize_tracking( void) __attribute__ ((section(".isrcode.txt")));
inline void b1i_set_code_dco_rate( unsigned short ch, unsigned long freq) __attribute__ ((section(".isrcode.txt")));
inline void b1i_set_carrier_dco_rate( unsigned short ch, unsigned long freq) __attribute__ ((section(".isrcode.txt")));
void b1i_accum_newdata(unsigned long new_data) __attribute__ ((section(".isrcode.txt")));
void b1i_track_channels(unsigned long new_data) __attribute__ ((section(".isrcode.txt")));
/*******************************************************************************
* Externs
******************************************************************************/
extern b1i_chan_t m_B1I_CH[B1I_MAX_CHANNELS] __attribute__ ((section(".isrdata.rwdata")));
extern short m_B1iCarrSrchStep __attribute__ ((section(".isrdata.rwdata")));
#endif // __B1I_ACCUM_TASK_H__