Integrating a Sonar with Iris

Hello, I'm considering adding a Sonar to my Iris to measure low altitudes more accurately. The barometer used on the Iris appears to be MS5611 that has a resolution of 10cm according to the data sheet. Adding a sonar (for example MB1240) should give me a resolution of ~1cm. I'm wondering about a couple of things though:

1. Sonar measures distance from the nearest obstacle where the ultrasonic sound waves bounce off of. While Barometer measures altitude from variation in the air pressure, which should give an absolute altitude reading from a reference point (sea level). How are these data streams integrated? 

2. It appears that the flight control system switches from the sonar to the barometer if the quad is flying above 60% of the max height of the sonar. What I'd like to do is for the quad to use the barometer to maintain an approximate hover altitude above the ground, with the sonar giving me accurate altitude readings. I don't want the quad to use the sonar readings directly. This is because if I want the quad to fly say 10m above the ground and I fly over a bench, I don't want the quad to suddenly lift up, because the sonar will report lower numbers when it's above the bench. 

Is there a flight mode that will achieve this or will this need to be programmed? According to

http://copter.ardupilot.com/wiki/common-optional-hardware/common-rangefinder-landingpage/sonar/

Sonars are used in Alt Hold/Loiter mode where the quad will attempt to maintain a constant distance from the ground.

Thanks for reading and appreciate any thoughts/suggestions!

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

Join diydrones

Email me when people reply –

Activity

DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Sunday
DIY Robocars via Twitter
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…
Friday
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Friday
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Friday
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Friday
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23
DIY Robocars via Twitter
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
DIY Robocars via Twitter
Oct 23
DIY Robocars via Twitter
Oct 19
DIY Robocars via Twitter
Oct 18
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13
More…