Contents

CMAttitude

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

Declaration

class CMAttitude

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 startDeviceMotionUpdates(using:to:withHandler:) method, the startDeviceMotionUpdates(to:withHandler:) method, the startDeviceMotionUpdates(using:) method, or the startDeviceMotionUpdates() method of the CMMotionManager class.

Topics

Getting a Mathematical Representation of Attitude as Euler Angles

Getting a Mathematical Representation of Attitude as a Rotation Matrix

Getting a Mathematical Representation of Attitude as a Quaternion

Obtaining the Change in Attitude

Initializers

See Also

Device motion