modm API documentation
modm::filter::Fir< T, N, BLOCK_SIZE, ScaleFactor > Class Template Reference

A finit impulse response (FIR) filter implementation. More...

#include <modm/math/filter/fir.hpp>

Public Member Functions

 Fir (const float (&coeff)[N])
 
void setCoefficients (const float (&coeff)[N])
 
void reset ()
 Resets the tap buffer.
 
void append (const T &input)
 Appends new tap.
 
void update ()
 Calculates g[0].
 
const T & getValue () const
 Returns g[0].
 

Detailed Description

template<typename T, int N, int BLOCK_SIZE, signed int ScaleFactor = 1>
class modm::filter::Fir< T, N, BLOCK_SIZE, ScaleFactor >

A finit impulse response (FIR) filter implementation.

g[n] = SUM(h[k]x[n-k])

Author
Kevin Laeufer

Constructor & Destructor Documentation

template<typename T , int N, int BLOCK_SIZE, signed int ScaleFactor = 1>
modm::filter::Fir< T, N, BLOCK_SIZE, ScaleFactor >::Fir ( const float (&)  coeff[N])
Parameters
coeffarray containing the coefficients

Member Function Documentation

template<typename T , int N, int BLOCK_SIZE, signed int ScaleFactor = 1>
void modm::filter::Fir< T, N, BLOCK_SIZE, ScaleFactor >::setCoefficients ( const float (&)  coeff[N])

Reset the coefficients.

Parameters
coeffarray containing the coefficients

The documentation for this class was generated from the following file: