Skip to content

Modules.CoreMotion.CoreMotionAttitude

The attitude of the device.

Since: 3.3.0 · Platforms: iphone, ipad

Properties #

pitch#

Type: Number

The pitch of the device, in radians.

A pitch is a rotation around a lateral axis that passes through
the device from side to side.

quaternion#

Type: CoreMotionQuaternion

Returns a quaternion representing the device's attitude.

See <CoreMotionQuaternion> for further information.

roll#

Type: Number

The roll of the device, in radians.

A roll is a rotation around a longitudinal axis that passes
through the device from its top to bottom.

rotationMatrix#

Type: CoreMotionRotationMatrix

Returns a rotation matrix representing the device's attitude.

A rotation matrix in linear algebra describes the rotation of a
body in three-dimensional Euclidean space.

yaw#

Type: Number

The yaw of the device, in radians.

A yaw is a rotation around an axis that runs vertically through
the device. It is perpendicular to the body of the device, with
its origin at the center of gravity and directed toward the bottom
of the device.

Methods #

multiplyByInverseOfAttitude #

Yields the change in attitude given a specific attitude.

This method multiplies the inverse of the specified <CoreMotionAttitude>
object by the attitude represented by the receiving object. It replaces
the receiving instance with the attitude change relative to the object
passed in attitude. You should cache the <CoreMotionAttitude> instance
you want to use as a reference and pass that object as the argument to
subsequent calls of this method.

Parameters:
NameTypeSummaryOptional
attitudeCoreMotionAttitudeAn object representing the device's attitude at a given moment of measurement.No

Titanium SDK Documentation