BiQuad< T > Class Template Reference

Bi-quad filter base class. More...

#include <math/gzmath.hh>

Inherits Filter< T >.

Public Member Functions

 BiQuad () GAZEBO_DEPRECATED(8.0)
 Constructor. More...
 
 BiQuad (double _fc, double _fs) GAZEBO_DEPRECATED(8.0)
 Constructor. More...
 
virtual const T & GetValue () GAZEBO_DEPRECATED(8.0)
 Get the output of the filter. More...
 
virtual const T & process (const T &_x)
 Update the filter's output. More...
 
void SetFc (double _fc, double _fs)
 Set the cutoff frequency and sample rate. More...
 
void SetFc (double _fc, double _fs, double _q)
 Set the cutoff frequency, sample rate and Q coefficient. More...
 
virtual void SetValue (const T &_val)
 Set the current filter's output. More...
 

Protected Attributes

double a0
 Input gain control coefficients. More...
 
double a1
 
double a2
 
double b0
 
double b1
 
double b2
 
T x1
 Gain of the feedback coefficients. More...
 
T x2
 
T y0
 Output. More...
 
T y1
 
T y2
 

Detailed Description

template<class T>
class gazebo::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

◆ BiQuad() [1/2]

BiQuad ( )
inline

Constructor.

Deprecated:
See ignition::math::BiQuad

◆ BiQuad() [2/2]

BiQuad ( double  _fc,
double  _fs 
)
inline

Constructor.

Parameters
[in]_fcCutoff frequency.
[in]_fsSample rate.
Deprecated:
See ignition::math::BiQuad

Member Function Documentation

◆ GetValue()

virtual const T& GetValue ( )
inlinevirtualinherited

Get the output of the filter.

Returns
Filter's output.

◆ process()

virtual const T& process ( const T &  _x)
inlinevirtual

Update the filter's output.

Parameters
[in]_xInput value.
Returns
The filter's current output.

◆ SetFc() [1/2]

void SetFc ( double  _fc,
double  _fs 
)
inlinevirtual

Set the cutoff frequency and sample rate.

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

Implements Filter< T >.

Referenced by BiQuad< math::Vector3 >::BiQuad(), and BiQuad< math::Vector3 >::SetFc().

◆ SetFc() [2/2]

void SetFc ( 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.

◆ SetValue()

virtual void SetValue ( const T &  _val)
inlinevirtual

Set the current filter's output.

Parameters
[in]_valNew filter's output.

Reimplemented from Filter< T >.

Member Data Documentation

◆ a0

double a0
protected

Input gain control coefficients.

Referenced by BiQuad< math::Vector3 >::process(), and BiQuad< math::Vector3 >::SetFc().

◆ a1

◆ a2

◆ b0

double b0
protected

◆ b1

◆ b2

◆ x1

T x1
protected

Gain of the feedback coefficients.

Referenced by BiQuad< math::Vector3 >::process(), and BiQuad< math::Vector3 >::SetValue().

◆ x2

◆ y0

◆ y1

◆ y2


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