25、BDS B1I电文处理定义

\qquad 下面是HD-GR GNSS导航软件的BDS B1I电文处理相关定义:

// b1i_message.h -- Header file for the b1i_message.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 : message.h
 * Modes    : None
 * version  : V1.0
 * date     : 21st/Dec/2006
 */

/* 
 * HD-GR GNSS receiver project
 * Modes    : Inherited the definitions of message.h in the Namuru GPS receiver 
 *            project V1.0 and made necessary adjustments to adapt to the new 
 *            RTOS and functions.
 * version  : V1.0
 * date     : xx/xx/2015
 */

#ifndef __B1I_MESSAGE_H__
#define __B1I_MESSAGE_H__

#include "main_message.h"

/*******************************************************************************
 * Definitions
 ******************************************************************************/


/*******************************************************************************
 * Declarations
 ******************************************************************************/

typedef struct{
	unsigned long word[10];
	unsigned long SOW;		// Time since beginning of the week in 1 second increments
	unsigned long valid;	// 10 bits of word validity flags; all good = 0x3ff
 } b1i_subframe_t;

typedef struct{
	unsigned short D;		// BCH(15,11,1) shift register
	unsigned short swd;		// BCH(15,11,1) short words
 } bchdc_t;

typedef struct {
	unsigned short prn;				// satellite prn
	unsigned short frame_sync;		// frame sync. flag
	unsigned short set_epoch_flag;	// only set the epoch counter once per sync on a channel

	unsigned short data_inverted;	// data inverted flag
	unsigned short bitcount;		// # of bits in the current word
	unsigned short wordcount;		// # of words in the subframe so far
	unsigned long wordbuf0;			// Current word (2+30 format)
	unsigned long wordbuf1;			// previous word (2+30 format)

	bchdc_t bch_dc1, bch_dc2;		// BCH(15,11,1) decoder data.

	unsigned short subframe;		// Current subframe #
	b1i_subframe_t subframes[5];		// Array of 5 subframes (1 frame)
} b1i_message_t;


/*******************************************************************************
 * Prototypes (Globally visible functions)
 ******************************************************************************/
 
void b1i_clear_messages(unsigned short ch) __attribute__ ((section(".isrcode.txt")));
void b1i_sync_frame(unsigned short ch, unsigned short bit) __attribute__ ((section(".isrcode.txt")));
void b1i_process_message(OS_FLAGS channels_with_bits, OS_FLAGS channel_bits) __attribute__ ((section(".isrcode.txt")));

/*******************************************************************************
 * Externs
 ******************************************************************************/

extern b1i_message_t m_b1i_messages[B1I_MAX_CHANNELS] __attribute__ ((section(".isrdata.rwdata")));


#endif // __B1I_MESSAGE_H__

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值