A Repost of something I did while working on a project a while ago.... Throughout it might be of use to someone.
Today i wrote a fairly simple program to plot position from accelerometer values. It wasn’t too complicated, just a simple python program that reads accelerometer values from the 9DOF accelerometer package (relayed from the ardwino). The hardest part was stripping out the data i wanted from everything else the accelerometer outputs. I had to restart my computer manny manny times initially because i hadn’t figured out how to close the serial stream and for some reason if you close idle with the stream open the keyboard stops working…. I used two of the equations of motion, v2 = v1 + at and s2 = s1 + vt to convert from acceleration to velocity, then to time. There were other methods but this was the easiest to implement.
And what were the results? Not good…….
Here is a plot of acceleration, velocity and position (green, blue and red consecutively) in the x axisÂ Vs. samples (25Hz) Â for the acceleration sitting still. As can be seen the error in velocity isnt too bad, but error in position is an order of magnitude more (about 0.25m per second).
I had been hopping for something in the order of a few centimetres per second. This pretty much kills dead reckoning.