Arduino Filters master
Filter library for Arduino
Notch.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <AH/STL/cmath>
5
8
26template <class T = float>
28 double cos_omega = std::cos(M_PI * f_n);
29 double normalize = 2 - 2 * cos_omega;
30 return {{
31 T(1. / normalize),
32 T(-2 * cos_omega / normalize),
33 T(1. / normalize),
34 }};
35}
36
37
Finite Impulse Response filter implementation.
Definition: FIRFilter.hpp:18
FIRFilter< 3, T > simpleNotchFIR(double f_n)
Create a very simple second-order FIR notch filter.
Definition: Notch.hpp:27