Class

CMAttitude

The device’s orientation relative to a known frame of reference at a point in time.

Declaration

@interface CMAttitude : NSObject

Overview

The CMAttitude class offers three different mathematical representations of attitude: a rotation matrix, a quaternion, and Euler angles (roll, pitch, and yaw values). You access CMAttitude objects through the attitude property of each CMDeviceMotion objects passed to an application. An application starts receiving these device-motion objects as a result of calling the startDeviceMotionUpdatesUsingReferenceFrame:toQueue:withHandler: method, the startDeviceMotionUpdatesToQueue:withHandler: method, the startDeviceMotionUpdatesUsingReferenceFrame: method, or the startDeviceMotionUpdates method of the CMMotionManager class.

Topics

Getting a Mathematical Representation of Attitude as Euler Angles

roll

The roll of the device, in radians.

pitch

The pitch of the device, in radians.

yaw

The yaw of the device, in radians.

Getting a Mathematical Representation of Attitude as a Rotation Matrix

rotationMatrix

Returns a rotation matrix representing the device's attitude.

CMRotationMatrix

The type of a structure representing a rotation matrix.

Getting a Mathematical Representation of Attitude as a Quaternion

quaternion

Returns a quaternion representing the device's attitude.

CMQuaternion

The type for a quaternion representing a measurement of attitude.

Obtaining the Change in Attitude

- multiplyByInverseOfAttitude:

Yields the change in attitude given a specific attitude.

Relationships

Inherits From

See Also

Device Motion

Getting Processed Device-Motion Data

Retrieve data that has already been processed to remove environmental bias, such as the effects of gravity.

CMDeviceMotion

Encapsulated measurements of the attitude, rotation rate, and acceleration of a device.