PX4 Sync / Q&A: April 23, 2025

I would like to discuss how rangefinder data is fused into the EKF for altitude estimation. Altitude hold is poor indoors or outdoors in windy conditions. I’d like to discuss how rangefinder data effects the Z position state estimate and the role of the terrain state estimate.

Poor altitude hold on main (Flow + rangefinder)

Here’s an outdoor flight. EKF replay is enabled in this log. This is based on main from today with #24106 and #24751 merged into it. This is just a takeoff and hold position from a gravel driveway in position mode flying with RC.

Dexi airframe (quad)

  • No GPS
  • Distance sensor
  • Optical Flow
  • Barometer

Mostly default params except reduced EKF2_RNG_NOISE to 0.01. So the EKF2_HGT_REF is gps (so it fallbacks to baro), although throughout most of the flight “range aiding” was active, but doesn’t appear to work very well since the altitude is fluctuating quite a bit (there was a little bit of wind). I kept the throttle around 0 for most of the flight, for simply testing altitude hold performance. MPC_HOLD_DZ is left at the default of 0.1.


1 Like