Browse Source

FlightTaskAuto: use MPC_VEL_MAX instead of MPC_XY_CRUISE for emergency braking thresholds

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
master
Silvan Fuhrer 3 years ago committed by Mathieu Bresciani
parent
commit
b00ebe53bb
  1. 2
      src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp

2
src/modules/flight_mode_manager/tasks/Auto/FlightTaskAuto.cpp

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

Loading…
Cancel
Save