Enumeration

CMAttitudeReferenceFrame

Enum constants for indicating the reference frames from which all attitude samples are referenced.

Declaration

typedef enum CMAttitudeReferenceFrame : NSUInteger {
    ...
} CMAttitudeReferenceFrame;

Overview

Constants of this data type are returned or referenced by the attitudeReferenceFrame property and the startDeviceMotionUpdatesUsingReferenceFrame:toQueue:withHandler: and startDeviceMotionUpdatesUsingReferenceFrame: methods of the CMMotionManager class. A bitmask of these constants is returned by the availableAttitudeReferenceFrames class method.

Topics

Constants

CMAttitudeReferenceFrameXArbitraryZVertical

Describes a reference frame in which the Z axis is vertical and the X axis points in an arbitrary direction in the horizontal plane.

CMAttitudeReferenceFrameXArbitraryCorrectedZVertical

Describes the same reference frame as CMAttitudeReferenceFrameXArbitraryZVertical except that the magnetometer, when available and calibrated, is used to improve long-term yaw accuracy. Using this constant instead of CMAttitudeReferenceFrameXArbitraryZVertical results in increased CPU usage.

CMAttitudeReferenceFrameXMagneticNorthZVertical

Describes a reference frame in which the Z axis is vertical and the X axis points toward magnetic north. Note that using this reference frame may require device movement to calibrate the magnetometer.

CMAttitudeReferenceFrameXTrueNorthZVertical

Describes a reference frame in which the Z axis is vertical and the X axis points toward true north. Note that using this reference frame may require device movement to calibrate the magnetometer. It also requires the location to be available in order to calculate the difference between magnetic and true north.

See Also

Accessing Attitude Reference Frames

attitudeReferenceFrame

Returns either the reference frame currently being used or the default attitude reference frame.

+ availableAttitudeReferenceFrames

Returns a bitmask specifying the available attitude reference frames on the device.