mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
SickAccelerationXY: fix comment typo brak{e}ing
This commit is contained in:
@@ -160,7 +160,7 @@ Vector2f StickAccelerationXY::calculateDrag(Vector2f drag_coefficient, const flo
|
|||||||
// increase drag with squareroot function when velocity is lower than 1m/s
|
// increase drag with squareroot function when velocity is lower than 1m/s
|
||||||
const Vector2f velocity_with_sqrt_boost = vel_sp.unit_or_zero() * math::sqrt_linear(vel_sp.norm());
|
const Vector2f velocity_with_sqrt_boost = vel_sp.unit_or_zero() * math::sqrt_linear(vel_sp.norm());
|
||||||
|
|
||||||
// only apply the drag increase below 1m/s when actually brakeing such that speeds below 1m/s
|
// only apply the drag increase below 1m/s when actually braking such that speeds below 1m/s
|
||||||
// are exactly reached but do so by blending it with the filter to avoid any discontinuity when switching
|
// are exactly reached but do so by blending it with the filter to avoid any discontinuity when switching
|
||||||
const float brake_scale = math::interpolate(_brake_boost_filter.getState(), 1.f, 2.f, 0.f, 1.f);
|
const float brake_scale = math::interpolate(_brake_boost_filter.getState(), 1.f, 2.f, 0.f, 1.f);
|
||||||
const Vector2f mixed_velocity = brake_scale * velocity_with_sqrt_boost + (1.f - brake_scale) * vel_sp;
|
const Vector2f mixed_velocity = brake_scale * velocity_with_sqrt_boost + (1.f - brake_scale) * vel_sp;
|
||||||
|
|||||||
Reference in New Issue
Block a user