![]() |
Home · All Classes · All Functions · | ![]() |
The QCompassReading class represents one reading from a compass. More...
#include <QCompassReading>
This class is under development and is subject to change.
Inherits QSensorReading.
enum | CalibrationLevel { Undefined, Low, Middle, High } |
qreal | azimuth () const |
CalibrationLevel | calibrationLevel () const |
void | setAzimuth ( qreal azimuth ) |
void | setCalibrationLevel ( CalibrationLevel calibrationLevel ) |
The QCompassReading class represents one reading from a compass.
The compass returns the azimuth of the device as degrees from magnetic north in a clockwise direction based on the top of the device. Note that the top of the device is a fixed point and may not represent the orientation that the user is holding the device in. 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.
Constant | Value | Description |
---|---|---|
QCompassReading::Undefined | 0 | The calibration level is not defined or is too low. |
QCompassReading::Low | 1 | The reported azimuth may be off by up to 15.4 degrees. |
QCompassReading::Middle | 2 | The reported azimuth may be off by up to 11.8 degrees. |
QCompassReading::High | 3 | The reported azimuth may be off by up to 7.4 degrees. |
This property holds the azimuth of the device.
Access functions:
qreal | azimuth () const |
This property holds the calibration level of the reading.
The higher the calibration, the more accurate the measurement is.
Access functions:
CalibrationLevel | calibrationLevel () const |
Sets the azimuth of the device.
See also azimuth().
Sets the calibration level of the reading to calibrationLevel.
See also calibrationLevel().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) | Trademarks | Qt Mobility Project 1.0.0 |