mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
APM_Control: added D_FF support for fixed wing
This commit is contained in:
@@ -206,13 +206,14 @@ float AP_RollController::_get_rate_out(float desired_rate, float scaler, bool di
|
||||
pinfo.P *= deg_scale;
|
||||
pinfo.I *= deg_scale;
|
||||
pinfo.D *= deg_scale;
|
||||
pinfo.DFF *= deg_scale;
|
||||
|
||||
// fix the logged target and actual values to not have the scalers applied
|
||||
pinfo.target = desired_rate;
|
||||
pinfo.actual = degrees(rate_x);
|
||||
|
||||
// sum components
|
||||
float out = pinfo.FF + pinfo.P + pinfo.I + pinfo.D;
|
||||
float out = pinfo.FF + pinfo.P + pinfo.I + pinfo.D + pinfo.DFF;
|
||||
if (ground_mode) {
|
||||
// when on ground suppress D term to prevent oscillations
|
||||
out -= pinfo.D + 0.5*pinfo.P;
|
||||
|
||||
Reference in New Issue
Block a user