Dynamics in Local Frame

Related C++ Header in the Auterion SDK:<auterion_sdk/control/control.hpp>

Local Frame Dynamics Mode allows you to control a Multicopter by supplying acceleration and velocity setpoints to the controller in the local east-north-up coordinate frame.

Set up mode

In order to prepare your flight mode to accept LocalFrameDynamicsSetpoint, you need to supply the auterion::multicopter::LocalFrameDynamicsSetpoint::Config object to your mode constructor like so:

auterion::Mode my_mode(sdk, "My Mode", {
    auterion::multicopter::LocalFrameDynamicsSetpoint::Config{}
});

Create setpoints

LocalFrameDynamicsSetpoint setpoints take velocity, acceleration, heading and heading rate as arguments. The acceleration and velocity values, if specified together, should be kinematically consistent.

To create a setpoint, you can use the builder pattern like so:

auto setpoint = auterion::multicopter::LocalFrameDynamicsSetpoint{}
    .withHorizontalAcceleration({a_x, a_y})
    .withVerticalAcceleration(a_z)
    .withHorizontalVelocity({v_x, v_y})
    .withVerticalVelocity(v_z)
    .withHeading(h)
    .withHeadingRate(h_r);

Also any subset of these values is permitted. In order to make the drone follow your setpoints, return these setpoints in the onUpdateSetpoint callback method of your mode.

Last updated