mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 23:43:34 +08:00
VelocitySmoothing - Refactor class to use polynomial evaluation instead of numerical integration
This solves many numerical issues when the trajectory is close to the primary NE axes (small velocities). It is also more robust when dt is large and has some jitter.
This commit is contained in:
+2
-1
@@ -155,7 +155,8 @@ void FlightTaskManualAltitudeSmoothVel::_updateSetpoints()
|
||||
|
||||
float pos_sp_smooth;
|
||||
|
||||
_smoothing.integrate(_acceleration_setpoint(2), _vel_sp_smooth, pos_sp_smooth);
|
||||
// TODO: move before updateDurations
|
||||
_smoothing.updateTraj(_time_stamp_current, _acceleration_setpoint(2), _vel_sp_smooth, pos_sp_smooth);
|
||||
_velocity_setpoint(2) = _vel_sp_smooth; // Feedforward
|
||||
_jerk_setpoint(2) = _smoothing.getCurrentJerk();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user