Signals | Public Member Functions | Properties

MeeGo::QmCompass Class Reference

Provides logical compass sensor. More...

#include <qmcompass.h>

Inheritance diagram for MeeGo::QmCompass:
Inheritance graph
[legend]
Collaboration diagram for MeeGo::QmCompass:
Collaboration graph
[legend]

List of all members.

Signals

void dataAvailable (const MeeGo::QmCompassReading value)

Public Member Functions

 QmCompass (QObject *parent=0)
 ~QmCompass ()
QmCompassReading get ()
int declinationValue ()
bool useDeclination ()
void setUseDeclination (bool enable)

Properties

QmCompassReading value
bool usedeclination
int declinationvalue

Detailed Description

Provides logical compass sensor.

Scope:
Internal

Logical compass sensor uses magnetometer and accelerometer to measure current north angle.

To get meaningful direction from the compass, it must be calibrated. Calibration level varies from 0 to 3. Only measurements at level 3 are accurate. Calibration is done by rotating the device around each axis simultaneously. Rotating one's wrist for 2-3 rounds with the device in hand usually is enough. Fast changes in the magnetic environment may cause the calibration level to drop.

To get measurements and change sensor settings, the client must open a session (and call start() for data). Details can be found from documentation of QmSensor.

Definition at line 71 of file qmcompass.h.


Constructor & Destructor Documentation

MeeGo::QmCompass::QmCompass ( QObject *  parent = 0  ) 

Constructor

Parameters:
parent Parent object
MeeGo::QmCompass::~QmCompass (  ) 

Destructor


Member Function Documentation

void MeeGo::QmCompass::dataAvailable ( const MeeGo::QmCompassReading  value  )  [signal]

Signal to notify the listener about change of compass direction, or calibration level.

Parameters:
value Current compass measurement
int MeeGo::QmCompass::declinationValue (  ) 

Returns the currently used declination correction value.

Returns:
Current declination value
QmCompassReading MeeGo::QmCompass::get (  ) 

Returns the previous measured compass value.

Returns:
Most recently measured compass value
void MeeGo::QmCompass::setUseDeclination ( bool  enable  ) 

Sets whether the declination correction should be applied or not.

Parameters:
enable If true, declination correction will be applied, if false, it will not be applied
bool MeeGo::QmCompass::useDeclination (  ) 

Returns whether the sensor is applying declination correction to the output value and returning true north, or not applying it and returning magnetic north.

Returns:
True if decliation correction is applied, false otherwise

Property Documentation

int MeeGo::QmCompass::declinationvalue [read]

Definition at line 75 of file qmcompass.h.

bool MeeGo::QmCompass::usedeclination [read, write]

Definition at line 74 of file qmcompass.h.

QmCompassReading MeeGo::QmCompass::value [read]

Definition at line 73 of file qmcompass.h.


The documentation for this class was generated from the following file: