QMagnetometerReading Class Reference
The QMagnetometerReading class represents one reading from the magnetometer. More...
#include <QMagnetometerReading>
Inherits QSensorReading.
Properties
- calibrationLevel : const qreal
- x : const qreal
- y : const qreal
- z : const qreal
- 1 property inherited from QSensorReading
Public Functions
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 |
- 4 public functions inherited from QSensorReading
Detailed Description
The QMagnetometerReading class represents one reading from the magnetometer.
QMagnetometerReading Units
The magnetometer returns magnetic flux density values along 3 axes. The scale of the values is teslas. The axes are arranged as follows.
The magnetometer can report on either raw magnetic flux values or geomagnetic flux values. By default it returns raw magnetic flux values. The QMagnetometer::returnGeoValues property must be set to return geomagnetic flux values.
The primary difference between raw and geomagnetic values is that extra processing is done to eliminate local magnetic interference from the geomagnetic values so they represent only the effect of the Earth's magnetic field. This process is not perfect and the accuracy of each reading may change.
The image below shows the difference between geomagnetic (on the left) and raw (on the right) readings for a phone that is being subjected to magnetic interference.
The accuracy of each reading 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.