当前位置:网站首页>9. Related data accumulation task definition
9. Related data accumulation task definition
2022-07-28 15:34:00 【Turing_ three hundred and twenty-one】
\qquad Here is HD-GR GNSS Definition of related data accumulation task of navigation software :
// 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__
边栏推荐
- Idea debugging burpsuit plug-in
- 10、相关数据累积任务实现
- 2、开源GPS项目HD-GR GNSS的自叙
- ERROR:bokeh.core.validation. check:E-1001 (BAD_COLUMN_NAME)
- 7/13 (pond sampling)
- Principle and configuration of MPLS LDP
- How many of the top ten test tools in 2022 do you master
- Learn PHP reflection classes from ThinkPHP remote code execution
- Heuristic merging simple problem on tree
- Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
猜你喜欢

Easy start, swagger

Learn PHP reflection classes from ThinkPHP remote code execution

ECCV 2022 | SSP: 自支持匹配的小样本任务新思想

Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog

使用Mock技术帮助提升测试效率的小tips,你知道几个?

Deepfacelab model parameters collection

Nftscan and nftplay have reached strategic cooperation in the field of NFT data

I heard that many merchants of crmeb have added the function of planting grass?

How many of the top ten test tools in 2022 do you master

Explain the difference set, intersection set and union set of complex type set in detail.Net
随机推荐
字符串(3)
Set structure byte alignment
day 7/12
3. Basic constants and macro definitions
使用Mock技术帮助提升测试效率的小tips,你知道几个?
Some operations of bit operation
.net core version 2.2 cross domain configuration
如何获取及嵌入Go二进制执行包信息
Stateflow逻辑系统建模
Problems encountered by pyppeter
程序员的自我修养
Sharing of award-winning activities: you can get up to iphone13 after using WordPress to build your own blog
try...except异常处理语句(6)
Ffmpeg notes
Crmeb knowledge paid manual installation tutorial
Differences between two ways of QT creating folders
Pycharm - output exception of program run and default comment of added function
详解.NET的求复杂类型集合的差集、交集、并集
8、实时数据备份和实时时钟功能实现
Celery related