# CoreMotionAttitude
The attitude of the device.
NOTE
This is an abstract type. Any object of this structure can be used where this type is used.
# Properties
# pitch READONLY
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
Returns a quaternion representing the device's attitude.
See CoreMotionQuaternion for further information.
# roll READONLY
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
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
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
Name | Type | Description |
---|---|---|
attitude | CoreMotionAttitude | An object representing the device's attitude at a given moment of measurement. |
Returns
- Type
- void