Terrain Following using RangeFinder not working in RTL and Land

I am using uLanding RangeFinder. I am able to get it to work for AUTO, Loiter, AltHold and guided mode. But during RTL somehow copter is not taking rangefinder data and instead is using Barometer data.


Log: https://1drv.ms/u/s!AlYGbbB6jYztwVBAfPE8acADVRhD?e=afqoHb

Look into the parameter RTL_ALT_TYPE, it needs to be 1 in order for RTL/LAND to use terrain follow