⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gbc.h

📁 GPS信号强度
💻 H
字号:
#ifndef __GBC_H__
#define __GBC_H__

#include "gpsdev.h"
#include "gpslib.h"
#include "StreamBuf.h"
#include "Viterbi.h"

/**********************************************************************
 following is definition of constant values
**********************************************************************/
#define GBC_CHANNEL_NUMBER 12

//----------------- initialize values ---------------------
#define INIT_INT_TIME 1000
#define INIT_PDI_NUMBER 20
#define INIT_CODE_SEARCH_NUMBER 205
#define INIT_FREQ_SEARCH_RANGE 12

//---------------- timeout definitions --------------------
#define TIMEOUT_TRACK 60000
#define TIMEOUT_UPDATE 600000

//------------------ waas definitions ---------------------
#define WAAS_USE_NONE CHANNEL_NUMBER

//-------------------- const arrays -----------------------
const int G2PN[33] = {
	0, // no corresponding satellite
	0xffc22, 0xffc44, 0xffc88, 0xffd10, 0xffd01, 0xffe02, 0xffc81, 0xffd02,
	0xffe04, 0xffc06, 0xffc0c, 0xffc30, 0xffc60, 0xffcc0, 0xffd80, 0xfff00,
	0xffc09, 0xffc12, 0xffc24, 0xffc48, 0xffc90, 0xffd20, 0xffc05, 0xffc28,
	0xffc50, 0xffca0, 0xffd40, 0xffe80, 0xffc21, 0xffc42, 0xffc84, 0xffd08,
};

/**********************************************************************
 following is definition of structures
**********************************************************************/
typedef struct tag_GBC_STATUS {
	HANDLE hDeviceNotifyEvent;
	HANDLE hKillDispatchThread;
	HANDLE pDispatchThread;
	HANDLE comPort;
	BOOL KillThread;
	BOOL WaitingCommand;
	BOOL bPositionFixed;
	int channel_number;			// current channel used
	int wait_count;
	int int_time;
	int waas_channel_number;
	int standard_write_addr;
	double TransTime0;
	GPS_DEV_INFO GpsDevice;
} GBC_STATUS, *PGBC_STATUS;

typedef struct tag_GPS_CHANNEL_STATUS {
	unsigned init_ddfs_freq;
	int satellite_id;
	int pdi_number;
	int code_search_number;
	int freq_search_range;
	int word_no;
	int frame_sync;
	int wait_count;
	long tow_t;
	long tow;
	BOOL is_waas;
	BOOL get_tow;
	CStreamBuffer *pStreamBuffer;
	PGPS_NAV_INFO pNaviInfo;
	unsigned char inv;
} GPS_CHANNEL_STATUS, *PGPS_CHANNEL_STATUS;

typedef struct tag_WAAS_CHANNEL_STATUS {
	unsigned char waas_msg[32];
	BOOL waas_sync;
	BOOL waas_preamble_found;
	int waas_next_flag;
	BOOL waas_invert;
	CViterbiStream *pViterbiDecoder;
} WAAS_CHANNEL_STATUS, *PWAAS_CHANNEL_STATUS;

/**********************************************************************
 following is definition of GBC functions used by upper level
**********************************************************************/
BOOL InitGbc(HANDLE comPort);
BOOL DeinitGbc();
BOOL GbcStartGps();
BOOL GbcStopGps();
int GetNMEAMsg(char *Msg);

#endif //__GBC_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -