RangeFinder 1(Sonar) cannot be used as a primary altitude sensor

Hi ,I use Pixhawk4 at present, the firmware edition am 4.0.3.

I want to use sonar instead of barometer as primary altitude sensor .

In the image, you can see that Altitude and RangeFinder 1 have different values,whether I do have the omission important step? Please help me, thanks you.

Under 10m, the drone uses sonar/rangefinder as primary, in regards to landing/takeoff/obstacle avoidance.

It can be done, we do it here every day and it works fine. But you need 4.1.0-dev also known as git master from today :slight_smile:
You must not change the EKF_ALT_SRC parameter, it must remain at 0. And just set EK2_RNG_USE_ALT to 70.