Search code examples
ioscore-motion

What's the difference between rotation rate and attitude?


What is the difference between CMRotationRate and CMAttitude? In the documentation I did not find any useful definition. https://developer.apple.com/reference/coremotion/cmrotationrate and https://developer.apple.com/reference/coremotion/cmattitude.

What do these properties say about the motion of the device?

What are the physical units, the values are represented?


Solution

  • Not code specific, but terms in general (and seem to apply here):

    Rotation rate means the rate of turn in reference of an object's axis. Hence the x,y and z properties. So what it means that if the rotation rate is for example y=1 (radians or degrees per second), the attitude of the object changes.

    Attitude means the position of the object, described over three axis: x,y and z. Attitude itself does not necessarily imply movement. The object can be still with any attitude.

    So, the main difference: Rotation rate describes the change of attitude. Hope this gives at least a little help.