All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
ignition::math::BiQuad< T > Class Template Reference

Bi-quad filter base class. More...

#include <ignition/math/Filter.hh>

Inheritance diagram for ignition::math::BiQuad< T >:
[legend]

Public Member Functions

 BiQuad ()=default
 Constructor. More...
 
 BiQuad (double _fc, double _fs)
 Constructor. More...
 
void Fc (double _fc, double _fs)
 Set the cutoff frequency and sample rate. More...
 
void Fc (double _fc, double _fs, double _q)
 Set the cutoff frequency, sample rate and Q coefficient. More...
 
virtual const T & Process (const T &_x)
 Update the filter's output. More...
 
virtual void Set (const T &_val)
 Set the current filter's output. More...
 
- Public Member Functions inherited from ignition::math::Filter< T >
virtual ~Filter ()
 Destructor. More...
 
virtual const T & Value () const
 Get the output of the filter. More...
 

Protected Attributes

double a0 = 0
 Input gain control coefficients. More...
 
double a1 = 0
 
double a2 = 0
 
double b0 = 0
 
double b1 = 0
 
double b2 = 0
 
x1 {}
 Gain of the feedback coefficients. More...
 
x2 {}
 
y1 {}
 
y2 {}
 
- Protected Attributes inherited from ignition::math::Filter< T >
y0 {}
 Output. More...
 

Detailed Description

template<class T>
class ignition::math::BiQuad< T >

Bi-quad filter base class.

See Also
http://www.earlevel.com/main/2003/03/02/the-bilinear-z-transform/

Constructor & Destructor Documentation

template<class T>
ignition::math::BiQuad< T >::BiQuad ( )
default

Constructor.

template<class T>
ignition::math::BiQuad< T >::BiQuad ( double  _fc,
double  _fs 
)
inline

Constructor.

Parameters
[in]_fcCutoff frequency.
[in]_fsSample rate.

Member Function Documentation

template<class T>
void ignition::math::BiQuad< T >::Fc ( double  _fc,
double  _fs 
)
inlinevirtual

Set the cutoff frequency and sample rate.

Parameters
[in]_fcCutoff frequency.
[in]_fsSample rate.

Implements ignition::math::Filter< T >.

Referenced by ignition::math::BiQuad< math::Vector3d >::BiQuad(), and ignition::math::BiQuad< math::Vector3d >::Fc().

template<class T>
void ignition::math::BiQuad< T >::Fc ( double  _fc,
double  _fs,
double  _q 
)
inline

Set the cutoff frequency, sample rate and Q coefficient.

Parameters
[in]_fcCutoff frequency.
[in]_fsSample rate.
[in]_qQ coefficient.
template<class T>
virtual const T& ignition::math::BiQuad< T >::Process ( const T &  _x)
inlinevirtual

Update the filter's output.

Parameters
[in]_xInput value.
Returns
The filter's current output.
template<class T>
virtual void ignition::math::BiQuad< T >::Set ( const T &  _val)
inlinevirtual

Set the current filter's output.

Parameters
[in]_valNew filter's output.

Reimplemented from ignition::math::Filter< T >.

Member Data Documentation

template<class T>
double ignition::math::BiQuad< T >::a0 = 0
protected
template<class T>
double ignition::math::BiQuad< T >::a1 = 0
protected
template<class T>
double ignition::math::BiQuad< T >::a2 = 0
protected
template<class T>
double ignition::math::BiQuad< T >::b0 = 0
protected
template<class T>
double ignition::math::BiQuad< T >::b1 = 0
protected
template<class T>
double ignition::math::BiQuad< T >::b2 = 0
protected
template<class T>
T ignition::math::BiQuad< T >::x1 {}
protected
template<class T>
T ignition::math::BiQuad< T >::x2 {}
protected
template<class T>
T ignition::math::BiQuad< T >::y1 {}
protected
template<class T>
T ignition::math::BiQuad< T >::y2 {}
protected

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