Asv Mavlink Help

Control client

To control a device from a client, request the IControlClient from the device instance. Implementations of this interface typically delegate control operations to existing MAVLink microservices.

The Control microservice is only available for supported vehicle types and will be registered automatically when a matching implementation exists.

You can get the control client from a device:

var control = device.GetMicroservice<IControlClient>() ?? throw new Exception("No control client found");

Basic usage:

// Take off to 3 meters await control.TakeOff(3.0); // Go to a target point await control.GoTo(new GeoPoint(lat, lon, alt)); // Return to launch await control.DoRtl(); // Land await control.DoLand();

IControlClient (source)

Represents a client that can control a vehicle.

Method

Return Type

Description

ValueTask<bool> IsAutoMode(CancellationToken cancel = default)

ValueTask<bool>

Returns true if the vehicle is currently in Auto mode.

Task SetAutoMode(CancellationToken cancel = default)

Task

Switches the vehicle to Auto mode.

ValueTask<bool> IsGuidedMode(CancellationToken cancel = default)

ValueTask<bool>

Returns true if the vehicle is in Guided mode.

Task SetGuidedMode(CancellationToken cancel = default)

Task

Switches the vehicle to Guided mode.

Task GoTo(GeoPoint point, CancellationToken cancel = default)

Task

Sets a navigation target to the given point.

Task DoLand(CancellationToken cancel = default)

Task

Initiates the landing sequence.

Task DoRtl(CancellationToken cancel = default)

Task

Performs a return to launch operation asynchronously.

Task TakeOff(double altInMeters, CancellationToken cancel = default)

Task

Initiates the takeoff process and ascends to the specified altitude in meters.

Parameters:

GeoPoint represents a location on Earth using WGS 84 coordinates. It consists of latitude, longitude, and altitude in meters.

The CancellationToken parameter allows cancelling the operation before it completes, for example if the navigation or takeoff should be aborted.

Implementations

Different vehicle types have their own implementations of IControlClient:

Last modified: 09 October 2025