Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QGeoSatelliteInfo Class Reference

\inmodule QtPositioning More...

#include <qgeosatelliteinfo.h>

+ Inheritance diagram for QGeoSatelliteInfo:
+ Collaboration diagram for QGeoSatelliteInfo:

Public Types

enum  Attribute { Elevation , Azimuth }
 Defines the attributes for the satellite information. More...
 
enum  SatelliteSystem {
  Undefined = 0x00 , GPS = 0x01 , GLONASS = 0x02 , GALILEO = 0x03 ,
  BEIDOU = 0x04 , QZSS = 0x05 , Multiple = 0xFF , CustomType = 0x100
}
 Defines the GNSS system of the satellite. More...
 

Public Member Functions

 QGeoSatelliteInfo ()
 Creates a satellite information object.
 
 QGeoSatelliteInfo (const QGeoSatelliteInfo &other)
 Creates a satellite information object with the values of other.
 
 QGeoSatelliteInfo (QGeoSatelliteInfoPrivate &dd)
 
 QGeoSatelliteInfo (QGeoSatelliteInfo &&other) noexcept=default
 
 ~QGeoSatelliteInfo ()
 Destroys a satellite information object.
 
QGeoSatelliteInfooperator= (const QGeoSatelliteInfo &other)
 Assigns the values from other to this object.
 
void swap (QGeoSatelliteInfo &other) noexcept
 
void setSatelliteSystem (SatelliteSystem system)
 Sets the Satellite System (GPS, GLONASS, ...) to system.
 
SatelliteSystem satelliteSystem () const
 Returns the Satellite System (GPS, GLONASS, ...)
 
void setSatelliteIdentifier (int satId)
 Sets the satellite identifier number to satId.
 
int satelliteIdentifier () const
 Returns the satellite identifier number.
 
void setSignalStrength (int signalStrength)
 Sets the signal strength to signalStrength, in decibels.
 
int signalStrength () const
 Returns the signal strength, or -1 if the value has not been set.
 
void setAttribute (Attribute attribute, qreal value)
 Sets the value for attribute to value.
 
Q_INVOKABLE qreal attribute (Attribute attribute) const
 Returns the value of the specified attribute as a qreal value.
 
void removeAttribute (Attribute attribute)
 Removes the specified attribute and its value.
 
Q_INVOKABLE bool hasAttribute (Attribute attribute) const
 Returns true if the specified attribute is present in this update.
 
void detach ()
 

Properties

SatelliteSystem satelliteSystem
 
int satelliteIdentifier
 
qreal signalStrength
 

Friends

class QGeoSatelliteInfoPrivate
 
