mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
LP-604 changed low pass filter to have a significantly ( factor 10 ) smaller Tau than the feed forward term itself, otherwise the filter delay nulls the feed forward effect
This commit is contained in:
parent
b218909c7b
commit
a91ebccd88
@ -372,7 +372,7 @@ static void BankUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
|||||||
// calculation
|
// calculation
|
||||||
const float fakeDt = 0.0025f;
|
const float fakeDt = 0.0025f;
|
||||||
for (int t = 0; t < STABILIZATIONBANK_ATTITUDEFEEDFORWARD_NUMELEM; t++) {
|
for (int t = 0; t < STABILIZATIONBANK_ATTITUDEFEEDFORWARD_NUMELEM; t++) {
|
||||||
float tau = StabilizationBankAttitudeFeedForwardToArray(stabSettings.stabBank.AttitudeFeedForward)[t];
|
float tau = StabilizationBankAttitudeFeedForwardToArray(stabSettings.stabBank.AttitudeFeedForward)[t] * 0.1f;
|
||||||
if (tau < 0.0001f) {
|
if (tau < 0.0001f) {
|
||||||
stabSettings.feedForward_alpha[t] = 0.0f; // not trusting this to resolve to 0
|
stabSettings.feedForward_alpha[t] = 0.0f; // not trusting this to resolve to 0
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user