FlightTaskAuto: use MPC_VEL_MAX instead of MPC_XY_CRUISE for emergency braking thresholds

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2021-12-07 16:56:43 +01:00 committed by Mathieu Bresciani
parent 94884594bb
commit b00ebe53bb
1 changed files with 1 additions and 1 deletions

View File

@ -735,7 +735,7 @@ void FlightTaskAuto::_checkEmergencyBraking()
(factor * _param_mpc_z_vel_max_dn.get())
|| _position_smoothing.getCurrentVelocityZ() < -(factor * _param_mpc_z_vel_max_up.get());
const bool is_horizontal_speed_exceeded = _position_smoothing.getCurrentVelocityXY().longerThan(
factor * _param_mpc_xy_cruise.get());
factor * _param_mpc_xy_vel_max.get());
if (is_vertical_speed_exceeded || is_horizontal_speed_exceeded) {
_is_emergency_braking_active = true;