InfiniTime/src/components/heartrate/Biquad.h

23 lines
374 B
C
Raw Normal View History

#pragma once
namespace Pinetime {
namespace Controllers {
/// Direct Form II Biquad Filter
class Biquad {
2021-04-24 09:00:45 +00:00
public:
Biquad(float b0, float b1, float b2, float a1, float a2);
float Step(float x);
2021-04-24 09:00:45 +00:00
private:
float b0;
float b1;
float b2;
float a1;
float a2;
float v1 = 0.0f;
float v2 = 0.0f;
};
}
}