74 void setDTermCutoff(
const float loop_rate,
const float cutoff,
const bool force);
void setIntegratorLimit(const matrix::Vector3f &integrator_limit)
Set the mximum absolute value of the integrator for all axes.
static struct vehicle_status_s status
A class to implement a second order low pass filter on a Vector3f Based on LowPassFilter2p.hpp by Leonard Hall LeonardTHall@gmail.com
matrix::Vector3f _lim_int
integrator term maximum absolute value
matrix::Vector3f _rate_prev_filtered
low-pass filtered angular rates of previous update
matrix::Vector3f update(const matrix::Vector3f &rate, const matrix::Vector3f &rate_sp, const float dt, const bool landed)
Run one control loop cycle calculation.
void setSaturationStatus(const MultirotorMixer::saturation_status &status)
Set saturation status.
void setGains(const matrix::Vector3f &P, const matrix::Vector3f &I, const matrix::Vector3f &D)
Set the rate control gains.
void setDTermCutoff(const float loop_rate, const float cutoff, const bool force)
Set update frequency and low-pass filter cutoff that is applied to the derivative term...
void resetIntegral()
Set the integral term to 0 to prevent windup.
math::LowPassFilter2pVector3f _lp_filters_d
low-pass filters for D-term (roll, pitch & yaw)
matrix::Vector3f _gain_p
rate control proportional gain for all axes x, y, z
bool _mixer_saturation_positive[3]
void getRateControlStatus(rate_ctrl_status_s &rate_ctrl_status)
Get status message of controller for logging/debugging.
bool _mixer_saturation_negative[3]
matrix::Vector3f _rate_int
integral term of the rate controller
void setFeedForwardGain(const matrix::Vector3f &FF)
Set direct rate to torque feed forward gain.
matrix::Vector3f _gain_d
rate control derivative gain
void updateIntegral(matrix::Vector3f &rate_error, const float dt)
matrix::Vector3f _gain_i
rate control integral gain
matrix::Vector3f _gain_ff
direct rate to torque feed forward gain only useful for helicopters
matrix::Vector3f _rate_prev
angular rates of previous update