Fang-Robotics-MCB
Fang Robotics Team Codebase
Loading...
Searching...
No Matches
tap::algorithms::Butterworth< ORDER, Type, T > Class Template Reference

#include <butterworth.hpp>

Public Member Functions

constexpr Butterworth (double wc, double Ts, double wh=0.0)
 
std::array< T, COEFFICIENTSgetNaturalResponseCoefficients () const
 
std::array< T, COEFFICIENTSgetForcedResponseCoefficients () const
 

Static Public Attributes

static constexpr int COEFFICIENTS = (1 + ((Type & 0b10) != 0)) * ORDER + 1
 

Constructor & Destructor Documentation

◆ Butterworth()

template<uint8_t ORDER, FilterType Type = LOWPASS, typename T = float>
constexpr tap::algorithms::Butterworth< ORDER, Type, T >::Butterworth ( double  wc,
double  Ts,
double  wh = 0.0 
)
inlineconstexpr
Parameters
[in]wcfor LOW/HIGHPASS: cutoff ωc. for BANDPASS/BANDSTOP: lower edge ωl.
[in]Tssample time.
[in]typefilter type, LOWPASS, HIGHPASS, BANDPASS, BANDSTOP. defaults to LOWPASS.
[in]whupper edge ωh (only used for band filters).

Member Function Documentation

◆ getForcedResponseCoefficients()

template<uint8_t ORDER, FilterType Type = LOWPASS, typename T = float>
std::array< T, COEFFICIENTS > tap::algorithms::Butterworth< ORDER, Type, T >::getForcedResponseCoefficients ( ) const
inline

◆ getNaturalResponseCoefficients()

template<uint8_t ORDER, FilterType Type = LOWPASS, typename T = float>
std::array< T, COEFFICIENTS > tap::algorithms::Butterworth< ORDER, Type, T >::getNaturalResponseCoefficients ( ) const
inline

Member Data Documentation

◆ COEFFICIENTS

template<uint8_t ORDER, FilterType Type = LOWPASS, typename T = float>
constexpr int tap::algorithms::Butterworth< ORDER, Type, T >::COEFFICIENTS = (1 + ((Type & 0b10) != 0)) * ORDER + 1
staticconstexpr

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