bool operator== (const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
 Returns true if all the parameters of the lhs satellite are the same as those of rhs.
 
bool operator!= (const QGeoSatelliteInfo &lhs, const QGeoSatelliteInfo &rhs)
 Returns true if any of the parameters of the lhs satellite are not the same as those of rhs.
 
QDebug operator<< (QDebug dbg, const QGeoSatelliteInfo &info)
 
QDataStreamoperator<< (QDataStream &stream, const QGeoSatelliteInfo &info)
 Writes the given info to the specified stream.
 
QDataStreamoperator>> (QDataStream &stream, QGeoSatelliteInfo &info)
 Reads satellite information from the specified stream into the given info.
 
Q_POSITIONING_EXPORT size_t qHash (const QGeoSatelliteInfo &key, size_t seed) noexcept
 
Q_POSITIONING_EXPORT char * QTest::toString (const QGeoSatelliteInfo &info)
 

Detailed Description

\inmodule QtPositioning

Since
5.2

The QGeoSatelliteInfo class contains basic information about a satellite.

See also
QGeoSatelliteInfoSource

Definition at line 28 of file qgeosatelliteinfo.h.

Member Enumeration Documentation

◆ Attribute

Defines the attributes for the satellite information.

\value Elevation The elevation of the satellite, in degrees. \value Azimuth The azimuth to true north, in degrees.

Enumerator
Elevation 
Azimuth 

Definition at line 36 of file qgeosatelliteinfo.h.

◆ SatelliteSystem

Defines the GNSS system of the satellite.

\value Undefined Not defined. \value GPS Global Positioning System (USA). \value GLONASS Global Positioning System (Russia). \value GALILEO Global navigation satellite system (EU). \value BEIDOU BeiDou navigation satellite system (China). \value QZSS Quasi-Zenith Satellite System (Japan). \value Multiple This type normally indicates that the information is received from a device that supports multiple satellite systems, and the satellite system is not explicitly specified. Depending on the data source, you might use other information to determine the actual system type. One example of the usage of this type is an NMEA $GNGSA message, which contains the IDs of the satellites being used, but does not explicitly mention their system types. \value CustomType The first type that can be used for user purposes. For example when reimplementing NMEA data parsing in \l QNmeaSatelliteInfoSource. User can add more types using {CustomType + 1}, {CustomType + 2} and so on.

Enumerator
Undefined 
GPS 
GLONASS 
GALILEO 
BEIDOU 
QZSS 
Multiple 
CustomType 

Definition at line 42 of file qgeosatelliteinfo.h.

Constructor & Destructor Documentation

◆ QGeoSatelliteInfo() [1/4]

QGeoSatelliteInfo::QGeoSatelliteInfo ( )

Creates a satellite information object.

Definition at line 58 of file qgeosatelliteinfo.cpp.

References d, and Undefined.

◆ QGeoSatelliteInfo() [2/4]

QGeoSatelliteInfo::QGeoSatelliteInfo ( const QGeoSatelliteInfo & other)

Creates a satellite information object with the values of other.

Definition at line 70 of file qgeosatelliteinfo.cpp.

◆ QGeoSatelliteInfo() [3/4]

QGeoSatelliteInfo::QGeoSatelliteInfo ( QGeoSatelliteInfoPrivate & dd)

Definition at line 75 of file qgeosatelliteinfo.cpp.

◆ QGeoSatelliteInfo() [4/4]

QGeoSatelliteInfo::QGeoSatelliteInfo ( QGeoSatelliteInfo && other)
defaultnoexcept
Since
6.2

Creates a satellite information object by moving from other.

Note that a moved-from QGeoSatelliteInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

◆ ~QGeoSatelliteInfo()

QGeoSatelliteInfo::~QGeoSatelliteInfo ( )

Destroys a satellite information object.

Definition at line 93 of file qgeosatelliteinfo.cpp.

Member Function Documentation

◆ attribute()

qreal QGeoSatelliteInfo::attribute ( Attribute attribute) const

Returns the value of the specified attribute as a qreal value.

Returns -1 if the value has not been set.

See also
hasAttribute(), setAttribute()

Definition at line 242 of file qgeosatelliteinfo.cpp.

References QHash< Key, T >::contains(), and QGeoSatelliteInfoPrivate::doubleAttribs.

+ Here is the call graph for this function:

◆ detach()

void QGeoSatelliteInfo::detach ( )

Definition at line 269 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), and QGeoSatelliteInfoPrivate.

+ Here is the call graph for this function:

◆ hasAttribute()

bool QGeoSatelliteInfo::hasAttribute ( Attribute attribute) const

Returns true if the specified attribute is present in this update.

Definition at line 261 of file qgeosatelliteinfo.cpp.

References QHash< Key, T >::contains(), and QGeoSatelliteInfoPrivate::doubleAttribs.

+ Here is the call graph for this function:

◆ operator=()

QGeoSatelliteInfo & QGeoSatelliteInfo::operator= ( const QGeoSatelliteInfo & other)

Assigns the values from other to this object.

Since
6.2

Move-assigns the value from other to this object

Note that a moved-from QGeoSatelliteInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.

Definition at line 102 of file qgeosatelliteinfo.cpp.

References d, and other().

+ Here is the call graph for this function:

◆ removeAttribute()

void QGeoSatelliteInfo::removeAttribute ( Attribute attribute)

Removes the specified attribute and its value.

Definition at line 252 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), QGeoSatelliteInfoPrivate::doubleAttribs, and QHash< Key, T >::remove().

+ Here is the call graph for this function:

◆ satelliteIdentifier()

int QGeoSatelliteInfo::satelliteIdentifier ( ) const

Returns the satellite identifier number.

The satellite identifier number can be used to identify a satellite within the satellite system.

The actual value may vary, depending on the platform and the selected backend.

For example, if nmea plugin is used, the satellite identifier for GPS satellite system represents the PRN (Pseudo-random noise) number, and the satellite identifier for GLONASS satellite system represents the slot number.

For NMEA-based backends the satellite identifier can be used to determine the satellite system type if it is not available from other sources. You can refer to \l {https://gpsd.gitlab.io/gpsd/NMEA.html#_satellite_ids} {satellite IDs list} to check the ID ranges for different satellite systems.

Note
Depending on the platform and the selected backend, the satellite identifier ranges for different satellite systems may intersect. To uniquely identify a satellite, a combination of satelliteIndetifier() and \l satelliteSystem() must be used.
See also
satelliteSystem()

Definition at line 204 of file qgeosatelliteinfo.cpp.

References QGeoSatelliteInfoPrivate::satId.

◆ satelliteSystem()

QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem ( ) const

Returns the Satellite System (GPS, GLONASS, ...)

Note
This value can be used together with \l satelliteIdentifier() to uniquely identify a satellite.
See also
satelliteIdentifier()

Definition at line 153 of file qgeosatelliteinfo.cpp.

References QGeoSatelliteInfoPrivate::system.

◆ setAttribute()

void QGeoSatelliteInfo::setAttribute ( Attribute attribute,
qreal value )

Sets the value for attribute to value.

Definition at line 229 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), and QGeoSatelliteInfoPrivate::doubleAttribs.

