Configuring Multiple Rangefinders w/ Weighting

I’m attempting to setup two different rangefinders to run on the Pixhawk 2.1 simultaneously. The ArduPlane code has most of the functionality we need already built in. However, I am trying to setup a couple parameters which will allow for changing the weighting placed on the reading from each sensor on the fly.

Looking through the rangefinder & Plane libraries, I haven’t been able to figure out how data from multiple healthy sensors is combined into a reading. If someone more familiar with the code could point me in the right direction, it would be much appreciated.

I think this would be simple using an arduino as a signal mixer and then process the signals the way you decide to finally output the mixed signal to the flight controler

https://discuss.ardupilot.org/t/avoidance-experiments-with-the-poc-and-benewake-tfmini/25277
This setup could be modified to your need