fw att ctrl: rename some variables

This commit is contained in:
Thomas Gubler
2013-10-20 00:35:20 +02:00
parent feb75f08cb
commit 3c14483df2
4 changed files with 4 additions and 7 deletions
@@ -163,8 +163,7 @@ float ECL_PitchController::control_bodyrate(float roll, float pitch,
_integrator = math::constrain(_integrator, -_integrator_max, _integrator_max);
/* Apply PI rate controller and store non-limited output */
//xxx: naming of gain variables (k_d <--> k_p)
_last_output = (_rate_error * _k_d + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
_last_output = (_rate_error * _k_p + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
return math::constrain(_last_output, -_max_deflection_rad, _max_deflection_rad);
}
@@ -136,8 +136,7 @@ float ECL_RollController::control_bodyrate(float pitch,
//warnx("roll: _integrator: %.4f, _integrator_max: %.4f", (double)_integrator, (double)_integrator_max);
/* Apply PI rate controller and store non-limited output */
//xxx: naming of gain variables
_last_output = (_rate_error * _k_d + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
_last_output = (_rate_error * _k_p + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
return math::constrain(_last_output, -_max_deflection_rad, _max_deflection_rad);
}
@@ -150,8 +150,7 @@ float ECL_YawController::control_bodyrate(float roll, float pitch,
_integrator = math::constrain(_integrator, -_integrator_max, _integrator_max);
/* Apply PI rate controller and store non-limited output */
//xxx: naming of gain variables (k_d <--> k_p)
_last_output = (_rate_error * _k_d + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
_last_output = (_rate_error * _k_p + _integrator * _k_i * _rate_setpoint * k_ff) * scaler * scaler; //scaler^2 is proportional to 1/airspeed^2
return math::constrain(_last_output, -_max_deflection_rad, _max_deflection_rad);
}
@@ -44,7 +44,7 @@
#include <systemlib/param/param.h>
//XXX resolve unclear naming of paramters: FW_P_D --> FW_PR_P
//XXX resolve unclear naming of paramters: FW_P_P --> FW_PR_P
/*
* Controller parameters, accessible via MAVLink