GPSInterface_Serial Class Reference

Implements serial GPS interface. More...

#include <GPSInterface_Serial.h>

Inheritance diagram for GPSInterface_Serial:

Inheritance graph
[legend]
Collaboration diagram for GPSInterface_Serial:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GPSInterface_Serial ()
 Constructor - zero out everything.
virtual ~GPSInterface_Serial ()
 Destructor - shut down serial code.
virtual wxString Name ()
 Returns name of this GPS module.
virtual EGPSStatus GetData (wxGPSEvent *pGPSEvent)
 Tries to get updated data from gps unit.
virtual wxString GetLastError ()
 Returns an explanation of the last error.
virtual EGPSStatus AutoDetect (wxThread *pThread)
 Attempt to autodetect if a GPS unit is attached to a serial port.

Static Public Member Functions

static bool VerifyGPSChecksum (wxString strSentence)
 Returns if the checksum on a gps sentence is valid or not.

Private Attributes

double m_fLastHeading
 Last known heading.
wxDateTime m_tLastGPSSentence
 Time of last valid GPS sentence.
wxDateTime m_tLastGPSLock
 Time of last GPS lock.
wxDateTime m_tLastSerialActivity
 Time of last serial activity.
char m_szBuffer [1024]
 Receive buffer.
Point m_ptGPS
 GPS coordinates.
double m_fSpeed
 Speed.
double m_fHeading
 Heading.
double m_fMinimumSpeedForHeading
 Minimum speed the vehicle must be going in order to update the heading.
bool m_bSeenGPGGA
 If the GPGGA sentence has been seen.
bool m_bSeenGPRMC
 If the GPRMC sentence has been seen.
bool m_bSeenGPVTG
 If the GPVTG sentence has been seen.
long m_nSatellites
 Number of satellites used for lock.
wxString m_strFixType
 String describing lock type.
SSatelliteInfo m_arSatellitesVisible [MAX_GPS_SATELLITES]
 Satellites visible.
int m_nSatellitesVisible
bool m_bSerialInitialized
 If serial I/O init function has been called.
wxString m_strLastError
 Last error message.
wxThread * m_pThread


Detailed Description

Implements serial GPS interface.

Definition at line 46 of file GPSInterface_Serial.h.


Constructor & Destructor Documentation

GPSInterface_Serial::GPSInterface_Serial (  ) 

Constructor - zero out everything.

Definition at line 54 of file GPSInterface_Serial.cpp.

GPSInterface_Serial::~GPSInterface_Serial (  )  [virtual]

Destructor - shut down serial code.

Definition at line 86 of file GPSInterface_Serial.cpp.


Member Function Documentation

wxString GPSInterface_Serial::Name (  )  [virtual]

Returns name of this GPS module.

Implements IGPSInterface.

Definition at line 97 of file GPSInterface_Serial.cpp.

IGPSInterface::EGPSStatus GPSInterface_Serial::GetData ( wxGPSEvent pGPSEvent  )  [virtual]

Tries to get updated data from gps unit.

Parameters:
pGPSEvent Receives updated gps data.
Returns:
Status - either GPSStatusError for serious error, or GPSStatusOK if data was obtained.

Implements IGPSInterface.

Definition at line 173 of file GPSInterface_Serial.cpp.

wxString GPSInterface_Serial::GetLastError (  )  [virtual]

Returns an explanation of the last error.

Implements IGPSInterface.

Definition at line 740 of file GPSInterface_Serial.cpp.

IGPSInterface::EGPSStatus GPSInterface_Serial::AutoDetect ( wxThread *  pThread  )  [virtual]

Attempt to autodetect if a GPS unit is attached to a serial port.

Parameters:
pThread Pointer to wxThread obtain this code is running in.
Returns:
Status - either GPSStatusOK if a gps unit was found and a lock was detected, or GPSStatusAutoDetectionGPSDetectedButNoLock if a gps unit was found, but wasn't locked, or GPSStatusAutoDetectionNoGPSDetected for no gps units.

Implements IGPSInterface.

Definition at line 760 of file GPSInterface_Serial.cpp.

bool GPSInterface_Serial::VerifyGPSChecksum ( wxString  strSentence  )  [static]

Returns if the checksum on a gps sentence is valid or not.

Parameters:
strSentence GPS sentence. May be CR-LF terminated. Should start with $.
Returns:
True if checksum valid, false otherwise.

Definition at line 111 of file GPSInterface_Serial.cpp.


Member Data Documentation

Last known heading.

Definition at line 62 of file GPSInterface_Serial.h.

Time of last valid GPS sentence.

Definition at line 65 of file GPSInterface_Serial.h.

Time of last GPS lock.

Definition at line 68 of file GPSInterface_Serial.h.

Time of last serial activity.

Definition at line 71 of file GPSInterface_Serial.h.

char GPSInterface_Serial::m_szBuffer[1024] [private]

Receive buffer.

Definition at line 75 of file GPSInterface_Serial.h.

GPS coordinates.

Definition at line 79 of file GPSInterface_Serial.h.

Speed.

Definition at line 82 of file GPSInterface_Serial.h.

Heading.

Definition at line 85 of file GPSInterface_Serial.h.

Minimum speed the vehicle must be going in order to update the heading.

Definition at line 89 of file GPSInterface_Serial.h.

If the GPGGA sentence has been seen.

Definition at line 92 of file GPSInterface_Serial.h.

If the GPRMC sentence has been seen.

Definition at line 95 of file GPSInterface_Serial.h.

If the GPVTG sentence has been seen.

Definition at line 98 of file GPSInterface_Serial.h.

Number of satellites used for lock.

Definition at line 101 of file GPSInterface_Serial.h.

String describing lock type.

Definition at line 104 of file GPSInterface_Serial.h.

Satellites visible.

Definition at line 107 of file GPSInterface_Serial.h.

Definition at line 108 of file GPSInterface_Serial.h.

If serial I/O init function has been called.

Definition at line 111 of file GPSInterface_Serial.h.

Last error message.

Definition at line 114 of file GPSInterface_Serial.h.

wxThread* GPSInterface_Serial::m_pThread [private]

Definition at line 116 of file GPSInterface_Serial.h.


The documentation for this class was generated from the following files:

Generated on Sun Jul 27 17:26:12 2008 for Roadnav by  doxygen 1.5.5