Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
airspeed_controller.hpp
1/****************************************************************************
2 *
3 * Copyright 2026 Auterion AG. All rights reserved.
4 *
5 ****************************************************************************/
6
7#pragma once
8
9#include <memory>
10#include <optional>
11
12namespace auterion {
13
19
29 public:
30 struct Parameters {
32 double gain_p{0.0};
34 double gain_i{0.0};
36 double ramp_slope{2.0};
37 };
38
39 struct State {
42 double airspeed_sp_ramped{0.0};
44 double airspeed_i{0.0};
46 double thrust_sp{0.5};
47 };
48
53 explicit AirspeedController(const Parameters& parameters);
54
59 void setParameters(const Parameters& parameters);
60
69 void update(double dt, double airspeed_setpoint, std::optional<double> true_airspeed);
70
74 const State& state() const;
75
76 private:
77 std::shared_ptr<AirspeedControllerImpl> _impl;
78};
79
80} // namespace auterion
Implementation details for the AirspeedController class.
Airspeed to normalized thrust controller for fixed-wing aircraft.
Definition airspeed_controller.hpp:28
void setParameters(const Parameters &parameters)
Updates controller parameters.
void update(double dt, double airspeed_setpoint, std::optional< double > true_airspeed)
Runs one update step of the airspeed controller.
AirspeedController(const Parameters &parameters)
Constructs an AirspeedController with the given parameters.
const State & state() const
Returns a const reference to the current controller state.
Definition airspeed_controller.hpp:30
double ramp_slope
Maximum slope of the airspeed setpoint ramp [m/s per s].
Definition airspeed_controller.hpp:36
double gain_p
Airspeed PI: proportional gain [normalized thrust per m/s].
Definition airspeed_controller.hpp:32
double gain_i
Airspeed PI: integral gain [1/s], multiplied by gain_p.
Definition airspeed_controller.hpp:34
Definition airspeed_controller.hpp:39
double airspeed_sp_ramped
Definition airspeed_controller.hpp:42
double airspeed_i
Airspeed PI integrator state: integral contribution to the normalized thrust setpoint.
Definition airspeed_controller.hpp:44
double thrust_sp
Normalized thrust setpoint in [0, 1].
Definition airspeed_controller.hpp:46