Home · All Classes · All Functions ·

QCompassReading Class Reference

The QCompassReading class represents one reading from a compass. More...

    #include <QCompassReading>

This class is under development and is subject to change.

Inherits QSensorReading.


Public Types

enum CalibrationLevel { Undefined, Low, Middle, High }

Properties


Public Functions

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

Additional Inherited Members


Detailed Description

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.


Member Type Documentation

enum QCompassReading::CalibrationLevel

ConstantValueDescription
QCompassReading::Undefined0The calibration level is not defined or is too low.
QCompassReading::Low1The reported azimuth may be off by up to 15.4 degrees.
QCompassReading::Middle2The reported azimuth may be off by up to 11.8 degrees.
QCompassReading::High3The reported azimuth may be off by up to 7.4 degrees.


Property Documentation

azimuth : const qreal

This property holds the azimuth of the device.

Access functions:

qreal azimuth () const

calibrationLevel : const CalibrationLevel

This property holds the calibration level of the reading.

The higher the calibration, the more accurate the measurement is.

Access functions:

CalibrationLevel calibrationLevel () const

Member Function Documentation

void QCompassReading::setAzimuth ( qreal azimuth )

Sets the azimuth of the device.

See also azimuth().

void QCompassReading::setCalibrationLevel ( CalibrationLevel calibrationLevel )

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