Device-motion updates using certain reference frames leads to incorrect rotations

Number:rdar://28007399 Date Originated:25-Aug-2016
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 10 beta 7
Classification: Reproducible:Always
Calling CMMotionManager.startDeviceMotionUpdates multiple times (with matching endDeviceMotionUpdates in between), passing reference-frame other than xArbitraryZVertical, leads to the rotations being scaled up by an increasing amount (depending on the number of startDeviceMotionUpdates calls)

Steps to Reproduce:
1. Call CMMotionManager.startDeviceMotionUpdates requesting xArbitraryCorrectedZVertical reference frame
2. Observe that the attitudes returned appear correct
3. Call CMMotionmanager.stopDeviceMotionUpdates
4. Call CMMotionManager.startDeviceMotionUpdates again, as in step 1
5. Observe that the changes in attitude appear doubled, although the vertical orientation is eventually corrected.
6. Repeat this process, observing that on the 3rd run the changes in attitude are tripled and so on.

Expected Results:
I would expect each CMMotionManager.startDeviceMotionUpdates run to yield similar behaviour

Actual Results:
Each successive run yields progressively more scaled changes in rotation

iOS 10 beta 7 (14A5345a), Xcode 8 beta 6 (8S201h)


iPhone 6



Even more weirdly, I see this behavior if I modify my use of CMMotionManager to support calibrating the magnetometer.

I watch to see if magneticField.accuracy is Uncalibrated or Low; if so, I set this.motionManager.showsDeviceMovementDisplay = true. And when it hits Medium or High, I set it back to false. (I have some timing checks in there to avoid flashing and too frequent use).

After a successful calibration, the orientation motion seems to be at double speed!

This is on an iPhone6, or an iPad Air2, using the iOS10 GM

By blair.macintyre at Sept. 15, 2016, 9:15 p.m. (reply...)


By gheric.speiginer at Sept. 15, 2016, 7 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!