APM:Libraries
Public Member Functions | Private Attributes | List of all members
DigitalLPF< T > Class Template Reference

#include <LowPassFilter.h>

Collaboration diagram for DigitalLPF< T >:
[legend]

Public Member Functions

 DigitalLPF ()
 
apply (const T &sample, float cutoff_freq, float dt)
 
apply (const T &sample)
 
void compute_alpha (float sample_freq, float cutoff_freq)
 
const T & get () const
 
void reset (T value)
 

Private Attributes

_output
 
float alpha = 1.0f
 

Detailed Description

template<class T>
class DigitalLPF< T >

Definition at line 52 of file LowPassFilter.h.

Constructor & Destructor Documentation

◆ DigitalLPF()

template<class T >
DigitalLPF< T >::DigitalLPF ( )

Definition at line 15 of file LowPassFilter.cpp.

Member Function Documentation

◆ apply() [1/2]

template<class T>
T DigitalLPF< T >::apply ( const T &  sample,
float  cutoff_freq,
float  dt 
)

Definition at line 22 of file LowPassFilter.cpp.

◆ apply() [2/2]

template<class T>
T DigitalLPF< T >::apply ( const T &  sample)

Definition at line 34 of file LowPassFilter.cpp.

◆ compute_alpha()

template<class T >
void DigitalLPF< T >::compute_alpha ( float  sample_freq,
float  cutoff_freq 
)

Definition at line 40 of file LowPassFilter.cpp.

◆ get()

template<class T >
const T & DigitalLPF< T >::get ( void  ) const

Definition at line 52 of file LowPassFilter.cpp.

◆ reset()

template<class T>
void DigitalLPF< T >::reset ( value)

Definition at line 57 of file LowPassFilter.cpp.

Member Data Documentation

◆ _output

template<class T>
T DigitalLPF< T >::_output
private

Definition at line 66 of file LowPassFilter.h.

◆ alpha

template<class T>
float DigitalLPF< T >::alpha = 1.0f
private

Definition at line 67 of file LowPassFilter.h.


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