dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
81 stars 32 forks source link

Zero PID error integral if there is any roll input #134

Closed taniwha closed 2 years ago

taniwha commented 2 years ago

Unless the error integral is zeroed, the pilot will wind up fighting the roll stabilizer while banking, and then due to the accumulated error, the plane will start contorting wildly (and possibly catastrophically) as the PID tries to correct the error.

The input threshold of 0.01 seems to work well even with a bit of slop in a joystick's deadzone, but might need tuning.

dkavolis commented 2 years ago

Thanks!