Guidance Control
Fixed Wing Guidance Mode allows you to control a Fixed Wing by supplying altitude and course setpoints to the controller in the world frame.
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:
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.
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 radTo ensure the drone follows your setpoints, return these setpoints in the onUpdateSetpoint callback method of your mode.
Last updated