Disable Baro fusion in EKF2


I am developping an external position estimator for indoor flights. (UWB)

The height measurment with barometer is not accurate for the indoor flights especially for low altitudes (< 1m)

Is there anyway to disable barometer fusion in EKF2 ? I know it’s possible in LPE but I would prefer to keep EKF2 because it is actively supported.



as far as I know you can set the height sensors via EKF2_HGT_MODE.
That is the setting for the EKF2.
Depending on your setup you might be able to use any of the options.

EKF2_HGT_MODE (INT32) Determines the primary source of height data used by the EKF
Comment: The range sensor option should only be used when for operation over a flat surface as the local NED origin will move up and down with ground level.


  • 0: Barometric pressure
  • 1: GPS
  • 2: Range sensor
  • 3: Vision

Reboot required: true

Ok thanks for your help, I will try it !