Status of rangefinder via mavlink

Hi ArduPilot community,

I would like to get the rangefinder status like the enum class Status in the AP_RangeFinder.h via mavlink. Is there any kind of mavlink message to parse that contains this?

For more insight I am using a downward facing lidar on a quadcopter (pixhawk cube orange) for terrain following and for the LAND/RTL modes. It is working well. I just want to know the state of the lidar to show it in a custom GUI we developed. This is for preparations of a certified drone. Therefore we need to show all the sensor states. In the logs I see the RFND instance containing the Dist and Stat. It would be nice if I can parse that on the fly.

In the message SYS_STATUS I already parsing the bit-masks but it does not tell me detail like in AP_RangeFinder.h.

Any suggestions would be welcome.

Thank you for the advice. If I look into the examples and topic that @ppoirier has written it is to integrate a custom sensor? This could be a solution for me

The sensor I am using is Garming Lidar lite v3 and its working perfectly with ArduCopter by default. It is Plug&Play almost. So I do not want to interfere with that by placing a µc in between. I was hoping that ArduCopter somehow gives me feedback if he trust the distance (height) reported by the downward facing lidar.

Hello @Michael_Wellens

I think in your case the simplest way to achieve this integration is by using a custom MAVLink message.


I read your question totally wrong, I thought you were trying to convert your rangefinder to mavlink not get the mavlink rangefinder data from the flight controller.