QGeoSatelliteInfo 类包含卫星的有关基本信息。 更多...
| 头: |
#include <QGeoSatelliteInfo>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Positioning)
target_link_libraries(mytarget PRIVATE Qt6::Positioning)
|
| qmake: |
QT += positioning
|
| enum | 属性 { Elevation, Azimuth } |
| enum | SatelliteSystem { Undefined, GPS, GLONASS, GALILEO, BEIDOU, …, CustomType } |
| QGeoSatelliteInfo () | |
| QGeoSatelliteInfo (const QGeoSatelliteInfo & other ) | |
(从 6.2 起)
|
QGeoSatelliteInfo (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 |
(从 6.2 起)
void
|
swap (QGeoSatelliteInfo & other ) |
(从 6.2 起)
QGeoSatelliteInfo &
|
operator= (QGeoSatelliteInfo && other ) |
| QGeoSatelliteInfo & | operator= (const QGeoSatelliteInfo & other ) |
| bool | operator!= (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs ) |
| QDataStream & | operator<< (QDataStream & stream , const QGeoSatelliteInfo & info ) |
| bool | operator== (const QGeoSatelliteInfo & lhs , const QGeoSatelliteInfo & rhs ) |
| QDataStream & | operator>> (QDataStream & stream , QGeoSatelliteInfo & info ) |
另请参阅 QGeoSatelliteInfoSource .
定义用于卫星信息的属性。
| 常量 | 值 | 描述 |
|---|---|---|
QGeoSatelliteInfo::Elevation
|
0
|
卫星仰角 (以度为单位)。 |
QGeoSatelliteInfo::Azimuth
|
1
|
正北方位角 (以度为单位)。 |
定义卫星的 GNSS 系统。
| 常量 | 值 | 描述 |
|---|---|---|
QGeoSatelliteInfo::Undefined
|
0x00
|
未定义。 |
QGeoSatelliteInfo::GPS
|
0x01
|
全球定位系统 (USA 美国)。 |
QGeoSatelliteInfo::GLONASS
|
0x02
|
全球定位系统 (俄罗斯)。 |
QGeoSatelliteInfo::GALILEO
|
0x03
|
全球导航卫星系统 (EU 欧盟)。 |
QGeoSatelliteInfo::BEIDOU
|
0x04
|
北斗导航卫星系统 (中国)。 |
QGeoSatelliteInfo::QZSS
|
0x05
|
准天顶卫星系统 (日本)。 |
QGeoSatelliteInfo::Multiple
|
0xFF
|
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. |
QGeoSatelliteInfo::CustomType
|
0x100
|
The first type that can be used for user purposes. For example when reimplementing NMEA data parsing in
QNmeaSatelliteInfoSource
. User can add more types using
CustomType + 1
,
CustomType + 2
and so on.
|
[read-only]
satelliteIdentifier
: const
int
This property holds 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.
例如,若 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 satellite IDs list to check the ID ranges for different satellite systems.
注意: 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 satelliteSystem () must be used.
访问函数:
| int | satelliteIdentifier () const |
[read-only]
satelliteSystem
: const
SatelliteSystem
This property holds the satellite system in use, such as GPS or GLONASS.
访问函数:
| QGeoSatelliteInfo::SatelliteSystem | satelliteSystem () const |
[read-only]
signalStrength
: const
qreal
This property holds the signal strength.
访问函数:
| int | signalStrength () const |
创建卫星信息对象。
创建卫星信息对象采用值为 other .
[noexcept, since 6.2]
QGeoSatelliteInfo::
QGeoSatelliteInfo
(
QGeoSatelliteInfo
&&
other
)
创建卫星信息对象通过移动自 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.
该函数在 Qt 6.2 引入。
[noexcept]
QGeoSatelliteInfo::
~QGeoSatelliteInfo
()
销毁卫星信息对象。
[invokable]
qreal
QGeoSatelliteInfo::
属性
(
QGeoSatelliteInfo::Attribute
attribute
) const
返回值为指定 attribute 如 qreal 值。
返回 -1 若值未设置。
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
另请参阅 hasAttribute () 和 setAttribute ().
[invokable]
bool
QGeoSatelliteInfo::
hasAttribute
(
QGeoSatelliteInfo::Attribute
attribute
) const
返回 true 若指定 attribute 呈现在此更新中。
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
移除指定 attribute 及其值。
返回卫星标识符编号。
注意: getter 函数对于特性 satelliteIdentifier。
另请参阅 setSatelliteIdentifier () 和 satelliteSystem ().
返回卫星系统 (GPS、GLONASS...)
注意: 此值可以一起用于 satelliteIdentifier () 以唯一标识卫星。
注意: getter 函数对于特性 satelliteSystem。
另请参阅 setSatelliteSystem () 和 satelliteIdentifier ().
设置值为 attribute to value .
另请参阅 attribute ().
将卫星标识编号设为 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.
例如,若 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.
另请参阅 satelliteIdentifier ().
设置卫星系统 (GPS、GLONASS...) 为 system .
另请参阅 satelliteSystem ().
将信号强度设为 signalStrength (以分贝为单位)。
另请参阅 signalStrength ().
Returns the signal strength, or -1 if the value has not been set.
注意: getter 函数对于特性 signalStrength。
另请参阅 setSignalStrength ().
[noexcept, since 6.2]
void
QGeoSatelliteInfo::
swap
(
QGeoSatelliteInfo
&
other
)
Swaps this satellite information with other 。此操作非常快且从不失败。
该函数在 Qt 6.2 引入。
[noexcept, since 6.2]
QGeoSatelliteInfo
&QGeoSatelliteInfo::
operator=
(
QGeoSatelliteInfo
&&
other
)
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.
该函数在 Qt 6.2 引入。
赋值值从 other 到此对象。
返回
true
if any of the parameters of the
lhs
satellite are not the same as those of
rhs
. Otherwise returns
false
.
写入给定 info 到指定 stream .
另请参阅 序列化 Qt 数据类型 .
返回
true
if all the parameters of the
lhs
satellite are the same as those of
rhs
. Otherwise returns
false
.
Reads satellite information from the specified stream 进给定 info .
另请参阅 序列化 Qt 数据类型 .