From b1317daa9c537dbee0d3fb8d8726b2dde227dd4a Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Mon, 23 Oct 2023 20:09:01 +0200 Subject: [PATCH] wheel controller remove from ecl Signed-off-by: Silvan Fuhrer --- src/modules/fw_att_control/FixedwingAttitudeControl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index bb1c5c8c1f..55dec9fab8 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -349,7 +349,7 @@ void FixedwingAttitudeControl::Run() euler_angles.theta(), get_airspeed_constrained()); if (wheel_control) { - _wheel_ctrl.control_attitude(dt, control_input); + _wheel_ctrl.control_attitude(_att_sp.yaw_body, euler_angles.psi()); } else { _wheel_ctrl.reset_integrator(); @@ -407,8 +407,9 @@ void FixedwingAttitudeControl::Run() // XXX: yaw_sp_move_rate here is an abuse -- used to ferry manual yaw inputs from // position controller during auto modes _manual_control_setpoint.r gets passed // whenever nudging is enabled, otherwise zero - wheel_u = wheel_control ? _wheel_ctrl.control_bodyrate(dt, control_input) - + _att_sp.yaw_sp_move_rate : 0.f; + const float wheel_controller_output = _wheel_ctrl.control_bodyrate(dt, euler_angles.psi(), _groundspeed, + groundspeed_scale); + wheel_u = wheel_control ? wheel_controller_output + _att_sp.yaw_sp_move_rate : 0.f; } _landing_gear_wheel.normalized_wheel_setpoint = PX4_ISFINITE(wheel_u) ? wheel_u : 0.f;