39 #include <mathlib/mathlib.h> 44 _vel(vel), _stick(stick), _vel_sp_prev(vel)
71 if (is_current_zero) {
94 if (jerk > _param_mpc_jerk_max.get()) {
107 * fabsf(
_stick) + _param_mpc_acc_down_max.get();
156 if (fabsf(acc) > fabsf(max_acc)) {
float _vel_sp_prev
previous velocity setpoint
float _max_acceleration
can be up or down maximum acceleration
void setMaxAcceleration()
Set maximum acceleration.
void velocitySlewRate(float &vel_sp, const float dt)
Add delay to velocity setpoint change.
void smoothVelFromSticks(float &vel_sp, const float dt)
Smooth velocity setpoint based on flight direction.
const float & _vel
vehicle velocity (dependency injection)
float _acc_state_dependent
acceleration that depends on _intention
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
const float & _stick
stick input (dependency injection)
ManualSmoothingZ(ModuleParams *parent, const float &vel, const float &stick)
ManualIntentionZ _intention
User intention.
float getMaxAcceleration()
Get max accleration.
void updateAcceleration(float &vel_sp, const float dt)
Computes the velocity setpoint change limit.
ManualIntentionZ
User-intention.