mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-11 02:18:29 -04:00
TradHeli: Use Leaky Integrator on Yaw Rate controller
Use when rotor is not running to prevent the rudder from slowly moving over
This commit is contained in:
parent
3ce16113b5
commit
232a116973
@ -174,7 +174,11 @@ get_heli_rate_yaw(int32_t target_rate)
|
||||
if (pid_saturated){
|
||||
i = g.pid_rate_yaw.get_integrator(); // Locked Integrator due to PID saturation on previous cycle
|
||||
} else {
|
||||
if (motors.motor_runup_complete()){
|
||||
i = g.pid_rate_yaw.get_i(rate_error, G_Dt);
|
||||
} else {
|
||||
i = g.pid_rate_yaw.get_leaky_i(rate_error, G_Dt, RATE_INTEGRATOR_LEAK_RATE); // If motor is not running use leaky I-term to avoid excessive build-up
|
||||
}
|
||||
}
|
||||
|
||||
d = g.pid_rate_yaw.get_d(rate_error, G_Dt);
|
||||
|
Loading…
Reference in New Issue
Block a user