ferram4 / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
239 stars 131 forks source link

Bug in pitch controller #113

Closed janismac closed 8 years ago

janismac commented 8 years ago

I played around with the pitch controller and noticed that it tries to keep a certain AoA, not a certain pitch.

A look at the source code confirms this. In the file FerramAerospaceResearch/FARGUI/FARFlightGUI/StabilityAugmentation.cs at line 198 it says

double pitch = (info.aoA - sys.zeroPoint) * FARMathUtil.deg2rad;

I think this should be

double pitch = (info.pitchAngle - sys.zeroPoint) * FARMathUtil.deg2rad;
ferram4 commented 8 years ago

Although the name is technically wrong (from a world-POV), as with the yaw damper, this is intended behavior. The proposed changes will result in behavior changing as the vehicle rolls, which is not how real-life pitch dampers work, nor is it intuitive in any way.