Depth sensors with px4

#1

I am working on a “flying” submarine glider using PX4 for altitude and heading control. To get depth control I was going to turn off the barometer in my IMU (pixhawk 4) and create a custom range finder driver that would work with a high resolution depth sensor. Does this sound like it should work? Other option would be to modify the barometer driver so it reads the depth sensor but I worry that might be harder than it sounds. Thanks in advance for any guidance!

#2

Something like this should work i think, if you use it the same way a downward fasing laser distanse sensor is used for altitude in copter.
http://ardupilot.org/rover/docs/common-echologger-ect400.html#common-echologger-ect400
(i know that’s ardu, not px4, still usefull i think)

Interesting idea.