Browse Source

StickAccelerationXY: brake a bit faster

The drag is based on max_acc/max_vel, which means that increasing the
maximum velocity leads to slower braking (at the same starting speed).

Especially a combination of small max_acc (slow responsiveness) with high
max_vel led to an exceedingly high braking distance.
This improves that while still being smooth.
release/1.12
Beat Küng 4 years ago committed by Lorenz Meier
parent
commit
836c7c6575
  1. 2
      src/modules/flight_mode_manager/tasks/Utility/StickAccelerationXY.cpp

2
src/modules/flight_mode_manager/tasks/Utility/StickAccelerationXY.cpp

@ -123,7 +123,7 @@ Vector2f StickAccelerationXY::calculateDrag(Vector2f drag_coefficient, const flo @@ -123,7 +123,7 @@ Vector2f StickAccelerationXY::calculateDrag(Vector2f drag_coefficient, const flo
_brake_boost_filter.setParameters(dt, .8f);
if (stick_xy.norm_squared() < FLT_EPSILON) {
_brake_boost_filter.update(2.f);
_brake_boost_filter.update(math::max(2.f, sqrtf(_param_mpc_vel_manual.get())));
} else {
_brake_boost_filter.update(1.f);

Loading…
Cancel
Save