things

Dependencies:   HIDScope mbed

Committer:
WouterJS
Date:
Mon Oct 15 12:52:13 2018 +0000
Revision:
0:b1ef0101f09c
Jo;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WouterJS 0:b1ef0101f09c 1 #include "Biquad.h"
WouterJS 0:b1ef0101f09c 2
WouterJS 0:b1ef0101f09c 3 Biquad::Biquad(){};
WouterJS 0:b1ef0101f09c 4
WouterJS 0:b1ef0101f09c 5 double Biquad::filter( double u, double &v1, double &v2, const double a1, const double a2,
WouterJS 0:b1ef0101f09c 6 const double b0, const double b1, const double b2 )
WouterJS 0:b1ef0101f09c 7 {
WouterJS 0:b1ef0101f09c 8 double v = u - a1*v1 - a2*v2;
WouterJS 0:b1ef0101f09c 9 double y = b0*v + b1*v1 + b2*v2;
WouterJS 0:b1ef0101f09c 10 v2 = v1;
WouterJS 0:b1ef0101f09c 11 v1 = v;
WouterJS 0:b1ef0101f09c 12 return y;
WouterJS 0:b1ef0101f09c 13 }