Post

Replies

Boosts

Views

Activity

Core motion attitude reference frame
I am working on an iOS application that relies on CoreMotion Attitude, and I need clarification regarding the behavior of reference frames. According to the documentation, when setting the attitude reference frame to CMAttitudeReferenceFrameXTrueNorthZVertical: The Z-axis of the reference frame is vertical (aligned with gravity). The X-axis of the reference frame points to the geographic North Pole (True North). When a device’s orientation matches this reference frame, the roll, pitch, and yaw values reported by CMAttitude should be (0,0,0). However, in my testing: When I align the device’s position with the CMAttitudeReferenceFrameXTrueNorthZVertical reference frame by orienting the screen (device Z-axis) upward and the right side (device X-axis) toward north, the yaw value reported by CMAttitude is 90 degrees instead of the expected 0 degrees. To have CMAttitude report yaw as 0, I must instead orient the top side (device Y-axis) toward north. This seems to contradict my understanding that the X-axis of the device should be aligned with True North, to have the device match the attitude reference frame and have roll, pitch, and yaw values reported by CMAttitude should be (0,0,0). What I'm missing? Thank you for your time and assistance.
1
0
165
3w