Rangefinder (US-D1) for altitude holding on trad heli

Hello folks,
I have an Ainstein US-D1 on a traditional helicopter and I would like to use it for altitude holding.
Do I have to select Rangefinder (2) in EK3_SRC1_POSZ to have it work or should it work anyway (when it measures less then RNGFND1_MAX_CM)?
TERRAIN_ENABLE must be set to enable the rangefinder?
I am testing it only in altitude hold mode.

Wiki is not clear about these things…

I did some test flights, and it does not seem to use the rangefinder to maintain height. When I am close to the ground and rangefinder height differs a lot from baro height it uses always baro height.
Am I doing something wrong?
Thanks!

You need a altitude hold of maintenance functionality. Just follow the documentation settings.
I use US-D1 for obstacle avoidance function and it is in good condition
https://ardupilot.org/copter/docs/common-aerotenna-usd1.html

Thanks for the reply, and sorry for the long delay. I have tried with TERRAIN_ENABLE enabled and with the rangefinder selected in EK3_SRC1_POSZ and it’s working as it should…almost!
I’ll post a log of what I see when actual altitude is over the range of the rangefinder and it seems that there are spikes that should not be there…