CompassReading Structure
July 26, 2012
Contains information about the magnetic field detected by the device’s compass sensor, which can be used to determine the orientation of the device relative to the Earth’s magnetic field.
Assembly: Microsoft.Devices.Sensors (in Microsoft.Devices.Sensors.dll)
The CompassReading type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | HeadingAccuracy | Gets the accuracy, in degrees, of the compass heading readings. |
![]() | MagneticHeading | Gets the heading, in degrees, measured clockwise from the Earth’s magnetic north. |
![]() | MagnetometerReading | Gets the raw magnetometer reading in microteslas. |
![]() | Timestamp | Gets a timestamp indicating the time at which the compass reading was taken. This can be used to correlate readings across sensors and provide additional input to algorithms that process raw sensor data. |
![]() | TrueHeading | Gets the heading, in degrees, measured clockwise from the Earth’s geographic north. |
To obtain a CompassReading object, create a Compass object and then use the CurrentValue property or implement a handler for the CurrentValueChanged event.
