use different height/depth calculation for uuv's

Author: FlorianPixCreated Aug 19, 2022Updated Sep 16, 2026
Labelsstatus:stale

Describe problem solved by the proposed feature

I am using the MS5837 sensor for my uuv which gives me a pressure reading that I want to use to estimate the depth in water. EKF2 uses the result from VehicleAirData::PressureToAltitude but that one uses an equation that is only correct if the vehicle is in air. Under water a different equation needs to be used.

Describe your preferred solution

Add a param IN_AIR to VehicleAirData or use an existing one (maybe vehicle type). If IN_AIR is false use this equation: altitude = (measure_p - p_at_sea_level) * 0.01f;