+ Here is the call graph for this function:

◆ setSatelliteIdentifier()

void QGeoSatelliteInfo::setSatelliteIdentifier ( int satId)

Sets the satellite identifier number to satId.

The satellite identifier number can be used to identify a satellite within the satellite system.

The actual value may vary, depending on the platform and the selected backend.

For example, if nmea plugin is used, the satellite identifier for GPS satellite system represents the PRN (Pseudo-random noise) number, and the satellite identifier for GLONASS satellite system represents the slot number.

Definition at line 172 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), and QGeoSatelliteInfoPrivate::satId.

+ Here is the call graph for this function:

◆ setSatelliteSystem()

void QGeoSatelliteInfo::setSatelliteSystem ( SatelliteSystem system)

Sets the Satellite System (GPS, GLONASS, ...) to system.

Definition at line 139 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), and QGeoSatelliteInfoPrivate::system.

+ Here is the call graph for this function:

◆ setSignalStrength()

void QGeoSatelliteInfo::setSignalStrength ( int signalStrength)

Sets the signal strength to signalStrength, in decibels.

Definition at line 212 of file qgeosatelliteinfo.cpp.

References QExplicitlySharedDataPointer< T >::detach(), QGeoSatelliteInfoPrivate::signal, and signalStrength.

+ Here is the call graph for this function:

◆ signalStrength()

int QGeoSatelliteInfo::signalStrength ( ) const

Returns the signal strength, or -1 if the value has not been set.

Definition at line 221 of file qgeosatelliteinfo.cpp.

References QGeoSatelliteInfoPrivate::signal.

◆ swap()

void QGeoSatelliteInfo::swap ( QGeoSatelliteInfo & other)
inlinenoexcept

Definition at line 63 of file qgeosatelliteinfo.h.

References d, and other().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QGeoSatelliteInfo::operator!= ( const QGeoSatelliteInfo & lhs,
const QGeoSatelliteInfo & rhs )
friend

Returns true if any of the parameters of the lhs satellite are not the same as those of rhs.

Otherwise returns false.

Definition at line 69 of file qgeosatelliteinfo.h.

◆ operator<< [1/2]

QDataStream & QGeoSatelliteInfo::operator<< ( QDataStream & stream,
const QGeoSatelliteInfo & info )
friend

Writes the given info to the specified stream.

See also
{Serializing Qt Data Types}

Definition at line 101 of file qgeosatelliteinfo.h.

◆ operator<< [2/2]

QDebug operator<< ( QDebug dbg,
const QGeoSatelliteInfo & info )
friend

Definition at line 94 of file qgeosatelliteinfo.h.

◆ operator==

bool QGeoSatelliteInfo::operator== ( const QGeoSatelliteInfo & lhs,
const QGeoSatelliteInfo & rhs )
friend

Returns true if all the parameters of the lhs satellite are the same as those of rhs.

Otherwise returns false.

Definition at line 65 of file qgeosatelliteinfo.h.

◆ operator>>

QDataStream & QGeoSatelliteInfo::operator>> ( QDataStream & stream,
QGeoSatelliteInfo & info )
friend

Reads satellite information from the specified stream into the given info.

See also
{Serializing Qt Data Types}

Definition at line 105 of file qgeosatelliteinfo.h.

◆ QGeoSatelliteInfoPrivate

friend class QGeoSatelliteInfoPrivate
friend

Definition at line 113 of file qgeosatelliteinfo.h.

Referenced by detach().

◆ qHash

Q_POSITIONING_EXPORT size_t qHash ( const QGeoSatelliteInfo & key,
size_t seed )
friend

Definition at line 380 of file qgeosatelliteinfo.cpp.

◆ QTest::toString

Q_POSITIONING_EXPORT char * QTest::toString ( const QGeoSatelliteInfo & info)
friend

Property Documentation

◆ satelliteIdentifier

int QGeoSatelliteInfo::satelliteIdentifier
read

Definition at line 32 of file qgeosatelliteinfo.h.

◆ satelliteSystem

SatelliteSystem QGeoSatelliteInfo::satelliteSystem
read

Definition at line 31 of file qgeosatelliteinfo.h.

◆ signalStrength

qreal QGeoSatelliteInfo::signalStrength
read

Definition at line 33 of file qgeosatelliteinfo.h.

Referenced by setSignalStrength().


The documentation for this class was generated from the following files: