//Low pass butterworth filter order=2 alpha1=0.01 class FilterBuLp2 { const float cf[3] = {0.00094469184384016181, -0.91497583480143362955, 1.91119706742607298189}; public: FilterBuLp2() {} float step(float x) //class II { v[0] = v[1]; v[1] = v[2]; v[2] = x * cf[0] + cf[1] * v[0] + cf[2] * v[1]; return (v[0] + v[2]) + 2 * v[1]; } private: float v[3]{}; };