mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
add note about PT1 gain on PT2 filters
This commit is contained in:
parent
42597c8339
commit
7f9e69420a
1 changed files with 3 additions and 2 deletions
|
@ -244,6 +244,7 @@ bool positionControl(void) {
|
|||
}
|
||||
}
|
||||
posHold.previousDistanceCm = posHold.distanceCm;
|
||||
// intentionally using PT1 gain in PT2 filters to provide a lower effective cutoff
|
||||
float pt1Gain = pt1FilterGain(posHold.lpfCutoff, posHold.gpsDataIntervalS);
|
||||
|
||||
// ** Sanity check **
|
||||
|
@ -317,11 +318,11 @@ bool positionControl(void) {
|
|||
ewD = pt1FilterApply(&velocityEWLpf, ewD);
|
||||
|
||||
float nsA = accelerationNS * positionPidCoeffs.Kf;
|
||||
pt2FilterUpdateCutoff(&accelerationRollLpf, pt1Gain);
|
||||
pt2FilterUpdateCutoff(&accelerationRollLpf, pt1Gain); // using PT1 gain for stronger cutoff
|
||||
nsA = pt2FilterApply(&accelerationRollLpf, nsA);
|
||||
|
||||
float ewA = accelerationEW * positionPidCoeffs.Kf;
|
||||
pt2FilterUpdateCutoff(&accelerationPitchLpf, pt1Gain);
|
||||
pt2FilterUpdateCutoff(&accelerationPitchLpf, pt1Gain); // using PT1 gain for stronger cutoff
|
||||
ewA = pt2FilterApply(&accelerationPitchLpf, ewA);
|
||||
|
||||
// limit sum of D and A because otherwise can be too aggressive when starting at speed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue