20#include <QCoreApplication>
35 else if (
fixType == NMEA_FIX_2D )
56 else if (
fixType == NMEA_FIX_2D )
72 return QCoreApplication::translate(
"QgsGpsInformation",
"Simulation mode" );
75 return QCoreApplication::translate(
"QgsGpsInformation",
"Manual input mode" );
78 return QCoreApplication::translate(
"QgsGpsInformation",
"Estimated" );
81 return QCoreApplication::translate(
"QgsGpsInformation",
"Float RTK" );
84 return QCoreApplication::translate(
"QgsGpsInformation",
"Fixed RTK" );
87 return QCoreApplication::translate(
"QgsGpsInformation",
"PPS" );
90 return QCoreApplication::translate(
"QgsGpsInformation",
"DGPS" );
93 return QCoreApplication::translate(
"QgsGpsInformation",
"Autonomous" );
96 return QCoreApplication::translate(
"QgsGpsInformation",
"Invalid" );
100 return QCoreApplication::translate(
"QgsGpsInformation",
"Unknown (%1)" ).arg( QString::number(
quality ) );
108 clearLastGPSInformation();
124 const bool connected =
mSource->open( QIODevice::ReadWrite | QIODevice::Unbuffered );
143void QgsGpsConnection::cleanupSource()
156 clearLastGPSInformation();
159void QgsGpsConnection::clearLastGPSInformation()
@ RTK
Real-time-kynematic.
@ Simulation
Simulation mode.
@ FloatRTK
Float real-time-kynematic.
@ Manual
Manual input mode.
QgsGpsInformation mLastGPSInformation
Last state of the gps related variables (e.g. position, time, ...)
virtual void parseData()=0
Parse available data source content.
void setSource(QIODevice *source)
Sets the GPS source. The class takes ownership of the device class.
~QgsGpsConnection() override
bool connect()
Opens connection to device.
bool close()
Closes connection to device.
std::unique_ptr< QIODevice > mSource
Data source (e.g. serial device, socket, file,...)
QgsGpsConnection(QIODevice *dev)
Constructor.
Status mStatus
Connection status.