LW20 Rangefinder Setup
Rangefinders allow more precise altitude tracking and terrain following. To install the rangefinder, please follow the guide below.
Last updated
Rangefinders allow more precise altitude tracking and terrain following. To install the rangefinder, please follow the guide below.
Last updated
Setup LW20 connector as shown and plug it into GPS 2 port.
Go to Mission Planner Config/Tuning | Full Param page
Set the following parameters:
SERIAL4_PROTOCOL = 9 (Lidar)
SERIAL4_BAUD = 115 (115200 baud) for newer sensors, 19 (19200 baud) for sensors manufactured before mid 2018
RNGFND1_TYPE = 8 (LightWareSerial)
Click “refresh params” to show the following parameters.
Set the following parameters:
RNGFND1_SCALING = 1
RNGFND1_MIN_CM = 5
RNGFND1_MAX_CM = 9500. This is the distance in centimeters that the rangefinder can reliably read.
RNGFND1_GNDCLEAR = 40 or more accurately the distance in centimeters from the rangefinder to the ground when the vehicle is landed. This value is usually set to 40 cm for the standard X55 build. If you are using longer/shorter landing gear, you need to measure the distance from the ground to the rangefinder.
After all the parameters have been set correctly, click on the “write params” button.
Disconnect power from X55 and then reconnect to power it up again.
Distances read by the sensor can be seen in the Mission Planner Flight Data screen’s Status tab. Look closely for “sonarrange”.
Make sure the readout is matching the actual measurement. The readout shows the distance in meters, for the standard X55 landing gear, this should be 0.4m.
Setup is complete.
The pilot can decide whether to use the rangefinder or not by setting the RNGFND1_TYPE to 0 or 8. “0” will turn the rangefinder off and “8” will turn it on.
Always restart (power cycle) the X55 if changing RNGFND1_TYPE and check the “sonarrange” value to verify the sensor is working properly before flying.
In some cases, the pilot may want to dynamically turn on/off the use of the rangefinder. This can be done by customizing a button to turn it on/off.
Before proceeding, make sure the rangefinder is set up properly according to the LW20 Rangefinder Setup. In this example, we are using the CAM (top right) button of the Herelink controller.
First you need to set up the switch by going to the Herelink settings > Buttons page.
Select the CAM long press, and click add.
Set the Default Value to 1100, Active Value to 1900, Channel to 8, and Bus to 1. Click save.
Once the controller is properly set up, change the RC8_OPTION to 10.
Now, when you long-press the CAM button, this will turn the rangefinder on/off.
When using this mode, always double-check the status of channel 8 before flight to avoid unexpected behavior from the aircraft.