QMagnetometerReading Class

QMagnetometerReading 클래스는 자력계에서 하나의 판독값을 나타냅니다. 더 보기...

Header: #include <QMagnetometerReading>
CMake: find_package(Qt6 REQUIRED COMPONENTS Sensors)
target_link_libraries(mytarget PRIVATE Qt6::Sensors)
qmake: QT += sensors
상속합니다: QSensorReading

속성

공공 기능

qreal calibrationLevel() const
void setCalibrationLevel(qreal calibrationLevel)
void setX(qreal x)
void setY(qreal y)
void setZ(qreal z)
qreal x() const
qreal y() const
qreal z() const

상세 설명

Q자력계판독 단위

자력계는 3개의 축을 따라 자속 밀도 값을 반환합니다. 값의 눈금은 테슬라 단위입니다. 축은 다음과 같이 배열되어 있습니다.

자력계는 원시 자속 값 또는 지자기 자속 값을 보고할 수 있습니다. 기본적으로 원시 자속 값을 반환합니다. 지자기 자속 값을 반환하려면 QMagnetometer::returnGeoValues 속성을 설정해야 합니다.

원시 자속 값과 지자기 값의 주요 차이점은 지자기 값에서 국부적인 자기 간섭을 제거하여 지구 자기장의 영향만 나타내도록 추가 처리를 수행한다는 것입니다. 이 과정은 완벽하지 않으며 각 측정값의 정확도가 달라질 수 있습니다.

아래 이미지는 자기 간섭을 받는 휴대폰의 지자기(왼쪽)와 원시(오른쪽) 판독값의 차이를 보여줍니다.

각 측정값의 정확도는 0에서 1 사이의 숫자로 측정됩니다. 1은 디바이스가 지원할 수 있는 최고 수준이고 0은 가장 낮은 수준입니다.

보정

디바이스에서 낮은 정확도를 보고하는 경우 허용 가능한 측정값을 제공하기 전에 보정이 필요할 수 있습니다. 기본 보정은 일반적으로 디바이스를 8자 모양으로 회전하거나 디바이스의 세 축을 따라 각각 회전하는 방식으로 수행할 수 있습니다. 자세한 내용은 자기 센서 보정 방법에 대한 디바이스의 설명서를 참조하세요.

속성 문서

[read-only] calibrationLevel : const qreal

이 속성은 판독의 정확도를 나타냅니다.

0에서 1 사이의 값으로 측정되며 값이 클수록 정확도가 높습니다.

이 속성은 지자기 자속 밀도를 측정할 때만 변경된다는 점에 유의하세요. 원시 자속 판독값은 항상 1입니다.

함수에 액세스합니다:

qreal calibrationLevel() const

QMagnetometerReading UnitsCalibration참조하세요 .

[read-only] x : const qreal

이 프로퍼티는 X축의 원시 자속 밀도를 보유합니다.

테슬라로 측정됩니다.

함수에 액세스합니다:

qreal x() const

QMagnetometerReading Units참조하세요 .

[read-only] y : const qreal

이 프로퍼티는 Y축의 원시 자속 밀도를 보유합니다.

테슬라로 측정됩니다.

함수에 액세스합니다:

qreal y() const

QMagnetometerReading Units참조하세요 .

[read-only] z : const qreal

이 프로퍼티는 Z축의 원시 자속 밀도를 보유합니다.

테슬라로 측정됩니다.

함수에 액세스합니다:

qreal z() const

QMagnetometerReading Units참조하세요 .

멤버 함수 문서

void QMagnetometerReading::setCalibrationLevel(qreal calibrationLevel)

판독값의 정확도를 calibrationLevel 로 설정합니다.

calibrationLevel()도 참조하세요 .

void QMagnetometerReading::setX(qreal x)

X축의 원시 자속 밀도를 x 로 설정합니다.

x()도 참조하세요 .

void QMagnetometerReading::setY(qreal y)

Y축의 원시 자속 밀도를 y 로 설정합니다.

y()도 참조하세요 .

void QMagnetometerReading::setZ(qreal z)

Z축의 원시 자속 밀도를 z 로 설정합니다.

z()도 참조하세요 .

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