AccelerometerReading.Acceleration Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the acceleration vector of the device, in gravitational units.

Namespace:  Microsoft.Devices.Sensors
Assembly:  Microsoft.Devices.Sensors (in Microsoft.Devices.Sensors.dll)

Syntax

Public Property Acceleration As Vector3
public Vector3 Acceleration { get; internal set; }

Property Value

Type: Vector3
The acceleration of the device.

Remarks

The acceleration value is expressed as a 3-dimensional vector representing the acceleration components in the X, Y, and Z axes in gravitational units. The orientation of the acceleration is relative to the device such that -1g is applied in the Z-axis when the device is face up on a level table and -1g is applied to the Y-axis when the device is placed perpendicular to the table top.

The accelerometer sensor will detect the force of gravity along with any forces resulting from the movement of the phone. The MotionReading class uses multiple device sensors to separate the gravity vector from the device acceleration and allows you to easily determine the current attitude (yaw, pitch, and roll) of the device.

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

See Also

Reference

AccelerometerReading Structure

Microsoft.Devices.Sensors Namespace