20 #include <QCoreApplication>
23 #include <QStringList>
38 else if (
fixType == NMEA_FIX_2D )
59 else if (
fixType == NMEA_FIX_2D )
75 return QCoreApplication::translate(
"QgsGpsInformation",
"Simulation mode" );
78 return QCoreApplication::translate(
"QgsGpsInformation",
"Manual input mode" );
81 return QCoreApplication::translate(
"QgsGpsInformation",
"Estimated" );
84 return QCoreApplication::translate(
"QgsGpsInformation",
"Float RTK" );
87 return QCoreApplication::translate(
"QgsGpsInformation",
"Fixed RTK" );
90 return QCoreApplication::translate(
"QgsGpsInformation",
"PPS" );
93 return QCoreApplication::translate(
"QgsGpsInformation",
"DGPS" );
96 return QCoreApplication::translate(
"QgsGpsInformation",
"Autonomous" );
99 return QCoreApplication::translate(
"QgsGpsInformation",
"Invalid" );
103 return QCoreApplication::translate(
"QgsGpsInformation",
"Unknown (%1)" ).arg( QString::number(
quality ) );
111 clearLastGPSInformation();
127 const bool connected =
mSource->open( QIODevice::ReadWrite | QIODevice::Unbuffered );
146 void QgsGpsConnection::cleanupSource()
159 clearLastGPSInformation();
162 void 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.