From 473be910f2ab139fa6c6feac88f05a6a340c15ef Mon Sep 17 00:00:00 2001 From: Silvan Fuhrer Date: Fri, 21 Apr 2023 14:29:27 +0200 Subject: [PATCH] VTOL: fix transition quadchute below home Signed-off-by: Silvan Fuhrer --- src/modules/vtol_att_control/vtol_type.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/modules/vtol_att_control/vtol_type.cpp b/src/modules/vtol_att_control/vtol_type.cpp index 855b4ce481..93009f260a 100644 --- a/src/modules/vtol_att_control/vtol_type.cpp +++ b/src/modules/vtol_att_control/vtol_type.cpp @@ -303,14 +303,7 @@ bool VtolType::isFrontTransitionAltitudeLoss() if (_param_vt_qc_t_alt_loss.get() > FLT_EPSILON && _common_vtol_mode == mode::TRANSITION_TO_FW && _local_pos->z_valid) { - if (_local_pos->z <= FLT_EPSILON) { - // vehilce is above home - result = _local_pos->z - _local_position_z_start_of_transition > _param_vt_qc_t_alt_loss.get(); - - } else { - // vehilce is below home - result = _local_position_z_start_of_transition - _local_pos->z > _param_vt_qc_t_alt_loss.get(); - } + result = _local_pos->z - _local_position_z_start_of_transition > _param_vt_qc_t_alt_loss.get(); } return result;