Added linear digital filters

Linear digital filter class based on code from FRC team 341

Change-Id: I4c5198e36a089e08a6d054bf1bf80392def27e23
This commit is contained in:
Tyler Veness
2015-10-30 16:01:57 -07:00
committed by Peter Johnson
parent 6c89f34e44
commit e15ca5a414
21 changed files with 1964 additions and 5 deletions

View File

@@ -63,4 +63,14 @@ class TestBench {
/* PCM channels */
static const int32_t kSolenoidChannel1 = 0;
static const int32_t kSolenoidChannel2 = 1;
/* Filter constants */
static constexpr double kFilterStep = 0.005;
static constexpr double kFilterTime = 2.0;
static constexpr double kSinglePoleIIRTimeConstant = 0.015915;
static constexpr double kSinglePoleIIRExpectedOutput = -3.2172003;
static constexpr double kHighPassTimeConstant = 0.006631;
static constexpr double kHighPassExpectedOutput = 10.074717;
static constexpr int kMovAvgTaps = 6;
static constexpr double kMovAvgExpectedOutput = -10.191644;
};