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

Guidance Control

Requires APX4 3.4 or newer. If using APX 3.3, these inputs are part of the DynamicsSetpoint

Fixed Wing Guidance Mode allows you to control a Fixed Wing by supplying altitude and course setpoints to the controller in the world frame.

For a detailed explanation of the implementation of this setpoint in PX4, see the upstream documentation.

Set up mode

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

auterion::Mode my_mode(sdk, "My Mode", {
    auterion::fixedwing::GuidanceSetpoint::Config{}
});

Create setpoints

GuidanceSetpoint setpoints can take altitude (amsl), height rate, equivalent airspeed, course and lateral acceleration as arguments.

To control the vehicle, at least one lateral and one longitudinal setpoint must be provided:

  1. Of the longitudinal inputs: either altitude or height_rate must be set to control vertical motion. If both are finite, the altitude setpoint is ignored.

  2. Of the lateral inputs: you must set a course setpoint. Additionally, you can supply a feedforward acceleration.

The equivalent airspeed setpoint will only be used when the vehicle is equipped with an airspeed sensor.

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

auto setpoint = auterion::fixedwing::DynamicsSetpoint{}
    .withAltitude(amsl)
    .withEquivalentAirspeed(equivalent_airspeed)
    .withCourse(course, lat_acc_ff) // course in rad

To ensure the drone follows your setpoints, return these setpoints in the onUpdateSetpoint callback method of your mode.

Last updated