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

RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
Oct 19, 2022
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022