QGIS API Documentation
2.2.0-Valmiera
|
Evaluates NMEA sentences coming from a GPS device. More...
#include <qgsnmeaconnection.h>
Public Member Functions | |
QgsNMEAConnection (QIODevice *dev) | |
~QgsNMEAConnection () | |
Public Member Functions inherited from QgsGPSConnection | |
QgsGPSConnection (QIODevice *dev) | |
Constructor. | |
virtual | ~QgsGPSConnection () |
bool | connect () |
Opens connection to device. | |
bool | close () |
Closes connection to device. | |
void | setSource (QIODevice *source) |
Sets the GPS source. | |
Status | status () const |
Returns the status. | |
QgsGPSInformation | currentGPSInformation () const |
Returns the current gps information (lat, lon, etc.) |
Protected Slots | |
void | parseData () |
Parse available data source content. | |
Protected Slots inherited from QgsGPSConnection | |
virtual void | parseData ()=0 |
Parse available data source content. |
Protected Member Functions | |
void | processStringBuffer () |
Splits mStringBuffer into sentences and calls libnmea. | |
void | processGGASentence (const char *data, int len) |
void | processRMCSentence (const char *data, int len) |
void | processGSVSentence (const char *data, int len) |
void | processVTGSentence (const char *data, int len) |
void | processGSASentence (const char *data, int len) |
Protected Attributes | |
QString | mStringBuffer |
Store data from the device before it is processed. | |
Protected Attributes inherited from QgsGPSConnection | |
QIODevice * | mSource |
Data source (e.g. | |
QgsGPSInformation | mLastGPSInformation |
Last state of the gps related variables (e.g. | |
Status | mStatus |
Connection status. |
Additional Inherited Members | |
Public Types inherited from QgsGPSConnection | |
enum | Status { NotConnected, Connected, DataReceived, GPSDataReceived } |
Signals inherited from QgsGPSConnection | |
void | stateChanged (const QgsGPSInformation &info) |
void | nmeaSentenceReceived (const QString &substring) |
Evaluates NMEA sentences coming from a GPS device.
Definition at line 24 of file qgsnmeaconnection.h.
QgsNMEAConnection::QgsNMEAConnection | ( | QIODevice * | dev | ) |
Definition at line 34 of file qgsnmeaconnection.cpp.
QgsNMEAConnection::~QgsNMEAConnection | ( | ) |
Definition at line 38 of file qgsnmeaconnection.cpp.
|
protectedslot |
Parse available data source content.
Definition at line 43 of file qgsnmeaconnection.cpp.
References QgsGPSConnection::DataReceived, QgsGPSConnection::GPSDataReceived, QgsGPSConnection::mLastGPSInformation, QgsGPSConnection::mSource, QgsGPSConnection::mStatus, mStringBuffer, processStringBuffer(), QgsDebugMsg, and QgsGPSConnection::stateChanged().
|
protected |
Definition at line 141 of file qgsnmeaconnection.cpp.
References QgsGPSInformation::elevation, _nmeaGPGGA::elv, _nmeaGPGGA::ew, _nmeaGPGGA::lat, QgsGPSInformation::latitude, _nmeaGPGGA::lon, QgsGPSInformation::longitude, QgsGPSConnection::mLastGPSInformation, nmea_ndeg2degree(), nmea_parse_GPGGA(), _nmeaGPGGA::ns, QgsGPSInformation::quality, QgsGPSInformation::satellitesUsed, _nmeaGPGGA::satinuse, and _nmeaGPGGA::sig.
Referenced by processStringBuffer().
|
protected |
Definition at line 241 of file qgsnmeaconnection.cpp.
References _nmeaGPGSA::fix_mode, _nmeaGPGSA::fix_type, QgsGPSInformation::fixMode, QgsGPSInformation::fixType, QgsGPSInformation::hdop, _nmeaGPGSA::HDOP, QgsGPSConnection::mLastGPSInformation, NMEA_MAXSAT, nmea_parse_GPGSA(), QgsGPSInformation::pdop, _nmeaGPGSA::PDOP, _nmeaGPGSA::sat_prn, QgsGPSInformation::satPrn, QgsGPSInformation::vdop, and _nmeaGPGSA::VDOP.
Referenced by processStringBuffer().
|
protected |
Definition at line 203 of file qgsnmeaconnection.cpp.
References QgsSatelliteInfo::azimuth, _nmeaSATELLITE::azimuth, QgsSatelliteInfo::elevation, _nmeaSATELLITE::elv, QgsSatelliteInfo::id, _nmeaSATELLITE::id, _nmeaSATELLITE::in_use, QgsSatelliteInfo::inUse, QgsGPSConnection::mLastGPSInformation, nmea_parse_GPGSV(), NMEA_SATINPACK, _nmeaGPGSV::pack_count, _nmeaGPGSV::pack_index, _nmeaGPGSV::sat_data, QgsGPSInformation::satellitesInView, QgsGPSInformation::satInfoComplete, _nmeaSATELLITE::sig, and QgsSatelliteInfo::signal.
Referenced by processStringBuffer().
|
protected |
Definition at line 166 of file qgsnmeaconnection.cpp.
References _nmeaTIME::day, QgsGPSInformation::direction, _nmeaGPRMC::direction, _nmeaGPRMC::ew, _nmeaTIME::hour, KNOTS_TO_KMH, _nmeaGPRMC::lat, QgsGPSInformation::latitude, _nmeaGPRMC::lon, QgsGPSInformation::longitude, _nmeaTIME::min, QgsGPSConnection::mLastGPSInformation, _nmeaTIME::mon, _nmeaTIME::msec, nmea_ndeg2degree(), nmea_parse_GPRMC(), _nmeaGPRMC::ns, QgsDebugMsg, _nmeaTIME::sec, QgsGPSInformation::speed, _nmeaGPRMC::speed, QgsGPSInformation::status, _nmeaGPRMC::status, _nmeaGPRMC::utc, QgsGPSInformation::utcDateTime, and _nmeaTIME::year.
Referenced by processStringBuffer().
|
protected |
Splits mStringBuffer into sentences and calls libnmea.
Definition at line 77 of file qgsnmeaconnection.cpp.
References QgsGPSConnection::GPSDataReceived, QgsGPSConnection::mStatus, mStringBuffer, QgsGPSConnection::nmeaSentenceReceived(), processGGASentence(), processGSASentence(), processGSVSentence(), processRMCSentence(), processVTGSentence(), and QgsDebugMsg.
Referenced by parseData().
|
protected |
Definition at line 232 of file qgsnmeaconnection.cpp.
References QgsGPSConnection::mLastGPSInformation, nmea_parse_GPVTG(), QgsGPSInformation::speed, and _nmeaGPVTG::spk.
Referenced by processStringBuffer().
|
protected |
Store data from the device before it is processed.
Definition at line 37 of file qgsnmeaconnection.h.
Referenced by parseData(), and processStringBuffer().