Using a RangeFinder for visualization purpose only

Hello,

Let say I have a facing down rangefinder interfaced through MAVLink (i.e. DISTANCE_SENSOR messages). The documentation [1] states that a facing down rangefiner is automatically used for precision landing. Indeed, looking into the code, it looks like the rangefinder measurement is used at multiple places if such a sensor is available. In my case, I don’t want the sensor to be used for anything else than visualization (e.g., SonarRange quick indicator in Mission Planner). So, is there a way to achieve what I want only by modifying some parameters, or the only way is to patch the code?

Thank you.

[1] RangeFinders Setup Overview — Copter documentation

A quick trick you could use is to change your RNGFNDX_ORIENT to any other different from Down (25), like Forward (0) for instance. As soon as you do not enable object avoidance using distance sensors as source of information, it will only log the data for you.

But, from what I understand, as soon as you set SURFTRK_MODE to zero and parameter WPNAV_RFND_USE also zeroed, a down rangefinder would not have any effect on drone behaviour… maybe @rmackay9 can confirm this.