How it is done to send DISTANCE_SENSOR message to ardupilot?

I am currently trying to install 4 (or at least 1) sonars in my drone to use them as a Object Avoidance system. The flight controller is a Pixhawk and the sonars are Maxbotix I2CXL EZ4. They are connected to the Pixhawk thrgough the I2C port (using a I2C splitter). In the Copter Object Avoidance article in it says that “the easiest method to get your distance measurements into ardupilot is to send DISTANCE_SENSOR message for each direction the sensor is capable of”. How is that done?

I am not experimented with MAVLING messages.


You can look at my blog on avoidance : Avoidance Experiments with the POC and Benewake TFMINI