当前位置:网站首页>9、相关数据累积任务定义
9、相关数据累积任务定义
2022-07-28 14:26:00 【Turing_321】
\qquad 下面是HD-GR GNSS导航软件的相关数据累积任务相关定义:
// main_accum_task.h -- Header file for the main_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 and namuru_corraddr.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 __MAIN_ACCUM_TASK_H__
#define __MAIN_ACCUM_TASK_H__
#include "constants.h"
/******************************************************************************* * Definitions ******************************************************************************/
typedef enum {
CHANNEL_OFF = 0,
CHANNEL_ON = 1,
CHANNEL_ACQUISITION = 1,
CHANNEL_CONFIRM = 2,
CHANNEL_FREQ_PULL = 3,
CHANNEL_PULL_IN = 4,
CHANNEL_LOCK = 5
} TRACKING_ENUM;
#define BASE_CORRELATOR 0x000
#define GPS_CH00_BASE 0x000
#define B1I_CH00_BASE 0x100
/* Difference (offset) between base addresses for the control and accumulator registers between consequtive channels. */
#define CH_BASE_STEP (0x10)
// channel block offsets
// write only registers
#define PRN_KEY 0x00
#define CARRIER_NCO 0x01
#define CODE_NCO 0x02
#define CODE_SLEW 0x03
// read only registers
#define I_EARLY 0x04
#define Q_EARLY 0x05
#define I_PROMPT 0x06
#define Q_PROMPT 0x07
#define I_LATE 0x08
#define Q_LATE 0x09
#define CARRIER_MEASUREMENT 0x0A
#define CODE_MEASUREMENT 0x0B
#define EPOCH 0x0C
#define EPOCH_CHECK 0x0D
// write only registers
#define EPOCH_LOAD 0x0E
// status block (read only registers)
#define STATUS 0xE0
#define NEW_DATA 0xE1
#define TIC_COUNT 0xE2
// control block (write only registers)
#define RESET 0xF0
#define PROG_TIC_DIV 0xF1
#define PROG_ACCUM_INT 0xF2
#define PROG_PPS_DIV 0xF3
/* * format 0: data[31] = 0 * tic_delay_value = data[24:0]; * tic_delay_sign = data[25] * tic_delay_life = data[26] * 0:delay one tic_period * 1:delay forever until reset or next call * tic_delay_range = data[27] * 0:action on TIC * 1:action on TIC and ACCUM_INT * * format 1: data[31] = 1 * tic_delay_value = data[17:0]; * tic_delay_sign = data[18] * tic_slew_value = data[25:19]; * tic_slew_mod = data[29:26]; * tic_slew_sign = data[30] */
#define PROG_TIC_DELAY 0xF4
#define PROG_TIC_LOAD 0xF5
#define NO_LOCK 0x00
#define CODE_LOCK 0x01
#define CARR_LOCK 0x02
#define PHASE_LOCK 0x04
#define BIT_SYNC 0x08
#define FRAME_SYNC 0x10
// define the IO read/write functions
#define write_to_correlator(A,D) IOWR(GNSS_BDMOD_BASE,A,D)
#define read_from_correlator(A) IORD(GNSS_BDMOD_BASE,A)
// Later on, we scale 1 radian = 2^^14
#define PI_SHIFT14 (long)(0.5 + PI * (1 << 14)) // 51472
#define PI_OVER2_SHIFT14 (long)(0.5 + PI * (1 << 13)) // 25736
//#define ENABLE_32BIT_ACCUMULATOR
/******************************************************************************* * Prototypes (Globally visible functions) ******************************************************************************/
inline long sgn( long data) __attribute__ ((section(".isrcode.txt")));
inline long lmag( long a, long b) __attribute__ ((section(".isrcode.txt")));
inline long fix_atan2( long y, long x) __attribute__ ((section(".isrcode.txt")));
inline long fix_atan(long y, long x) __attribute__ ((section(".isrcode.txt")));
// called from measure.c
inline void set_tic_delay( int delay, unsigned short delay_life, unsigned short delay_range) __attribute__ ((section(".isrcode.txt")));
inline void set_tic_slew( int delay, int slew, int mod) __attribute__ ((section(".isrcode.txt")));
inline void load_tic_count( unsigned long count) __attribute__ ((section(".isrcode.txt")));
// Called from agrs_gp_1_ucos.c
void initialize_tracking( void) __attribute__ ((section(".isrcode.txt")));
void accum_task(void* pdata) __attribute__ ((section(".isrcode.txt")));
/******************************************************************************* * Externs ******************************************************************************/
extern OS_EVENT *m_SemISR __attribute__ ((section(".isrdata.rwdata")));
extern unsigned short m_status __attribute__ ((section(".isrdata.rwdata")));
extern OS_FLAGS g_channels_to_allocate __attribute__ ((section(".isrdata.rwdata")));
extern OS_FLAGS g_channels_with_bits __attribute__ ((section(".isrdata.rwdata")));
extern OS_FLAGS g_channel_bits __attribute__ ((section(".isrdata.rwdata")));
#endif // __MAIN_ACCUM_TASK_H__
边栏推荐
- Grpc frequently asked questions
- 汇编学习
- MIT指出公开预训练模型不能乱用
- 百度提出动态自蒸馏方法,结合交互模型与双塔模型实现稠密段落检索
- Crmeb Standard Version window+phpstudy8 installation tutorial (I)
- For loop
- [jspwiki]jspwiki installation deployment and configuration
- DataTables warning: table id=campaignTable - Cannot reinitialise DataTable.解决
- PMP【敏捷教材+全真模拟题】,续6月25日考试之后,敏捷就成为了重中
- Configure CX Oracle solution (cx_oracle.databaseerror) dpi-1047: cannot locate a 64 bit Oracle client library: "th
猜你喜欢
随机推荐
sql 开发篇一 之 表锁查询及解锁
day 7/12
Crmeb knowledge paid manual installation tutorial
Deepfacelab model parameters collection
Svg verification code recognition experience
Knowledge payment open source system
Grpc protocol buffer
Chrome plug-in debugging
Hjs-de1/2 time relay
7/13(水塘抽样)
HJS-DE1/2时间继电器
Publish raspberry pie web page with cpolar (apache2 installation test)
MIT指出公开预训练模型不能乱用
Crmeb Standard Version window+phpstudy8 installation tutorial (I)
pyppeteer 遇到的问题
3588. Permutation and binary
Establish binary tree + C language code from preorder and middle order
解决pycharm使用powershell出错问题
How Charles installs and uses
Crmeb Standard Edition window+phpstudy8 installation tutorial (III)








