# CoreMotionAttitude

The attitude of the device.

Availability
3.3.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Properties

# pitch READONLY

Availability
3.3.0
pitch :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 READONLY

Availability
3.3.0
quaternion :CoreMotionQuaternion

Returns a quaternion representing the device's attitude.

See CoreMotionQuaternion for further information.


# roll READONLY

Availability
3.3.0
roll :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 READONLY

Availability
3.3.0
rotationMatrix :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 READONLY

Availability
3.3.0
yaw :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

Availability
3.3.0
multiplyByInverseOfAttitude(attitude) void

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

Name Type Description
attitude CoreMotionAttitude

An object representing the device's attitude at a given moment of measurement.

Returns

Type
void