![]() |
PosturePerfection
|
An IIR filter that can be initialised with SOS coefficients. More...
#include <iir.h>
Public Member Functions | |
| IIRFilter (SmoothingSettings smoothing_settings) | |
Construct a new IIRFilter object. More... | |
| void | set (float x) |
| Set all data in the filter to the given value. More... | |
| float | run (float x) |
Apply the filter to the next data sample, x More... | |
An IIR filter that can be initialised with SOS coefficients.
This class is intended to be used with SOS coefficients as generated by the SciPy functions referenced here: https://docs.scipy.org/doc/scipy/reference/signal.html#matlab-style-iir-filter-design.
The filter can be disabled by passing no coefficients to the constructor.
|
explicit |
Construct a new IIRFilter object.
Passing empty SmoothingSettings disables the IIR filter.
| smoothing_settings | SmoothingSettings structure containing the SOS coefficients for the IIR filter |
| float IIR::IIRFilter::run | ( | float | x | ) |
Apply the filter to the next data sample, x
Every call to this method constitutes a time step in the IIR filter
| x | The next data sample |
float Filtered data sample | void IIR::IIRFilter::set | ( | float | x | ) |
Set all data in the filter to the given value.
| x | float Value to overwrite filter content |