内容表

上一话题

QCompassFilter

下一话题

QDistanceFilter

QCompassReading

QCompassReading class represents one reading from a compass. 更多

Inheritance diagram of PySide2.QtSensors.QCompassReading

概要

函数

详细描述

QCompassReading 单位

The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the device, as defined by nativeOrientation . There is also a value to indicate the calibration status of the device. If the device is not calibrated the azimuth may not be accurate.

Digital compasses are susceptible to magnetic interference and may need calibration after being placed near anything that emits a magnetic force. Accuracy of the compass can be affected by any ferrous materials that are nearby.

The calibration status of the device is measured as a number from 0 to 1. A value of 1 is the highest level that the device can support and 0 is the worst.

class QCompassReading ( parent )
参数

parent QObject

PySide2.QtSensors.QCompassReading. azimuth ( )
返回类型

qreal

另请参阅

setAzimuth()

PySide2.QtSensors.QCompassReading. calibrationLevel ( )
返回类型

qreal

PySide2.QtSensors.QCompassReading. setAzimuth ( azimuth )
参数

azimuth qreal

设置 azimuth 为设备。

另请参阅

azimuth() QCompassReading Units

PySide2.QtSensors.QCompassReading. setCalibrationLevel ( calibrationLevel )
参数

calibrationLevel qreal

将读取的校准级别设为 calibrationLevel .