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

📄 gps.h

📁 这个程序包含了wince串口、GPS信号处理
💻 H
字号:
// Gps.h: interface for the CGps class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GPS_H__F4111537_E580_49AA_8949_BD954C92D7BE__INCLUDED_)
#define AFX_GPS_H__F4111537_E580_49AA_8949_BD954C92D7BE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "define.h"
#include "Serial.h"
#include "Log.h"

class CGmarkView;

class CGps  
{
public:
	void SetViewWnd(CWnd * pWnd);
	CGmarkView *m_GmarkView;
	CLog * m_pLog;
	BOOL m_bGpsMsgBusy;
	BOOL IsChecksumCorrect( char * message );
	void SetOrigPosition( double orig_lon, double orig_lat );
	void WriteRTCM( char * rtcm);
	void ClearGpsData();
	HWND GetViewHandle();
	int Connect();
	void SetViewHandle(HWND);
	int Close();
	int Initialize(int baudrate);
	int SendCmd(LPSTR cmd);
	struct COMM_DATA * m_tCommData[GPS_MAX_RECNUM];
	int m_CurrIndex;
	struct GPS_DATA m_tGpsData;
	CSerial m_portA;
	CSerial m_portB;

	void CompleteMsg(unsigned char *buf, int nBytes);
	void CreateGPSData();
	void OnReceived(unsigned char *buf, int nBytes);
	CGps();
	virtual ~CGps();

private:
	BOOL BinCheckSum(char *buf, int len, int BinType = 0);
	void ParseCRT(char *Message);
	void ParseGSA(char *Message);
	void ParseGLL(char *Message);
	double m_orig_lat;
	double m_orig_lon;
	int GetCompleteMsg(LPSTR OrgMsg, int nOrgLen, LPSTR CompMsg, int & nCompLen);
	HWND m_hGmarkView;
	double DegToVal(char * deg);
	void ParseGGA(char * Message);
	void ParsePBN(char * Message);
	void ParseMCA(char * Message);
	void ParseSNV(char * Message);
	int IndexDecrease(int index);
	int IndexIncrease(int index);
	void GetToken(LPSTR str, int n, LPSTR token);
	void AddChecksum(LPSTR cmd, LPSTR chksum);
};

#endif // !defined(AFX_GPS_H__F4111537_E580_49AA_8949_BD954C92D7BE__INCLUDED_)

⌨️ 快捷键说明

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