QGIS API Documentation 4.1.0-Master (70f46ec8b69)
Loading...
Searching...
No Matches
qgssatelliteinformation.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssatelliteinformation.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 QGSSATELLITEINFORMATION_H
19#define QGSSATELLITEINFORMATION_H
20
21#include "qgis.h"
22#include "qgis_core.h"
23
24#include <QDateTime>
25#include <QObject>
26#include <QString>
27
33class CORE_EXPORT QgsSatelliteInfo
34{
35 Q_GADGET
36
37 Q_PROPERTY( int id MEMBER id )
38 Q_PROPERTY( bool inUse MEMBER inUse )
39 Q_PROPERTY( double elevation MEMBER elevation )
40 Q_PROPERTY( double azimuth MEMBER azimuth )
41 Q_PROPERTY( double signal MEMBER signal )
42 Q_PROPERTY( QChar satType MEMBER satType )
43 Q_PROPERTY( Qgis::GnssConstellation constellation READ constellation )
44
45 public:
53 int id = 0;
54
58 bool inUse = false;
59
60#ifndef SIP_RUN
61
65 double elevation = std::numeric_limits< double >::quiet_NaN();
66#else
67
71 double elevation;
72#endif
73
74#ifndef SIP_RUN
75
79 double azimuth = std::numeric_limits< double >::quiet_NaN();
80#else
81
85 double azimuth;
86#endif
87
91 int signal = -1;
92
97 QChar satType;
98
104 Qgis::GnssConstellation constellation() const { return mConstellation; }
105
106 bool operator==( const QgsSatelliteInfo &other ) const
107 {
108 return id == other.id && inUse == other.inUse && elevation == other.elevation && azimuth == other.azimuth && signal == other.signal && satType == other.satType && mConstellation == other.mConstellation;
109 }
110
111 bool operator!=( const QgsSatelliteInfo &other ) const { return !operator==( other ); }
112
113 private:
115
116 friend class QgsNmeaConnection;
117};
118
119#endif // QGSSATELLITEINFORMATION_H
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
GnssConstellation
GNSS constellation.
Definition qgis.h:2024
@ Unknown
Unknown/other system.
Definition qgis.h:2025
Encapsulates information relating to a GPS satellite.
double elevation
Elevation of the satellite, in degrees.
bool inUse
true if satellite was used in obtaining the position fix.
bool operator!=(const QgsSatelliteInfo &other) const
bool operator==(const QgsSatelliteInfo &other) const
int id
Contains the satellite identifier number.
double azimuth
The azimuth of the satellite to true north, in degrees.
Qgis::GnssConstellation constellation
QChar satType
satType value from NMEA message $GxGSV, where x: P = GPS; S = SBAS (GPSid> 32 then SBasid = GPSid + 8...
Qgis::GnssConstellation constellation() const
Returns the GNSS constellation associated with the information.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)