Orientation Examples

This API provides the user with updates describing the attitude (angular orientation) of a mobile device.

Orientation gestures are measured in degrees using Tait-Bryan anlges. The angles are called yaw, pitch, and roll and are illustrated below.

To interpret the Tait-Bryan angles, the device is first rotated in the yaw direction, followed by the pitch direction, and then by the roll direction.

Adtile Orientation

Yaw

The value is reported between 0 and 360 degrees. This value depends on the absolute option passed to the constructor. When Orientation is not absolute, the yaw is 0 degrees when its heading direction is the same as its initial heading.

For absolute heading, the yaw angle is 0 degrees when the device's y-axis is pointing north.

Adtile Yaw Image

Pitch

Values are between -180 and +180 degrees and report 0 when the device is face-up and the y-axis of the device is perpendicular to the direction of gravity.

Adtile Pitch Image

Roll

Values are between -90 and +90 degrees and report 0 when the device is face-up and the x-axis of the device is perpendicular to the direction of gravity.

Adtile Roll Image