EKF2_RNG_AID not working?

Hello everyone,

I have a question about the EKF2_RNG_AID parameter. According to the documentation of the parameter, if it’s enabled, the range sensor will be used regardless of the EKF2_HGT_MODE setting “if conditions for range measurement fusion are met”. I went on and tested this, the following log comes from one of these tests

https://logs.px4.io/plot_app?log=12284661-cd28-47e5-98e6-da67b8faed43

for this test we are flying the drone in altitude control mode, providing the height estimate to the Pixhawk using both a LidarLite V3 as range sensor and an Ultra-Wide Band positioning system; the coordinates from the Ultra-Wide Band system are passed to the Pixhawk using MAVROS /mavros/vision_pose/pose topic.

During the flight, we took off from ground level, flew forward over a ~1m high obstacle, flew back to the starting position, and landed. The behaviour we expected would have been that PX4 would use the LidarLite at the start, and would switch over to the Ultra-Wide Band as soon as we flew over the obstacle. However, we observe that PX4 does not even use the LidarLite at all during the entire flight.

The reason we are testing this setup is that we have good experience with the height accuracy of the LidarLite, while the Ultra-Wide Band height is less accurate in general. However, we are planning on flying in an area where the ground is not always at the same height.

Are we making the wrong assumption here? Or did we not configure the parameters properly?

Nielesonimusso