📄 gpsinterface_serial.h
字号:
/*
* Roadnav
* GPSInterface_Serial.h
*
* Copyright (c) 2004 - 2006 Richard L. Lynch <rllynch@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public License
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//////////////////////////////////////////////////////////////////////////////
/// \file
///
/// NMEA serial gps interface module.
///
//////////////////////////////////////////////////////////////////////////////
#ifndef GPSINTERFACE_SERIAL_H
#define GPSINTERFACE_SERIAL_H
#include "SerialIO.h"
#ifdef ROADNAV_SERIAL_SUPPORT
#include <wx/datetime.h>
#include <vector>
#include "GPSInterface.h"
class GPSInterface_Serial : public IGPSInterface
{
public:
GPSInterface_Serial();
virtual ~GPSInterface_Serial();
virtual wxString Name();
virtual EGPSStatus GetData(wxGPSEvent * pGPSEvent);
virtual wxString GetLastError();
virtual EGPSStatus AutoDetect(wxThread * pThread);
bool VerifyGPSChecksum(wxString strSentence);
private:
/// Last known heading
double m_fLastHeading;
wxDateTime m_tLastGPSSentence;
wxDateTime m_tLastGPSLock;
char m_szBuffer[1024];
Point m_ptGPS;
double m_fSpeed;
double m_fHeading;
double m_fMinimumSpeedForHeading;
bool m_bSeenGPGGA;
bool m_bSeenGPRMC;
long m_nSatellites;
wxString m_strFixType;
std::vector<SSatelliteInfo> m_vSatelliteInfo;
bool m_bSerialInitialized;
wxString m_strLastError;
wxThread * m_pThread;
};
#endif // #ifdef ROADNAV_SERIAL_SUPPORT
#endif // #ifndef GPSINTERFACE_SERIAL_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -