QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
34class CORE_EXPORT QgsGpsInformation
35{
36 public:
37
42 double latitude = 0;
43
48 double longitude = 0;
49
53 double elevation = 0;
54
68 double elevation_diff = 0;
69
73 double speed = 0;
74
75#ifndef SIP_RUN
76
80 double direction = std::numeric_limits< double >::quiet_NaN();
81#else
82
86 double direction;
87#endif
88
92 QList<QgsSatelliteInfo> satellitesInView;
93
97 double pdop = 0;
98
102 double hdop = 0;
103
107 double vdop = 0;
108
109#ifndef SIP_RUN
111 double hacc = std::numeric_limits< double >::quiet_NaN();
113 double vacc = std::numeric_limits< double >::quiet_NaN();
114
119 double hvacc = std::numeric_limits< double >::quiet_NaN();
120#else
122 double hacc;
124 double vacc;
125
130 double hvacc;
131#endif
132
137 QTime utcTime;
138
142 QDateTime utcDateTime;
143
147 QChar fixMode;
148
154 int fixType = 0;
155
161 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const { return mConstellationFixStatus; }
162
171 Qgis::GpsFixStatus bestFixStatus( Qgis::GnssConstellation &constellation SIP_OUT ) const;
172
177 int quality = -1;
178
184
189
193 QChar status;
194
198 QList<int> satPrn;
199
203 bool satInfoComplete = false;
204
212 Qgis::GpsNavigationStatus navigationStatus() const { return mNavigationStatus; }
213
222
227 bool isValid() const;
228
233 Q_DECL_DEPRECATED Qgis::GpsFixStatus fixStatus() const SIP_DEPRECATED;
234
240 QString qualityDescription() const;
241
247 QVariant componentValue( Qgis::GpsInformationComponent component ) const;
248
249 private:
250
251 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > mConstellationFixStatus;
252 Qgis::GpsNavigationStatus mNavigationStatus = Qgis::GpsNavigationStatus::NotValid;
253
254 friend class QgsNmeaConnection;
256
257};
258
260
261#endif // QGSGPSINFORMATION_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:56
GnssConstellation
GNSS constellation.
Definition qgis.h:1904
GpsQualityIndicator
GPS signal quality indicator.
Definition qgis.h:1922
GpsFixStatus
GPS fix status.
Definition qgis.h:1889
GpsNavigationStatus
GPS navigation status.
Definition qgis.h:1942
Encapsulates information relating to a GPS position fix.
double vdop
Vertical dilution of precision.
double direction
The bearing measured in degrees clockwise from true north to the direction of travel.
void setNavigationStatus(Qgis::GpsNavigationStatus status)
Sets the navigation status.
int fixType
Contains the fix type, where 1 = no fix, 2 = 2d fix, 3 = 3d fix.
QChar status
Status (A = active or V = void).
double speed
Ground speed, in km/h.
QTime utcTime
The time at which this position was reported, in UTC time.
double vacc
Vertical accuracy in meters.
Qgis::GpsQualityIndicator qualityIndicator
Returns the signal quality indicator.
double latitude
Latitude in decimal degrees, using the WGS84 datum.
double longitude
Longitude in decimal degrees, using the WGS84 datum.
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.
friend class QgsQtLocationConnection
QList< int > satPrn
IDs of satellites used in the position fix.
friend class QgsNmeaConnection
double elevation
Altitude (in meters) above or below the mean sea level.
QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > constellationFixStatus() const
Returns a map of GNSS constellation to fix status.
bool satInfoComplete
true if satellite information is complete.
double pdop
Dilution of precision.
int satellitesUsed
Count of satellites used in obtaining the fix.
double elevation_diff
Geoidal separation (in meters).
double hdop
Horizontal dilution of precision.
int quality
GPS quality indicator (0 = Invalid; 1 = Fix; 2 = Differential, 3 = Sensitive, etc....
Qgis::GpsNavigationStatus navigationStatus() const
Returns the navigation status.
double hacc
Horizontal accuracy in meters.
#define SIP_DEPRECATED
Definition qgis_sip.h:114
#define SIP_OUT
Definition qgis_sip.h:58
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)