Actually, there are ways of calculating the distance using accelerometer data.
The only important point is that you should not turn the device ON/OFF while it is moving.
1. The user must make sure that the device is first powered up when its speed is zero.
2. Then, you can log the data until it tells you that the device is no longer speeding up.
3. Then you know the formula to calculate the speed with the last data you received. Start a timer here.
a. If the subject hits somewhere, and stops suddenly you should time its speed to understand that it hit something and stopped.
4. Stop the timer when the device tells you that device speed is decelerating.
5. When the device tells you that device is no longer decelerating then
a. the subject is either stopped or
b. the subject speed is constant.
You can use basic math to distinguish between a and b.
____________________________________
Last edited by sayzer; - 25th August 2008 at 16:24.
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Bookmarks