From 99e8338ab5181a6f9d833e5ece531059be071760 Mon Sep 17 00:00:00 2001 From: thomas Date: Tue, 29 Nov 2022 14:16:22 +0100 Subject: [PATCH] also use VT_LND_PITCH_MIN in NAVIGATION_STATE_DESCEND --- src/modules/vtol_att_control/vtol_type.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 2502cb6bb8..78fbb30724 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -379,8 +379,9 @@ float VtolType::pusher_assist() float pitch_setpoint_min = math::radians(_param_vt_pitch_min.get()); - if (_attc->get_pos_sp_triplet()->current.valid - && _attc->get_pos_sp_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) { + if ((_attc->get_pos_sp_triplet()->current.valid + && _attc->get_pos_sp_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND) + || _attc->get_vehicle_status()->nav_state == vehicle_status_s::NAVIGATION_STATE_DESCEND) { pitch_setpoint_min = math::radians( _param_vt_lnd_pitch_min.get()); // set min pitch during LAND (usually lower to generate less lift) }