CMGyroData Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/CoreMotion.framework
Availability
Available in iOS 4.0 and later.
Companion guide
Declared in
CMGyro.h

Overview

An instance of the CMGyroData class contains a single measurement of the device’s rotation rate.

An application receives or samples CMGyroData objects at regular intervals after calling the startGyroUpdatesToQueue:withHandler: method or the startGyroUpdates method of the CMMotionManager class.

Tasks

Getting the Rotation Rate

Properties

rotationRate

The rotation rate as measured by the device’s gyroscope. (read-only)

@property(readonly, nonatomic) CMRotationRate rotationRate
Discussion

This property yields a measurement of the device’s rate of rotation around three axes. Whereas this property gives the raw data from the gyroscope, the identically named property of CMDeviceMotion gives a CMRotationRate structure measuring gyroscope data whose bias has been removed by Core Motion algorithms.

Availability
  • Available in iOS 4.0 and later.
Declared In
CMGyro.h

Constants

CMRotationRate

The type of structures representing a measurement of rotation rate.

typedef struct {
      double x;
      double y;
      double z;
} CMRotationRate
Constants
x

The X-axis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the X axis such that the tip of the thumb points toward positive X, a positive rotation is one toward the tips of the other four fingers.

y

The Y-axis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the Y axis such that the tip of the thumb points toward positive Y, a positive rotation is one toward the tips of the other four fingers.

z

The Z-axis rotation rate in radians per second. The sign follows the right hand rule: If the right hand is wrapped around the Z axis such that the tip of the thumb points toward positive Z, a positive rotation is one toward the tips of the other four fingers.

Availability
  • Available in iOS 4.0 and later.
Declared In
CMGyro.h