QCompassReading Class
QCompassReadingクラスは、コンパスの1つの読み取り値を表します。詳細...
ヘッダー | #include <QCompassReading> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Sensors) target_link_libraries(mytarget PRIVATE Qt6::Sensors) |
qmake: | QT += sensors |
継承: | QSensorReading |
プロパティ
- azimuth : const qreal
- calibrationLevel : const qreal
パブリック機能
qreal | azimuth() const |
qreal | calibrationLevel() const |
void | setAzimuth(qreal azimuth) |
void | setCalibrationLevel(qreal calibrationLevel) |
詳細説明
QCompassReading 単位
コンパスは、QScreen::nativeOrientation で定義されているように、デバイスの上部を基準として時計回りに、磁北からの度としてデバイスの方位を返します。また、デバイスの較正状態を示す値もあります。デバイスが校正されていない場合、方位は正確でない可能性があります。
デジタルコンパスは磁気干渉の影響を受けやすいため、磁力を発するものの近くに置いた場合は校正が必要になることがあります。コンパスの精度は、近くにある鉄材の影響を受けることがあります。
デバイスのキャリブレーションステータスは、0~1の数値で測定されます。1の値は、デバイスがサポートできる最高レベルで、0は最悪です。
プロパティ・ドキュメンテーション
[read-only]
azimuth : const qreal
このプロパティは、デバイスの方位を保持する。
QScreen::nativeOrientation で定義されているように、デバイスの上部を基準として時計回りに、磁北からの度数で測定される。
アクセス関数:
qreal | azimuth() const |
[read-only]
calibrationLevel : const qreal
このプロパティは、読み取り値の較正レベルを保持する。
0~1の値で測定し、値が大きいほど良い。
アクセス関数:
qreal | calibrationLevel() const |
QCompassReading Unitsも参照のこと 。
メンバ関数ドキュメント
void QCompassReading::setAzimuth(qreal azimuth)
デバイスのazimuth を設定する。
azimuth() およびQCompassReading Unitsも参照のこと 。
void QCompassReading::setCalibrationLevel(qreal calibrationLevel)
読み取り値の校正レベルをcalibrationLevel に設定する。
calibrationLevel()も参照 。
© 2025 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.