user1463853 user1463853 - 1 year ago 141
iOS Question

Difference between CMAccelerometerData and CMDeviceMotion

Can someone explain the difference between


It seems to me like the acceleration values of
are raw values, as the data of
is somehow interpolated, or something like that.

Answer Source

An instance of the CMAccelerometerData class represents an accelerometer event. It is a measurement of acceleration along the three spatial axes at a moment of time.

An instance of CMDeviceMotion encapsulates measurements of the attitude, rotation rate, and acceleration of a device.

The difference is that CMDeviceMotion incorporates the gyroscope, accelerometer and compass data where CMAccelerometerData only contains the raw accelerometer data.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download