OnePole< T > Class Template Reference
A one-pole DSP filter. More...
#include <gz/math/Filter.hh>
Public Member Functions | |
OnePole ()=default | |
Constructor. More... | |
OnePole (double _fc, double _fs) | |
Constructor. More... | |
virtual void | Fc (double _fc, double _fs) override |
Set the cutoff frequency and sample rate. More... | |
const T & | Process (const T &_x) |
Update the filter's output. More... | |
Public Member Functions inherited from Filter< T > | |
virtual | ~Filter () |
Destructor. More... | |
virtual void | Set (const T &_val) |
Set the output of the filter. More... | |
virtual const T & | Value () const |
Get the output of the filter. More... | |
Protected Attributes | |
double | a0 = 0 |
Input gain control. More... | |
double | b1 = 0 |
Gain of the feedback. More... | |
Protected Attributes inherited from Filter< T > | |
T | y0 {} |
Output. More... | |
Detailed Description
template<class T>
class gz::math::OnePole< T >
A one-pole DSP filter.
Constructor & Destructor Documentation
◆ OnePole() [1/2]
|
default |
Constructor.
◆ OnePole() [2/2]
|
inline |
Member Function Documentation
◆ Fc()
|
inlineoverridevirtual |
Set the cutoff frequency and sample rate.
- Parameters
-
[in] _fc Cutoff frequency. [in] _fs Sample rate.
Implements Filter< T >.
References OnePole< T >::a0, OnePole< T >::b1, and GZ_PI.
Referenced by OnePole< T >::OnePole().
◆ Process()
|
inline |
Update the filter's output.
- Parameters
-
[in] _x Input value.
- Returns
- The filter's current output.
References OnePole< T >::a0, OnePole< T >::b1, and Filter< T >::y0.
Member Data Documentation
◆ a0
|
protected |
Input gain control.
Referenced by OnePole< T >::Fc(), and OnePole< T >::Process().
◆ b1
|
protected |
Gain of the feedback.
Referenced by OnePole< T >::Fc(), and OnePole< T >::Process().
The documentation for this class was generated from the following file: