OnePole< T > Class Template Reference

A one-pole DSP filter. More...

#include <math/gzmath.hh>

Inherits Filter< T >.

Public Member Functions

 OnePole ()
 Constructor. More...
 
 OnePole (double _fc, double _fs)
 Constructor. More...
 
virtual const T & GetValue ()
 Get the output of the filter. More...
 
const T & Process (const T &_x)
 Update the filter's output. More...
 
virtual void SetFc (double _fc, double _fs)
 Set the cutoff frequency and sample rate. More...
 
virtual void SetValue (const T &_val)
 Set the output of the filter. More...
 

Protected Attributes

double a0
 Input gain control. More...
 
double b1
 Gain of the feedback. More...
 
y0
 Output. More...
 

Detailed Description

template<class T>
class gazebo::math::OnePole< T >

A one-pole DSP filter.

See also
http://www.earlevel.com/main/2012/12/15/a-one-pole-filter/

Constructor & Destructor Documentation

§ OnePole() [1/2]

OnePole ( )
inline

Constructor.

§ OnePole() [2/2]

OnePole ( double  _fc,
double  _fs 
)
inline

Constructor.

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

Member Function Documentation

§ GetValue()

virtual const T& GetValue ( )
inlinevirtualinherited

Get the output of the filter.

Returns
Filter's output.

§ Process()

const T& Process ( const T &  _x)
inline

Update the filter's output.

[in] _x Input value.

Returns
The filter's current output.

§ SetFc()

virtual void SetFc ( double  _fc,
double  _fs 
)
inlinevirtual

Set the cutoff frequency and sample rate.

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

Implements Filter< T >.

§ SetValue()

virtual void SetValue ( const T &  _val)
inlinevirtualinherited

Set the output of the filter.

Parameters
[in]_valNew value.

Reimplemented in BiQuad< T >, and BiQuad< math::Vector3 >.

Referenced by BiQuadVector3::BiQuadVector3(), OnePoleQuaternion::OnePoleQuaternion(), and OnePoleVector3::OnePoleVector3().

Member Data Documentation

§ a0

double a0
protected

Input gain control.

§ b1

double b1
protected

Gain of the feedback.

§ y0


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