fixed-wing: update rate controller integrator handling

-always reset roll/pitch/yaw integrators at the same time
-reset them while waiting for launch or during FW Takeoff before Climbout
-reset wheel rate integrator only when disarmed

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-08-19 09:40:48 +02:00
parent cd080289c6
commit 5a2127d026
6 changed files with 17 additions and 59 deletions
@@ -62,7 +62,7 @@ float ECL_WheelController::control_bodyrate(const float dt, const ECL_ControlDat
/* Calculate body angular rate error */
const float rate_error = _body_rate_setpoint - ctl_data.body_z_rate; //body angular rate error
if (!ctl_data.lock_integrator && _k_i > 0.0f && ctl_data.groundspeed > min_speed) {
if (_k_i > 0.0f && ctl_data.groundspeed > min_speed) {
float id = rate_error * dt * ctl_data.groundspeed_scaler;