简体   繁体   中英

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?

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.

Without looking at the specific framework you're using, rotation rate describes a change in orientation. It will be expressed in degrees (or radians) per second for each axis.

Attitude, on the other hand, is the orientation of the phone at a moment in time. It will be a fixed value in degrees (or radians). Again, probably with a value for each axis.

If you are facing due east, and are flat and level, that's your attitude at an instant in time.

If your rotation rate is zero, you'll be at the same attitude 5 minutes later.

If on the other hand you're rotating 30°/second in yaw, then 5 minutes later you will have completed 25 revolutions, and have a different attitude. (In fact you'll probably have a pretty bad attitude because you'll be dizzy and nauseous. (grin).)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM