Possible to get z distance from IMU?

This sounds like an advanced question to me and Im not sure where to go. But I have an IMU, http://www.chrobotics.com/index.php?main_page=product_info&products_id=2 , and I will be getting pitch roll and yaw as well as accerometer data from the unit. How can I take the Z accelerometer data and turn it into a rough distance. Everywhere I read hints that there are ways but no difinitive answers as to if it has been accomplished or how to go about doing it. Ive read its possible through integration but my math is lacking since I havent seen an inegral in 10+ years LOL


Any help would be great!



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Thanks for the replies a lot of information being taken in over the last 8 hrs.


    Wow I didnt realize there was so much to this but it makes sense. I will apologize if my questions seem out there but i think my brain is mush from reading so many articles about accelerometers and pitch roll data and elevation and altitude, and now barometers to altitude.


    But the explainations here today are the best so far and are more in my language LOL.


    I do have GPS being logged and fixed at 1hz. I will probably bump this up to 2hz. The reason I have such a low frequency is because right now Im just logging the data and not really applying it to anything concrete.


    I will be putting the GPS/CHR_6DM on board a boat to measure the position and motions of the boat and one of the things my school wants to see is the z motion of the boat. Just some raw averaged data is fine because they just want a cheapo version to show that it can be done with small sensors if we want to see results and not necissarily the most accurate results.


    I have ordered a barometer sensor to incorporate in the system and I hope it will be here some time this week or next and then I can incorporate that as well.


    Or should I abandon the accelerometer z movements for barometer readings? Everything I will be doing will be at sea level +/- 5 - 10 meters. or 15-30 ft.


    Thanks again for all your input and help, I am learning a lot and your help is very appreciated.

  • Developer
    Ryan Beall, Jose Julio and I did some extensive work on an altitude estimator based on APM and integration of the acceleration vector.  Randy and Ken are correct.  With our hardware it is hopeless.  You would need much much better sensors.   Even using the barometric pressure sensor and gps for drift correction it is hopeless - we found we got better results from the baro sensor alone versus coupling it with an acceleration based estimator.
  • Even if I just want z changes of only 1 - 10 meters max?
  • You can, but you need to turn the thing into an Inertial Navigation System (INS). Even then, the vertical channel (altitude) is unstable, so you need something like barometric pressure to stablize it.


    Short answer: yes, but it is tough.

This reply was deleted.


Chris Anderson liked Zara Mae Pickering's profile
May 21
Azjeg liked Azjeg's profile
Apr 27
Benewake LiDAR liked Benewake LiDAR's profile
Apr 12
Gremsy liked Gremsy's profile
Mar 12