mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user