Connecting DRT Radar Altimeter to ardupilot

DRT Drone radar altimeter with Pixhawk autopilot

Support for DRT Radar Altimeter is available in ArduPilot firmware versions 4.0 and later

The USD1 is available in serial and DroneCAN versions.

For a serial connection you can use any spare Serial/UART port. The example below shows how to connect to SERIAL4 as the first rangefinder.

  • SERIAL4_PROTOCOL = 9 (Lidar)

  • SERIAL4_BAUD = 115 (115200 baud)

  • RNGFND1_TYPE = 11 (DRT-Serial)

  • RNGFND1_MIN = 50

  • RNGFND1_MAX = 4500

  • RNGFND1_GNDCLR = 10 or more accurately the distance in centimeters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.

For the CAN version, connect via CAN to the autopilot and set the following parameters:

  • CAN_P1_DRIVER = 1 (first can port driver set to driver 1)

  • CAN_D1_PROTOCOL = 7 (DRT protocol for driver 1)

  • RNGFND1_TYPE = 33 (DRT_CAN)

  • RNGFND1_MIN = 50

  • RNGFND1_MAX = 4500

  • RNGFND1_GNDCLR = 10 or more accurately the distance in centimeters from the range finder to the ground when the vehicle is landed. This value depends on how you have mounted the rangefinder.

Testing the sensor

Distances read by the sensor can be seen in the Mission Planner’s Flight Data screen’s Status tab. Look closely for “sonarrange”.

DRT Drone Radar Altimeter on Ardupilot

Ardupilot Mission Planner DRT Radar Altimeter

The DRT radar altimeter is available in two communication protocol options: CAN or Serial.

Note that DRT’s CAN protocol is distinct from DroneCAN, requiring a dedicated CAN port configured specifically for this protocol. If your autopilot lacks a spare CAN or serial port for connecting the DRT but has a DroneCAN port available, you can add an additional serial port by using an AP_Periph CAN node connected to the DroneCAN port.

In this setup, the DRT must be the Serial version.

To use the DRT with a CAN node, such as the Matek AP_Periph CAN Node L431, Flash the AP_Periph device with firmware that includes rangefinder functionality..

Drone radar altimeter wiring with ardupilot

DRT Radar Altimeter wiring with Ardupilot

Set the parameters in the CAN Node to the following:

  • RNGFND_BAUDRATE = 115

  • RNGFND_MAX_RATE = 50

  • RNGFND_PORT = 1 (UART 2, i.e. TX2, RX2)

  • RNGFND1_ORIENT = 0 (No matter what orientation)

  • RNGFND1_TYPE = 11

Warning

RNGFND_PORT is indexed differently than the UARTs on the board. For RNGFND_PORT = 0, use RX1 and TX1 on the board, etc.

Next, set the parameters on the autopilot:

  • RNGFND1_TYPE = 24 (DroneCAN) Then Restart

  • RNGFND1_ORIENT = 25 (Down)

  • RNGFND1_ADDR = 0 (For sensor_id = 0)