129 void update(
double dt,
const Eigen::Vector3d& acc_sp_enu,
130 const Eigen::Quaterniond& attitude_enu,
const Eigen::Vector3d& specific_force_flu,
131 std::optional<double> true_airspeed,
132 std::optional<Eigen::Vector3d> los = std::nullopt);
140 std::shared_ptr<BodyFrameSpecificForceControllerImpl> _impl;
Implementation details for the BodyFrameSpecificForceController class.
Specific-force to body-rate controller for fixed-wing aircraft.
Definition body_frame_specific_force_controller.hpp:29
BodyFrameSpecificForceController(const Parameters ¶meters)
Constructs a BodyFrameSpecificForceController with the given parameters.
void update(double dt, const Eigen::Vector3d &acc_sp_enu, const Eigen::Quaterniond &attitude_enu, const Eigen::Vector3d &specific_force_flu, std::optional< double > true_airspeed, std::optional< Eigen::Vector3d > los=std::nullopt)
Runs one update step of the body-rate controller.
void setParameters(const Parameters ¶meters)
Updates controller parameters.
const State & state() const
Returns a const reference to the current controller state.
Definition body_frame_specific_force_controller.hpp:31
double airspeed_gain_p
Airspeed PI: proportional gain.
Definition body_frame_specific_force_controller.hpp:58
double sf_y_gain_i
Yaw body-acceleration PI: integral gain.
Definition body_frame_specific_force_controller.hpp:47
double airspeed_ramp_slope
Maximum slope of the airspeed command ramp [m/s per s].
Definition body_frame_specific_force_controller.hpp:62
double sf_roll_i_gain
Integral gain for specific-force-based roll error compensation.
Definition body_frame_specific_force_controller.hpp:37
double sf_z_gain_i
Pitch body-acceleration PI: integral gain.
Definition body_frame_specific_force_controller.hpp:42
double camera_tilt
Camera pitch angle relative to the drone body frame, positive upward [deg].
Definition body_frame_specific_force_controller.hpp:68
double sf_y_gain_p
Yaw body-acceleration PI: proportional gain.
Definition body_frame_specific_force_controller.hpp:45
double max_side_acc_trim
Maximum side-slip acceleration at trim airspeed [m/s²].
Definition body_frame_specific_force_controller.hpp:50
double pitch_lim_camera_vertical_fov
Definition body_frame_specific_force_controller.hpp:66
double roll_gain
Roll P gain [rad/s per rad of roll error].
Definition body_frame_specific_force_controller.hpp:33
double trim_airspeed
Trim airspeed used for BTT/STT scaling and PI gain normalization [m/s].
Definition body_frame_specific_force_controller.hpp:52
double sf_z_gain_p
Pitch body-acceleration PI: proportional gain.
Definition body_frame_specific_force_controller.hpp:40
double max_roll_angle
Maximum roll angle [deg].
Definition body_frame_specific_force_controller.hpp:35
double approach_airspeed
Definition body_frame_specific_force_controller.hpp:56
double airspeed_gain_i
Airspeed PI: integral gain.
Definition body_frame_specific_force_controller.hpp:60
Definition body_frame_specific_force_controller.hpp:71
double validated_airspeed
Airspeed used for control: measured value, or approach_airspeed fallback [m/s].
Definition body_frame_specific_force_controller.hpp:77
Eigen::Vector3d body_rates_sp
Body-rate setpoint [rad/s] in FLU convention (roll, pitch, yaw).
Definition body_frame_specific_force_controller.hpp:99
double sf_z_error_integral
Pitch PI integrator state.
Definition body_frame_specific_force_controller.hpp:93
double max_side_acceleration
Airspeed-scaled maximum side acceleration [m/s²].
Definition body_frame_specific_force_controller.hpp:83
double roll_error
Roll error input to the roll rate channel [rad].
Definition body_frame_specific_force_controller.hpp:85
double sf_sp_y_bank
Lateral specific force allocated to banking (roll) [m/s²].
Definition body_frame_specific_force_controller.hpp:79
double sf_y_error
Current lateral body acceleration error [m/s²].
Definition body_frame_specific_force_controller.hpp:89
double airspeed_error_integral
Airspeed PI integrator state [m/s].
Definition body_frame_specific_force_controller.hpp:97
double sf_sp_y_skid
Lateral specific force allocated to skidding (yaw) [m/s²].
Definition body_frame_specific_force_controller.hpp:81
double thrust_sp
Normalized thrust setpoint in [0, 1].
Definition body_frame_specific_force_controller.hpp:101
double sf_y_error_integral
Yaw PI integrator state.
Definition body_frame_specific_force_controller.hpp:91
Eigen::Vector3d sf_sp_enu
Specific force setpoint in ENU frame [m/s²].
Definition body_frame_specific_force_controller.hpp:73
Eigen::Vector3d sf_sp_body
Specific force setpoint in body FLU frame [m/s²].
Definition body_frame_specific_force_controller.hpp:75
double sf_roll_error_integral
Roll specific-force error integrator state [rad].
Definition body_frame_specific_force_controller.hpp:95
double sp_p_unlim
Pitch rate setpoint before the camera VFOV limiter is applied [rad/s].
Definition body_frame_specific_force_controller.hpp:87