This topic has not yet been rated - Rate this topic

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.

Namespace:  Microsoft.Devices.Sensors
Assembly:  Microsoft.Devices.Sensors (in Microsoft.Devices.Sensors.dll)
public struct CompassReading : ISensorReading

The CompassReading type exposes the following members.

  NameDescription
Public propertyHeadingAccuracyGets the accuracy, in degrees, of the compass heading readings.
Public propertyMagneticHeadingGets the heading, in degrees, measured clockwise from the Earth’s magnetic north.
Public propertyMagnetometerReadingGets the raw magnetometer reading in microteslas.
Public propertyTimestampGets 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.
Public propertyTrueHeadingGets the heading, in degrees, measured clockwise from the Earth’s geographic north.
Top
  NameDescription
Public methodEquals (Inherited from ValueType.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from ValueType.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from ValueType.)
Top

To obtain a CompassReading object, create a Compass object and then use the CurrentValue property or implement a handler for the CurrentValueChanged event.

Windows Phone OS

Supported in: 7.1

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.