Control a Winch

This page explains how MAVLink can be used by a ground station or companion computer to control a winch. The user wiki pages for the winch is here.

Control the winch with MAV_CMD_DO_WINCH

The servo’s position can be set by sending a COMMAND_LONG with the command, param1 and param2 fields set as specified for the MAV_CMD_DO_WINCH command.

Command Field Type Description
target_system uint8_t System ID of flight controller or just 0
target_component uint8_t Component ID of flight controller or just 0
command uint16_t MAV_CMD_DO_WINCH=42600
confirmation uint8_t 0
param1 float Winch instance number
param2 float Action (0:Relax, 1:Length Control, 2:Rate Control)
param3 float Length of line to release (negative to wind in)
param4 float Release rate (negative to wind in)
param5 float not used
param6 float not used
param7 float not used

Example

The example commands below can be copy-pasted into MAVProxy (aka SITL) to test this command. Before running these commands enter:

Example MAVProxy/SITL Command

Description

message COMMAND_LONG 0 0 42600 0 0 0 0 0 0 0 0

Relax winch so line can be pulled out manually

message COMMAND_LONG 0 0 42600 0 0 1 5 0 0 0 0

Let out 5m of line

message COMMAND_LONG 0 0 42600 0 0 2 0 0.5 0 0 0

Let out line at 0.5 m/s