From 94d44c40a74ca50d1af21dec131354c1b82c00c3 Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Wed, 2 Nov 2022 15:10:57 +0100 Subject: [PATCH] FW Position control: remove param FW_CLMBOUT_DIFF and instead use hardcoded 10m for clearing aborted flag Use kClearanceAltitudeBuffer for it, which is also used to ensure that during takeoff an altitude setpoint above the clearance altitdue is set. Signed-off-by: Silvan Fuhrer --- .../FixedwingPositionControl.cpp | 2 +- .../FixedwingPositionControl.hpp | 2 -- .../fw_pos_control_l1_params.c | 17 ----------------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp index 91383dc67e..1d21f4d587 100644 --- a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp +++ b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp @@ -1363,7 +1363,7 @@ FixedwingPositionControl::control_auto_loiter(const float control_interval, cons float alt_sp = pos_sp_curr.alt; if (_landing_abort_status) { - if (pos_sp_curr.alt - _current_altitude < _param_fw_clmbout_diff.get()) { + if (pos_sp_curr.alt - _current_altitude < kClearanceAltitudeBuffer) { // aborted landing complete, normal loiter over landing point updateLandingAbortStatus(position_controller_landing_status_s::NOT_ABORTED); diff --git a/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp b/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp index 7ec8e806e1..d692935713 100644 --- a/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp +++ b/src/modules/fw_pos_control_l1/FixedwingPositionControl.hpp @@ -783,8 +783,6 @@ private: (ParamFloat) _param_fw_airspd_trim, (ParamFloat) _param_fw_airspd_stall, - (ParamFloat) _param_fw_clmbout_diff, - (ParamFloat) _param_fw_gnd_spd_min, (ParamFloat) _param_fw_l1_damping, diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c b/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c index 1b27edaf43..2ebd68c49e 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_params.c @@ -356,23 +356,6 @@ PARAM_DEFINE_FLOAT(FW_THR_MIN, 0.0f); */ PARAM_DEFINE_FLOAT(FW_THR_IDLE, 0.0f); -/** - * Climbout Altitude difference - * - * If the altitude error exceeds this parameter, the system will climb out - * with maximum throttle and minimum airspeed until it is closer than this - * distance to the desired altitude. Mostly used for takeoff waypoints / modes. - * Set to 0 to disable climbout mode (not recommended). - * - * @unit m - * @min 0.0 - * @max 150.0 - * @decimal 1 - * @increment 0.5 - * @group FW L1 Control - */ -PARAM_DEFINE_FLOAT(FW_CLMBOUT_DIFF, 10.0f); - /** * Maximum landing slope angle *