### 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!

Thanks

#### Replies

• 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.

### Activity

Saturday
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
Saturday
May 8
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26