For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flight Mode API

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

In order to control your drone, you have to create a Flight Mode. You can do this easily by instanting an auterion::Mode object.

class MyAppWithMode
{
private:
    auterion::Mode _mode;
public:
    MyAppWithMode(auterion::SDK &sdk) : _mode(sdk, "My Mode", {
        auterion::multicopter::LocalFrameGotoSetpoint::Config{}
    }) {};
};

The constructor of auterion::Mode has three arguments

  • Reference to the auterion SDK instance

  • A name for the mode, this is the name that will get displayed in the GCS to select the mode

  • A list of setpoint control types, that this mode intends to use

Setpoint control types

When instantiating a mode, you have to specify which control setpoint types your app will use. This is important to make sure that all safety requirements can be set up correctly before the mode gets activated.

The individual control setpoint types can have configuration options that are specific to the different types.

The following control setpoint types are available:

  • auterion::multicopter::LocalFrameGotoSetpoint::Config{}: Go-to positions that the multicopter will fly towards

  • auterion::multicopter::LocalFrameDynamicsSetpoint::Config{}: Direct dynamics velocity and acceleration control in local frame

  • auterion::multicopter::BodyFrameDynamicsSetpoint::Config{}: Direct dynamics velocity and acceleration control in body frame

  • auterion::fixedwing::GuidanceSetpoint::Config{}: Altitude (amsl) and course control. Reference frame of inputs follows aircraft convention (course: global frame (w.r.t North), altitude: global frame, equivalent airspeed: body frame, lateral acceleration: body frame).

  • auterion::fixedwing::DynamicsSetpoint::Config{}: Direct dynamics equivalent airspeed (scalar) lateral acceleration (scalar) control. Reference frame of inputs follows aircraft convention (equivalent airspeed: body frame, lateral acceleration: body frame).

  • auterion::vtol::TransitionSetpoint::Config{}: Ensures the right setpoints are returned to PX4 during transition. Lateral behaviour can be controlled by means of a course input.

  • auterion::RateSetpoint::Config{}: Direct angular rate control of the vehicle (not recommended generally)

  • auterion::AttitudeSetpoint::Config{} : Direct attitude control of the vehicle (not recommended generally)

Each mode needs to use at least one of the setpoint types. Modes can also use multiple setpoint types, if they have different control needs during their lifetime

Mode life cycle

A mode has various life cycle methods that can be added like so

The flight behaviour of a mode gets implemented by generating and returning the correct setpoints in the onUpdateSetpoint callback.

Last updated