15、GPS L1信号捕获和跟踪相关定义

\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__

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值