1
0
Fork 0

Fix broken anti windup if the proportional gain runs into the nonlinear area and gets clipped.

Also fix the wrong debug message.
This commit is contained in:
torsten 2010-03-19 20:35:47 +00:00 committed by Tim Moore
parent f4f784a514
commit c55874d70e

View file

@ -615,7 +615,7 @@ void FGPISimpleController::update( double dt ) {
<< " error = " << error << " error = " << error
<< endl; << endl;
double prop_comp = error * Kp.get_value(); double prop_comp = clamp(error * Kp.get_value());
int_sum += error * Ki.get_value() * dt; int_sum += error * Ki.get_value() * dt;
@ -628,7 +628,7 @@ void FGPISimpleController::update( double dt ) {
<< " int_sum = " << int_sum << endl; << " int_sum = " << int_sum << endl;
set_output_value( clamped_output ); set_output_value( clamped_output );
if ( debug ) cout << "output = " << output << endl; if ( debug ) cout << "output = " << clamped_output << endl;
} }
} }