Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distance moved by Accelerometer

I want to move objects on iPhone screen (rectangle, circle and so on) by moving iPhone. For example, I move iPhone along X-axis and the object moves along X-axis. The same for Y,Z-axis.

How can I do this? Can I get algorithm for it?

Thank you.

P.S: I looked for a while and seems like it is possible using accelerometer.

like image 688
MeIr Avatar asked Jul 11 '11 02:07

MeIr


1 Answers

You get position by integrating the linear acceleration twice but the error is horrible. It is useless in practice.

Here is an explanation why (Google Tech Talk) at 23:20. I highly recommend this video.

However the gyro mouse might work for your application, see between 37:00-38:25 in the video.

Similar questions:

track small movements of iphone with no GPS
What is the real world accuracy of phone accelerometers when used for positioning?
how to calculate phone's movement in the vertical direction from rest?
iOS: Movement Precision in 3D Space
How to use Accelerometer to measure distance for Android Application Development
How can I find distance traveled with a gyroscope and accelerometer?

like image 71
Ali Avatar answered Sep 29 '22 21:09

Ali