이 페이지에서

QCompassReading Class

QCompassReading 클래스는 나침반에서 얻은 하나의 측정값을 나타냅니다. 더 보기...

헤더: #include <QCompassReading>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
상속: QSensorReading

속성

공개 함수

qreal azimuth() const
qreal calibrationLevel() const
void setAzimuth(qreal azimuth)
void setCalibrationLevel(qreal calibrationLevel)

상세 설명

QCompassReading Units

이 나침반은 QScreen::nativeOrientation 에 정의된 대로, 기기의 상단을 기준으로 자북을 원점으로 하여 시계 방향으로 기기의 방위각을 도(°) 단위로 반환합니다. 또한 기기의 보정 상태를 나타내는 값도 제공됩니다. 기기가 보정되지 않은 경우 방위각이 정확하지 않을 수 있습니다.

디지털 나침반은 자기 간섭에 취약하므로, 자기력을 방출하는 물체 근처에 두었다가 다시 위치시킬 경우 보정이 필요할 수 있습니다. 주변에 있는 철계 물질은 나침반의 정확도에 영향을 미칠 수 있습니다.

기기의 보정 상태는 0에서 1 사이의 숫자로 측정됩니다. 1은 기기가 지원할 수 있는 최고 수준이며, 0은 최악의 상태입니다.

속성 설명서

[read-only] azimuth : qreal

이 속성은 장치의 방위각을 나타냅니다.

QScreen::nativeOrientation 에 정의된 바와 같이, 기기의 상단을 기준으로 자북을 출발점으로 하여 시계 방향으로 도(°) 단위로 측정됩니다.

액세스 함수:

qreal azimuth() const

QCompassReading Units도 참조하십시오 .

[read-only] calibrationLevel : qreal

이 속성은 측정값의 보정 수준을 나타냅니다.

0에서 1 사이의 값으로 측정되며, 값이 높을수록 더 좋은 상태를 나타냅니다.

액세스 함수:

qreal calibrationLevel() const

QCompassReading Units도 참조하십시오 .

멤버 함수 설명서

void QCompassReading::setAzimuth(qreal azimuth)

장치의 azimuth 를 설정합니다.

azimuth() 및 QCompassReading Units도 참조하십시오 .

void QCompassReading::setCalibrationLevel(qreal calibrationLevel)

측정값의 보정 수준을 calibrationLevel 로 설정합니다.

calibrationLevel()도 참조하십시오 .

© 2026 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.