---
title: CMAttitudeReferenceFrame
framework: coremotion
role: symbol
role_heading: Structure
path: coremotion/cmattitudereferenceframe
---

# CMAttitudeReferenceFrame

Constants that indicate the frame of reference for attitude-related motion data.

## Declaration

```swift
struct CMAttitudeReferenceFrame
```

## Overview

Overview When you start a service that reports the device’s attitude in three-dimensional space, Core Motion establishes a frame of reference for reporting pitch, roll, and yaw values. All subsequent data values specify the device attitude relative to this frame of reference. To get a list of the currently available reference frames for the current device, call the availableAttitudeReferenceFrames() class method. When starting services, it’s your responsibility to specify a reference frame that’s available on the current device. Services that don’t let you specify a reference frame explicitly rely on the value in the attitudeReferenceFrame property of CMMotionManager.

## Topics

### Getting the reference frames

- [xArbitraryZVertical](coremotion/cmattitudereferenceframe/xarbitraryzvertical.md)
- [xArbitraryCorrectedZVertical](coremotion/cmattitudereferenceframe/xarbitrarycorrectedzvertical.md)
- [xMagneticNorthZVertical](coremotion/cmattitudereferenceframe/xmagneticnorthzvertical.md)
- [xTrueNorthZVertical](coremotion/cmattitudereferenceframe/xtruenorthzvertical.md)

### Initializers

- [init(rawValue:)](coremotion/cmattitudereferenceframe/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Device motion

- [Getting processed device-motion data](coremotion/getting-processed-device-motion-data.md)
- [CMDeviceMotion](coremotion/cmdevicemotion.md)
- [CMAttitude](coremotion/cmattitude.md)
- [CMHeadphoneMotionManager](coremotion/cmheadphonemotionmanager.md)
