|
|
|
@ -56,6 +56,8 @@ public:
@@ -56,6 +56,8 @@ public:
|
|
|
|
|
T apply(const T &sample, float cutoff_freq, float dt); |
|
|
|
|
T apply(const T &sample); |
|
|
|
|
|
|
|
|
|
CLASS_NO_COPY(DigitalLPF); |
|
|
|
|
|
|
|
|
|
void compute_alpha(float sample_freq, float cutoff_freq); |
|
|
|
|
|
|
|
|
|
// get latest filtered value from filter (equal to the value returned by latest call to apply method)
|
|
|
|
@ -79,6 +81,8 @@ public:
@@ -79,6 +81,8 @@ public:
|
|
|
|
|
LowPassFilter(float cutoff_freq); |
|
|
|
|
LowPassFilter(float sample_freq, float cutoff_freq); |
|
|
|
|
|
|
|
|
|
CLASS_NO_COPY(LowPassFilter); |
|
|
|
|
|
|
|
|
|
// change parameters
|
|
|
|
|
void set_cutoff_frequency(float cutoff_freq); |
|
|
|
|
void set_cutoff_frequency(float sample_freq, float cutoff_freq); |
|
|
|
|