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__

猜你喜欢

转载自blog.csdn.net/turing321_huaide/article/details/120062203