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:
bresch
2019-09-17 09:27:00 +02:00
committed by Matthias Grob
parent 0c0b261ff2
commit a03cc495ce
7 changed files with 183 additions and 203 deletions
@@ -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();