QGIS API Documentation 3.38.0-Grenoble (exported)
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
211 Qgis::GpsNavigationStatus navigationStatus() const { return mNavigationStatus; }
212
220 void setNavigationStatus( Qgis::GpsNavigationStatus status ) { mNavigationStatus = status; }
221
226 bool isValid() const;
227
232 Q_DECL_DEPRECATED Qgis::GpsFixStatus fixStatus() const SIP_DEPRECATED;
233
239 QString qualityDescription() const;
240
246 QVariant componentValue( Qgis::GpsInformationComponent component ) const;
247
248 private:
249
250 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > mConstellationFixStatus;
251 Qgis::GpsNavigationStatus mNavigationStatus = Qgis::GpsNavigationStatus::NotValid;
252
253 friend class QgsNmeaConnection;
255
256};
257
259
260#endif // QGSGPSINFORMATION_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
GnssConstellation
GNSS constellation.
Definition qgis.h:1571
GpsQualityIndicator
GPS signal quality indicator.
Definition qgis.h:1589
GpsFixStatus
GPS fix status.
Definition qgis.h:1556
GpsNavigationStatus
GPS navigation status.
Definition qgis.h:1609
Encapsulates information relating to a GPS position fix.
void setNavigationStatus(Qgis::GpsNavigationStatus status)
Sets the navigation status.
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.
Qgis::GpsNavigationStatus navigationStatus() const
Returns the navigation 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)