After reading many researches and papers beside to many forums about how to measure the distance based on the acceleration data I found the double integration method, but th
Without considering the rotation:
Let's consider that at time t=t0 you are at position [ x0 , y0 , z0 ] and a velocity vector of [ vx0 , vy0 , vz0 ].
At t=t1 you read an acceleration vector of [ ax1 , ay1 , az1 ] (The average acceleration from t0 and t1).
Then, the velocity vector at t=t1 will be:
[ vx1 , vy1 , vz1 ] = [ vx0 + ax1 * (t1 - t0) , vy0 + ay1 * (t1 - t0) , vz0 + az1 * (t1 - t0) ]
The average speed between t0 and t1 will be
[ vx01 , vy01 , vz01 ] = [ (vx0 + vx1) / 2 , (vy0 + vy1) / 2 , (vz0 + vz1) / 2 ]
And the position at t=t1 will be:
[ x1 , y1 , z1 ] = [x0 + vx01 * (t1 - t0), y0 + vy01 * (t1 - t0), y0 + vy01 * (t1 - t0) ]
As you can see, the error propagates with t^2, so that's why the inertial systems need to be compensated by an external reference like a GPS.