mirror of https://github.com/ArduPilot/ardupilot
AP_NavEKF2: Improve scaling of output predictor I gain
Provide consistent overshoot of 5% across a wider range of time constants and prevent selection of larger time constants causing 'ringing' in the position and velocity outputs.
This commit is contained in:
parent
a49c16d63c
commit
744f19cd2d
|
@ -652,8 +652,8 @@ void NavEKF2_core::calcOutputStates()
|
|||
float velPosGain = dtEkfAvg / constrain_float(tauPosVel, dtEkfAvg, 10.0f);
|
||||
|
||||
// use a PI feedback to calculate a correction that will be applied to the output state history
|
||||
posCorrection += posDelta * velPosGain * 0.9f; // I term
|
||||
velCorrection += velDelta * velPosGain * 0.9f; // I term
|
||||
posCorrection += posDelta * sq(velPosGain) * 0.1f; // I term
|
||||
velCorrection += velDelta * sq(velPosGain) * 0.1f; // I term
|
||||
velDelta *= velPosGain; // P term
|
||||
posDelta *= velPosGain; // P term
|
||||
|
||||
|
|
Loading…
Reference in New Issue