Measuring distances with the IMU sensor MPU6050

Hello, I have been searching the last days, informations and documentations about the IMU sensor MPU6050 from Invensense. I would like to use this sensor to [u]measuring distance[/u], like a motion tracking ,for example: if the board with the sensor moves 1 meter, I want to calculate this 1 meter from the data receiveid from the MPU6050, the data doesn't need to be very accurate. I found a lote of aplication with static moviment, moving static cubes for example, but I didn't find any aplication example mensuring distance. According to my search the sensor give the digital-output of 6 or 9-axis MotionFusion data in rotation matrix, quaternion, Euler Angle, or raw data format, but how can I calculate the distance from this data.

Please, could one that is familiar with IMU sensors ou familiar with complex math, could give me an ideia to start my project? I would like to have some example, but if isn't possible, any information about mensuring distance with MPU6050 will be welcome.

Thank you very much! Celso

Inexpensive IMUs can tell you what direction they are moving and if you know the velocity, it is easy to calculate distance.

In principle it is possible to estimate the velocity and distance from the acceleration by double integration, but in practice with hobby-type accelerometers, this works for only very short distances before the estimate becomes hopelessly inaccurate. For a clear explanation, see this page:

Hello, did you find any way out ?? Thank You. :)

Did you find any code or principles because i found so many pdf of researchs that by double integrating acceleration data we can get distance. and ardupilot guys are also doing this kind of stuff so its possible but i dont see any way around from scratch need some help.

  1. how we can convert mpu6050 +/-1g to m/s2 , removing gravity from raw data.
  2. then what is delta t i know its dt = millis() - t_previous ; but it gives me always 1 which is 0.001s and i dont know why but it don’t working but ardupilot guys are doing same thing here’s the link

so they are using same formula but i didn’t working with me i want to find a way out.