diff options
| author | The King <27705324+jlukanc1@users.noreply.github.com> | 2021-01-24 16:01:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-24 16:01:14 -0500 |
| commit | 8c3df5f0211e0cc31de90039a73fe48b9a9aafe0 (patch) | |
| tree | 88fc0671a629b27793a418df76f543c7913b644a /src/components/heartrate/Biquad.h | |
| parent | 51c8cadcb78bdbe9013f5aace629c96ed3dfd06f (diff) | |
| parent | 80838d1e42e83b50188d6237d16c81cfa27781a6 (diff) | |
Merge branch 'develop' into upstream-dev
Diffstat (limited to 'src/components/heartrate/Biquad.h')
| -rw-r--r-- | src/components/heartrate/Biquad.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/heartrate/Biquad.h b/src/components/heartrate/Biquad.h new file mode 100644 index 00000000..dc9b97f6 --- /dev/null +++ b/src/components/heartrate/Biquad.h @@ -0,0 +1,22 @@ +#pragma once + +namespace Pinetime { + namespace Controllers { + /// Direct Form II Biquad Filter + class Biquad { + public: + Biquad(float b0, float b1, float b2, float a1, float a2); + float Step(float x); + + private: + float b0; + float b1; + float b2; + float a1; + float a2; + + float v1 = 0.0f; + float v2 = 0.0f; + }; + } +} |
