QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
qgsgpsinformation.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsgpsinformation.h
3 -------------------
4 begin : November 30th, 2009
5 copyright : (C) 2009 by Marco Hugentobler
6 email : marco at hugis dot net
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSGPSINFORMATION_H
19#define QGSGPSINFORMATION_H
20
21#include "qgis.h"
22#include "qgis_core.h"
24
25#include <QDateTime>
26#include <QObject>
27#include <QString>
28
29
35class CORE_EXPORT QgsGpsInformation
36{
37 public:
38
43 double latitude = 0;
44
49 double longitude = 0;
50
54 double elevation = 0;
55
67 double elevation_diff = 0;
68
72 double speed = 0;
73
74#ifndef SIP_RUN
75
79 double direction = std::numeric_limits< double >::quiet_NaN();
80#else
81
85 double direction;
86#endif
87
91 QList<QgsSatelliteInfo> satellitesInView;
92
96 double pdop = 0;
97
101 double hdop = 0;
102
106 double vdop = 0;
107
108#ifndef SIP_RUN
110 double hacc = std::numeric_limits< double >::quiet_NaN();
112 double vacc = std::numeric_limits< double >::quiet_NaN();
113
118 double hvacc = std::numeric_limits< double >::quiet_NaN();
119#else
121 double hacc;
123 double vacc;
124
129 double hvacc;
130#endif
131
136 QTime utcTime;
137
141 QDateTime utcDateTime;
142
146 QChar fixMode;
147
153 int fixType = 0;
154
160 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const { return mConstellationFixStatus; }
161
170 Qgis::GpsFixStatus bestFixStatus( Qgis::GnssConstellation &constellation SIP_OUT ) const;
171
176 int quality = -1;
177
183
187 int satellitesUsed = 0;
188
192 QChar status;
193
197 QList<int> satPrn;
198
202 bool satInfoComplete = false;
203
208 bool isValid() const;
209
214 Q_DECL_DEPRECATED Qgis::GpsFixStatus fixStatus() const SIP_DEPRECATED;
215
221 QString qualityDescription() const;
222
228 QVariant componentValue( Qgis::GpsInformationComponent component ) const;
229
230 private:
231
232 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > mConstellationFixStatus;
233
234 friend class QgsNmeaConnection;
236
237};
238
240
241#endif // QGSGPSINFORMATION_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
GnssConstellation
GNSS constellation.
Definition qgis.h:1396
GpsQualityIndicator
GPS signal quality indicator.
Definition qgis.h:1414
GpsFixStatus
GPS fix status.
Definition qgis.h:1381
Encapsulates information relating to a GPS position fix.
QChar status
Status (A = active or V = void)
QTime utcTime
The time at which this position was reported, in UTC time.
QList< QgsSatelliteInfo > satellitesInView
Contains a list of information relating to the current satellites in view.
QChar fixMode
Fix mode (where M = Manual, forced to operate in 2D or 3D or A = Automatic, 3D/2D)
QDateTime utcDateTime
The date and time at which this position was reported, in UTC time.
QList< int > satPrn
IDs of satellites used in the position fix.
QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const
Returns a map of GNSS constellation to fix status.
Evaluates NMEA sentences coming from a GPS device.
A GPS connection subclass based on the Qt Location libraries.
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_OUT
Definition qgis_sip.h:58
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)