Public Member Functions | Protected Attributes | List of all members
gazebo::math::OnePole< T > Class Template Reference

A one-pole DSP filter. More...

#include <math/gzmath.hh>

Inheritance diagram for gazebo::math::OnePole< T >:
Inheritance graph
[legend]

Public Member Functions

 OnePole ()
 Constructor. More...
 
 OnePole (double _fc, double _fs)
 Constructor. 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...
 
- Public Member Functions inherited from gazebo::math::Filter< T >
virtual ~Filter ()
 Destructor. More...
 
virtual const T & GetValue ()
 Get the output of the filter. 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...
 
- Protected Attributes inherited from gazebo::math::Filter< T >
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

template<class T>
gazebo::math::OnePole< T >::OnePole ( )
inline

Constructor.

template<class T>
gazebo::math::OnePole< T >::OnePole ( double  _fc,
double  _fs 
)
inline

Constructor.

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

Member Function Documentation

template<class T>
const T& gazebo::math::OnePole< T >::Process ( const T &  _x)
inline

Update the filter's output.

[in] _x Input value.

Returns
The filter's current output.
template<class T>
virtual void gazebo::math::OnePole< T >::SetFc ( double  _fc,
double  _fs 
)
inlinevirtual

Set the cutoff frequency and sample rate.

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

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

Member Data Documentation

template<class T>
double gazebo::math::OnePole< T >::a0
protected

Input gain control.

template<class T>
double gazebo::math::OnePole< T >::b1
protected

Gain of the feedback.


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