![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
things
Biquad/Biquad.h@0:b1ef0101f09c, 2018-10-15 (annotated)
- Committer:
- WouterJS
- Date:
- Mon Oct 15 12:52:13 2018 +0000
- Revision:
- 0:b1ef0101f09c
Jo;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
WouterJS | 0:b1ef0101f09c | 1 | #ifndef _BIQUAD_H_ |
WouterJS | 0:b1ef0101f09c | 2 | #define _BIQUAD_H_ |
WouterJS | 0:b1ef0101f09c | 3 | |
WouterJS | 0:b1ef0101f09c | 4 | #include "mbed.h" |
WouterJS | 0:b1ef0101f09c | 5 | |
WouterJS | 0:b1ef0101f09c | 6 | class Biquad |
WouterJS | 0:b1ef0101f09c | 7 | { |
WouterJS | 0:b1ef0101f09c | 8 | public: |
WouterJS | 0:b1ef0101f09c | 9 | ///Instantiate the biquad filter |
WouterJS | 0:b1ef0101f09c | 10 | Biquad(void); |
WouterJS | 0:b1ef0101f09c | 11 | |
WouterJS | 0:b1ef0101f09c | 12 | /**Filters the given signal with the filter values. |
WouterJS | 0:b1ef0101f09c | 13 | * @param u : double signal to filter |
WouterJS | 0:b1ef0101f09c | 14 | * @param &v1 : double variable to store previous values |
WouterJS | 0:b1ef0101f09c | 15 | * @param &v2 : double variable to store previous values |
WouterJS | 0:b1ef0101f09c | 16 | * @param a1 : double filter coefficient a1 |
WouterJS | 0:b1ef0101f09c | 17 | * @param a1 : double filter coefficient a2 |
WouterJS | 0:b1ef0101f09c | 18 | * @param a1 : double filter coefficient b0 |
WouterJS | 0:b1ef0101f09c | 19 | * @param a1 : double filter coefficient b1 |
WouterJS | 0:b1ef0101f09c | 20 | * @param a1 : double filter coefficient b2 |
WouterJS | 0:b1ef0101f09c | 21 | * @return v : double filtered signal |
WouterJS | 0:b1ef0101f09c | 22 | */ |
WouterJS | 0:b1ef0101f09c | 23 | double filter( double u, double &v1, double &v2, const double a1, const double a2, |
WouterJS | 0:b1ef0101f09c | 24 | const double b0, const double b1, const double b2 ); |
WouterJS | 0:b1ef0101f09c | 25 | }; |
WouterJS | 0:b1ef0101f09c | 26 | #endif |