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