Acceleration Property
Collapse the table of content
Expand the table of content

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)

'Declaration
Public Property Acceleration As Vector3

Property Value

Type: Vector3
The acceleration of the device.

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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft