Accelerometer double integration error

I have tried to do this, with an iPhone’s accelerometer/gyroscope, and can empirically tell you there will be many orders of magnitude more error than that.

Your statement “without considering rotation” is an important one, as this is a huge factor. One of your difficulties will be removing the gravity vector from the integration. If the accelerometer is tilted even slightly, gravity will introduce a large error in each axis.

In my experiment, I was trying to make an iPhone into a 3D cursor a user can wave around in their hand for 3D modelling. It would drift off in random directions at a rate of centimetres per second. Lots of low pass filtering helped this a bit, but it was still way off.

My point is, even if your accelerometer has low noise, in the real world this is a very difficult problem to solve as there are many other sources of ‘noise’.

I recommend you go buy a commercially produced IMU if you want any chance of achieving this over 400m. I will be impressed if you can make an accelerometer work alone, over a distance of 400m with less than ±1km error.


I have been working seriously (hundreds of hours) on a related problem periodically for nearly three decades now without success - so the "Fool's Errand" description in my case would appear to be empirically apt.

Even if the conditions at both the start and end of the integration are perfectly known, the inconsistent variations in the individual reading errors prevent accurate calculation of the conditions at the intermediate points.

Of course, if the reading errors were constant, or if they occurred in constant proportion to the readings, then their exact calculation (and compensation) could be readily achieved. Even if the readings simply conformed to some known probability distribution, then their close approximation and reasonable compensation could be achieved.

But alas, none of these simplifying possibilities appears to be true. So, like those seeking immortality in pursuit of Goldbach's Conjecture, we relentless investigators into the Double Integration Error conundrum will continue our (foolish) search for its golden key.


At the very least, for horizontal movement your measurement requires that the accelerometer axis be perfectly horizontal. Any vertical deviation will produce an apparent error due to accelerometer measuring part of the earth's gravitational field. And how close does it have to be? Let's take the accelerometer noise number of 87.7 ug as the baseline. Then for a deviation angle A, the measured error will be sin A, and you need to solve for A = arcsin(.0000877). This, of course, is easily done, and the answer is:

.005 degrees.

So trying to make your measurement with a single accelerometer axis requires extraordinary setup precision, and I think you need to find a different approach.