QGIS API Documentation 4.1.0-Master (60fea48833c)
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:
41 double latitude = 0;
42
47 double longitude = 0;
48
52 double elevation = 0;
53
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
188
192 QChar status;
193
197 QList<int> satPrn;
198
202 bool satInfoComplete = false;
203
211 Qgis::GpsNavigationStatus navigationStatus() const { return mNavigationStatus; }
212
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 QMap< Qgis::GnssConstellation, Qgis::GpsFixStatus > mConstellationFixStatus;
250 Qgis::GpsNavigationStatus mNavigationStatus = Qgis::GpsNavigationStatus::NotValid;
251
252 friend class QgsNmeaConnection;
254};
255
257
258#endif // QGSGPSINFORMATION_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
GnssConstellation
GNSS constellation.
Definition qgis.h:1983
GpsQualityIndicator
GPS signal quality indicator.
Definition qgis.h:2001
GpsFixStatus
GPS fix status.
Definition qgis.h:1968
GpsNavigationStatus
GPS navigation status.
Definition qgis.h:2021
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:113
#define SIP_OUT
Definition qgis_sip.h:57
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)