QGeoSatelliteInfo Class

The QGeoSatelliteInfo class contains basic information about a satellite. More...

Header: #include <QGeoSatelliteInfo>
qmake: QT += positioning
Since: Qt 5.2

This class was introduced in Qt 5.2.

Public Types

enum Attribute { Elevation, Azimuth }
enum SatelliteSystem { Undefined, GPS, GLONASS }

Public Functions

QGeoSatelliteInfo(const QGeoSatelliteInfo &other)
QGeoSatelliteInfo()
QGeoSatelliteInfo &operator=(const QGeoSatelliteInfo &other)
~QGeoSatelliteInfo()
qreal attribute(QGeoSatelliteInfo::Attribute attribute) const
bool hasAttribute(QGeoSatelliteInfo::Attribute attribute) const
void removeAttribute(QGeoSatelliteInfo::Attribute attribute)
int satelliteIdentifier() const
QGeoSatelliteInfo::SatelliteSystem satelliteSystem() const
void setAttribute(QGeoSatelliteInfo::Attribute attribute, qreal value)
void setSatelliteIdentifier(int satId)
void setSatelliteSystem(QGeoSatelliteInfo::SatelliteSystem system)
void setSignalStrength(int signalStrength)
int signalStrength() const
bool operator!=(const QGeoSatelliteInfo &other) const
bool operator==(const QGeoSatelliteInfo &other) const
QDataStream &operator<<(QDataStream &stream, const QGeoSatelliteInfo &info)
QDataStream &operator>>(QDataStream &stream, QGeoSatelliteInfo &info)

Detailed Description

See also QGeoSatelliteInfoSource.

Member Type Documentation

enum QGeoSatelliteInfo::Attribute

Defines the attributes for the satellite information.

ConstantValueDescription
QGeoSatelliteInfo::Elevation0The elevation of the satellite, in degrees.
QGeoSatelliteInfo::Azimuth1The azimuth to true north, in degrees.

enum QGeoSatelliteInfo::SatelliteSystem

Defines the GNSS system of the satellite.

ConstantValueDescription
QGeoSatelliteInfo::Undefined0x00Not defined.
QGeoSatelliteInfo::GPS0x01Global Positioning System (USA).
QGeoSatelliteInfo::GLONASS0x02Global Positioning System (Russia).

Member Function Documentation

QGeoSatelliteInfo::QGeoSatelliteInfo(const QGeoSatelliteInfo &other)

Creates a satellite information object with the values of other.

QGeoSatelliteInfo::QGeoSatelliteInfo()

Creates a satellite information object.

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

Assigns the values from other to this object.

QGeoSatelliteInfo::~QGeoSatelliteInfo()

Destroys a satellite information object.

qreal QGeoSatelliteInfo::attribute(QGeoSatelliteInfo::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() and setAttribute().

bool QGeoSatelliteInfo::hasAttribute(QGeoSatelliteInfo::Attribute attribute) const

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

void QGeoSatelliteInfo::removeAttribute(QGeoSatelliteInfo::Attribute attribute)

Removes the specified attribute and its value.

int QGeoSatelliteInfo::satelliteIdentifier() const

Returns the satellite identifier number.

The satellite identifier number can be used to identify a satellite inside the satellite system. For satellite system GPS the satellite identifier number represents the PRN (Pseudo-random noise) number. For satellite system GLONASS the satellite identifier number represents the slot number.

See also setSatelliteIdentifier().

QGeoSatelliteInfo::SatelliteSystem QGeoSatelliteInfo::satelliteSystem() const

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

See also setSatelliteSystem().

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

Sets the value for attribute to value.

See also attribute().

void QGeoSatelliteInfo::setSatelliteIdentifier(int satId)

Sets the satellite identifier number to satId.

The satellite identifier number can be used to identify a satellite inside the satellite system. For satellite system GPS the satellite identifier number represents the PRN (Pseudo-random noise) number. For satellite system GLONASS the satellite identifier number represents the slot number.

See also satelliteIdentifier().

void QGeoSatelliteInfo::setSatelliteSystem(QGeoSatelliteInfo::SatelliteSystem system)

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

See also satelliteSystem().

void QGeoSatelliteInfo::setSignalStrength(int signalStrength)

Sets the signal strength to signalStrength, in decibels.

See also signalStrength().

int QGeoSatelliteInfo::signalStrength() const

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

See also setSignalStrength().

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

Returns true if any of the information for this satellite are not the same as those of other.

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

Returns true if all the information for this satellite are the same as those of other.

Related Non-Members

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

Writes the given info to the specified stream.

See also Serializing Qt Data Types.

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

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

See also Serializing Qt Data Types.

© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.