Search code examples
ios5accelerometercore-locationiphone-4core-motion

iPhone4 iOS5 is there a physics engine to convert CMDeviceMotion events into displacement?


I'm running a CMDeviceMotion processing queue on iPhone 4, which gives me user-induced acceleration, along with the rotation rates. I can filter this data myself.

What I'm trying to understand is how to convert these discrete samples of acceleration, device attitude and rotational rate into a 3 dimensional displacement. This is possible with classical mechanics for straight lines, but I"m thinking of more advanced calculations - for example curves. This can be handled with GPS, but I'm looking for a much better resolution - lets say within 10 feet. GPS under clear sky has an average accuracy of about 30 feet.

Is there some sort of a physics engine or physics processor that can take a set of device motion or acceleration/turn rate events and give me a distance of how far the phone is from the original location?

I know that there are various pedometer and bike GPS trackers for iPhone. Are they based on GPS or do they actually do the acceleration integration like I'm describing?


Solution

  • Unfortunately, the acceleration integration you are describing won't work in itself.

    However, you may improve the accuracy by fusing with the GPS signal and/or make domain specific assumptions. For details, see the above link.