MagnetometerReading MagnetometerReading MagnetometerReading MagnetometerReading Class

Definition

Represents a magnetometer reading.

public : sealed class MagnetometerReading : IMagnetometerReadingpublic sealed class MagnetometerReading : IMagnetometerReadingPublic NotInheritable Class MagnetometerReading Implements IMagnetometerReading// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

This object is accessed when you invoke the GetCurrentReading method; and, it is accessed when you retrieve the Reading property of the MagnetometerReadingChangedEventArgs object in the event callback method.

Properties

DirectionalAccuracy DirectionalAccuracy DirectionalAccuracy DirectionalAccuracy

Gets the magnetometer's directional accuracy.

public : MagnetometerAccuracy DirectionalAccuracy { get; }public MagnetometerAccuracy DirectionalAccuracy { get; }Public ReadOnly Property DirectionalAccuracy As MagnetometerAccuracy// You can use this property in JavaScript.

MagneticFieldX MagneticFieldX MagneticFieldX MagneticFieldX

Gets the magnetic field strength in microteslas along the X axis.

public : float MagneticFieldX { get; }public float MagneticFieldX { get; }Public ReadOnly Property MagneticFieldX As float// You can use this property in JavaScript.
Value
float float float float

The magnetic field strength in microteslas along the X axis.

Remarks

The accuracy of this value depends on the state of magnetometer calibration reflected in the DirectionalAccuracy property.

MagneticFieldY MagneticFieldY MagneticFieldY MagneticFieldY

Gets the magnetic field strength in microteslas along the Y axis.

public : float MagneticFieldY { get; }public float MagneticFieldY { get; }Public ReadOnly Property MagneticFieldY As float// You can use this property in JavaScript.
Value
float float float float

The magnetic field strength in microteslas along the Y axis.

Remarks

The accuracy of this value depends on the state of magnetometer calibration reflected in the DirectionalAccuracy property.

MagneticFieldZ MagneticFieldZ MagneticFieldZ MagneticFieldZ

Gets the magnetic field strength in microteslas along the Z axis.

public : float MagneticFieldZ { get; }public float MagneticFieldZ { get; }Public ReadOnly Property MagneticFieldZ As float// You can use this property in JavaScript.
Value
float float float float

The magnetic field strength in microteslas along the Z axis.

Remarks

The accuracy of this value depends on the state of magnetometer calibration reflected in the DirectionalAccuracy property.

PerformanceCount PerformanceCount PerformanceCount PerformanceCount

Gets the performance count associated with the reading. This allows the reading to be synchronized with other devices and processes on the system.

public : IReference<TimeSpan> PerformanceCount { get; }public Nullable<TimeSpan> PerformanceCount { get; }Public ReadOnly Property PerformanceCount As Nullable<TimeSpan>// You can use this property in JavaScript.
Value
IReference<TimeSpan> Nullable<TimeSpan> Nullable<TimeSpan> Nullable<TimeSpan>

The performance count for the reading. Null if this property is not supported on the sensor.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Properties Properties Properties Properties

Gets the data properties reported by the sensor.

public : IMapView<string, object> Properties { get; }public IReadOnlyDictionary<string, object> Properties { get; }Public ReadOnly Property Properties As IReadOnlyDictionary<string, object>// You can use this property in JavaScript.
Value
IMapView<PlatForm::String, PlatForm::Object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object> IReadOnlyDictionary<string, object>

Contains a key/value pair for each data property reported by the sensor for the given reading. The key is a string of the property key, and the value is the value of the property that the key represents.

Additional features and requirements
Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)

Timestamp Timestamp Timestamp Timestamp

Gets the time at which the sensor reported the reading.

public : DateTime Timestamp { get; }public DateTimeOffset Timestamp { get; }Public ReadOnly Property Timestamp As DateTimeOffset// You can use this property in JavaScript.
Value
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The time at which the sensor reported the reading.