Inaccurate deviceMotion.attitude reported when sharedAccelerometer is also used

Originator:mantas
Number:rdar://12793521 Date Originated:02-Dec-2012 06:51 PM
Status:open Resolved:
Product:iOS Product Version:6.0
Classification:serious bug Reproducible:always
 
CoreMotion's deviceMotion.attitude API reports inaccurate device orientation, when device flatly lays on the desk. Pitch and yaw error is ~0.1 rad, which translates to ~5 degrees. Though this happens ONLY when UIAccelerometer sharedAccelerometer API is also used for tracking accelerometer data. If I remove sharedAccelerometer delegate registration code deviceMotion.attitude accuracy improves by more than 10x times, leaving pitch and yaw errors to be less than ~0.5 degrees.

So far I was able to reproduce this problem on iPhone 5 and iPad Mini running iOS 6.0.
Successful problem reproduction slightly depends on framerate at which deviceMotion data is queried or application main loop is updated. Sometimes going from 30 fps to 60 fps or vice versa makes problem go away.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!