mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-03 12:30:35 +08:00
fw att ctrl: rename some variables
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user