Physical Connection
Connect the 3-pin "Drone" port on the winch board to a telemetry port (telem1 or telem2) on your flight controller. An image of the particular connections are shown
Flight Controller Parameters:
Configure the port you used as a MAVLink2 port, and ensure the baudrate matches the winch (which by default uses 115200). Parameters can be changed by connecting the vehicle to QGC or Mission Planner.
Ardupilot
See here for details, but you should just need to change two parameters. For example, if using the telem1 port at baud 115200:
SERIAL1_PROTOCOL to MAVLink2 (int value 2)
SERIAL1_BAUD to 115200 (int value 9).
PX4
See here for details. The interface should be configured to enable forwarding, with MODE to CUSTOM. As an example, to use mavlink interface #2 with the TELEM2 port at baud 115200:
Set MAV_2_CONFIG to TELEM2
Reboot the drone (so the additional configuration parameters appear)
Set MAV_2_FORWARD to 1 (to enable forwarding between groundstation/pc and RDS2)
Set MAV_2_MODE to CUSTOM (to ensure no MAVLink messages are sent by the FC)
Set SER_TELEM2_BAUD to 115200 (to match the baudrate set in the RDS2 parameters)
MAVLink Interface
NOTE: If you are using A2ZQGC, all of the below is handled by the software. This section is for users implementing their own control on a ground station or companion computer. This interface information is also documented in the a2z.h header file which
Overview
Once the RDS2 is connected and parameters configured, your GCS should start getting WINCH_STATUS messages, DISTANCE_SENSOR messages, and HEARTBEAT messages from, by default, System 1 (usually the drone), Component 7 (to identify the winch). By sending MAV_CMD_DO_WINCH messages to this system+component, you can control the RDS2.
The following sections detail the following:
Information provided by the RDS2 in its WINCH_STATUS messages, including:
Interpretation of the main fields of this message
Details on parsing the special RDS2_STATUS field embedded in the general ‘status’ field of the message
Interpretation of the RDS2_STATUS field above
A note on the DISTANCE_SENSOR message that the RDS2 sends to provide information from the connected lidar sensor
The command interface allowing the user to control the RDS2, including:
Description of the command message and its parameters
A detailed table of the particular commands and their subcommands
A general recommendation for steps to create a realtime UI in a GCS or web interface
Parsing RDS2 Status
The message streamed from the RDS2 is of type WINCH_STATUS. The specific interpretation of the fields differs slightly from the MAVLink spec. Additionally, a single high-level RDS2 state indicator is packed into the status field. See the table below:
The ‘status’ field does contain most of the flags in the spec, but we suggest only using the RDS2_STATUS enum packed into the last 8 bits of the field for your primary status display as they are more useful for understanding the state of the system. The code below will extract this state:
mavlink_msg_winch_status_decode(&message, &winch_status);
int rds2_state = winch_status.status >> 24;
This table shows the interpretation of this state enum:
Distance Sensor messages
In addition to WINCH_STATUS messages, the RDS2 will stream DISTANCE_SENSOR measurements from its downward-facing LIDAR unit. No action is required from the user, as the RDS2 uses the lidar value directly, but it is provided as a convenience to the user so that it can be used for other purposes, and will display as expected in most standard GCS applications that show rangefinder distance to ground.
Commanding the RDS2
Since the RDS2 handles low-level functions similar to the MAVLink spec, but with some differences in the use of the parameters of MAV_CMD_DO_WINCH. The only parameter to specify is parameter 2, “Action”, and in some cases parameter 3, “Sub-action”. See “RDS2 Action” in the next section.
These values were changed in RDS2 v5.1. If you are using an older version, refer to RDS2 integration guide <=5.0.
RDS2_ACTION
User Interface Suggestions
To implement a control panel for the RDS2, we suggest a panel of buttons, one for each required RDS2_ACTION, and a readout panel to display information from the WINCH_STATUS and DISTANCE_SENSOR messages.
For the main flight view, we suggest including RDS2_STATE, line_length, speed, and current_distance (from DISTANCE_SENSOR). The other fields may be placed in a separate detail menu.
Additionally, we suggest only enabling each button if the RDS2 is in an allowable RDS2_STATE per the RDS2_ACTION table, showing the button as disabled otherwise.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article