calculating distances using accelerometer

The short answer to your question is you can’t do it.

The double integration method is really the only way to get the information you are looking for using only an accelerometer. You found the problem with this method. The error increases over time and generally doesn’t give the accuracy many are looking for.

Kalman filtering usually requires 2 devices and basically takes the best of both devices and filters out the bad. See example below.

Kalman filtering is a really tough subject that I tried to dive into for senior design, but never found any meaningful results with my limited testing. A great place to start understanding this subject is with this youtube video series .

This is the guy that won the DARPA challenge with Stanford and explains the topic in an easy to understand way. The whole course is a 6 unit video series about programming robots to move and understand their location in an unknown environment. Worth a watch if you have the time and interest.

It sounds like you’re trying to do something similar to what I did for senior design in give really specific relative location information.

Another great Kalman filtering read this (if this link doesn’t work google Kalman filter balance bot and click the TKJ blog link). Basically this guy uses an accelerometer and gyroscope to track orientation in the real world.

Something else to look into wiki Real Time Kinematic. This goes on tractors and combines to provide really accurate location information. John Deere sells a system, but it’s like $20,000. Here is the poor man’s version using GPS and beagleboard

Leave a Comment