Commit Graph

11 Commits

Author SHA1 Message Date
Andrew Tridgell
7c782dda88 Filter: fixed ordering of samples in notch reset 2022-06-12 15:39:44 +10:00
Andrew Tridgell
d07761cfd9 Filter: fixed reset of notch filters
when we reset a notch we need to init the stored values to the current
value, rather than assuming that zero is the right value

this matters when switching IMUs in flight when we are only running
notch filters on the active gyro
2022-06-12 15:39:44 +10:00
Andrew Tridgell
d7d04bc7cf Filter: removed parameters from the old notch filter
saves some flash space
2022-04-19 09:39:03 +10:00
Andy Piper
fbdeea2d03 Filter: optimize hot parts of notch filter updates 2021-12-22 18:23:33 +11:00
Michelle Rossouw
3379a1a215 Filter: Add Vector2f option to notch filter 2021-07-06 14:56:02 +10:00
Leonard Hall
6f3be90147 Filter: Alter Notch filter formula to remove /0 and allow perfect notch.
This formulation of the notch equations lets the user specify the depth of the Notch. The presence of a diveide by A prevents the gain going to zero and therefore achieving a perfect notch. It also provides the risk that a user may attempt to do this and cause a divide by zero error. This change adds the ability to achive a perfect notch and removes the possibility of a divide by zero.

Add Notch Filter parameter checking
2019-09-11 18:41:05 +10:00
Andy Piper
bc5916ebc9 Filter: comment on reserved config. cope with notch allocation failure. 2019-09-11 18:41:05 +10:00
Andy Piper
366bc06089 Filter: New HarmonicNotchFilter
This delegates updates to a bank of NotchFilters located at an rpm frequency and harmonics. Center frequency can be updated dynamically. Notch parameters are configurable, including the number of harmonics to filter on. Updates to the filter parameters are optimized across the notch bank. Convert notch bandwidth and frequency to floats.

allow all filter harmonics to be controlled.

add destructor to harmonic notch.

don't allocate sub-filters for harmonic notch if no harmonics set.
2019-09-11 18:41:05 +10:00
Andy Piper
52e4676564 Filter: Allow all filter frequencies to be 16bit. 2019-06-06 17:09:17 +10:00
Andy Piper
1a8475cf9f Filter: Decouple notch filter configuration from the filter itself.
Allow multiple notch filters to be instantiated using the same configuration.
2019-06-06 17:09:17 +10:00
Andrew Tridgell
50dcca39bd Filter: added a notch filter
maths from Leonard
2017-08-29 13:52:29 +10:00