What is the Z axis in CMAttitudeReferenceFrameXArbitraryZVertical, and has the X axis changed according to user movement?

I use the main movement to get device movements that start the project on iPod touch 3. The CMAttitudeReferenceFrame used in my method is (void) startDeviceMotionUpdatesUsingReferenceFrame: (CMAttitudeReferenceFrame) referenceFrame toQueue: (NSOperationQueue *) queue with a handler Handler: (CMDlerTermferenceFrom According to the documentation, it describes a reference frame in which the Z axis is vertical and the X axis indicates in an arbitrary direction in the horizontal plane. When the device remains stationary on the table, its screen is facing up, the gravity from cmdevicemotion reads about -1, which is true. But when I flip the phone 90 degrees so that the vector normal to the screen points to me, the values โ€‹โ€‹of gravity along Z nowhere show about -1. I thought the Z axis would remain in a vertical direction toward the ground. Or is it that the Z axis is fixed along the normal to the screen? In addition, if I walk around with the device in my hand, so that the normal to the screen goes in the direction of Earth's gravity, and then after a while give the device some yaw, say, at 45 degrees, there will be an arbitrary X axis CMAttitudeReferenceFrameXArbitraryZVertical still point in the direction of mine unidirectional movement (which is x in my ref frame)?

What should I do if the user does not follow a straight line, for example, if I move in a circle, will there be an arbitrary X axis using ref frame CMAttitudeReferenceFrameXArbitraryZVertical (or CMAttitudeReferenceFrameXArbitraryCorrectedZVertical), tangentially directed to the circle, like my circular speed, in two situations : 1. If I hold the device so that the normal vector on the screen coincides with the direction of gravity pointing to the ground, with the default Y axis along the plane of the device pointing in the direction of my movement, tangent to the circle, while Iโ€™m moving I am walking around its circumference 2. Without the above restriction, do not change the spatial orientation of the device in my ref frame, I just play with the device that calls it in different arbitrary orientations, while I move around the circle

+4
source share

All Articles