Bi-quad filter base class. More...
#include <ignition/math/Filter.hh>
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... | |
![]() | |
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 |
T | x1 {} |
Gain of the feedback coefficients. More... | |
T | x2 {} |
T | y1 {} |
T | y2 {} |
![]() | |
T | y0 {} |
Output. More... | |
Bi-quad filter base class.
|
default |
Constructor.
|
inline |
Constructor.
[in] | _fc | Cutoff frequency. |
[in] | _fs | Sample rate. |
|
inlinevirtual |
Set the cutoff frequency and sample rate.
[in] | _fc | Cutoff frequency. |
[in] | _fs | Sample rate. |
Implements ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Filter< T >.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::BiQuad(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::Fc().
|
inline |
Set the cutoff frequency, sample rate and Q coefficient.
[in] | _fc | Cutoff frequency. |
[in] | _fs | Sample rate. |
[in] | _q | Q coefficient. |
|
inlinevirtual |
Update the filter's output.
[in] | _x | Input value. |
|
inlinevirtual |
Set the current filter's output.
[in] | _val | New filter's output. |
Reimplemented from ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Filter< T >.
|
protected |
Input gain control coefficients.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::Fc(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::Process().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Gain of the feedback coefficients.
Referenced by ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::Process(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::BiQuad< math::Vector3d >::Set().
|
protected |
|
protected |
|
protected |