ButterworthFilter Class Reference

#include <ArmarXCore/observers/filters/rtfilters/ButterworthFilter.h>

+ Inheritance diagram for ButterworthFilter:

Public Member Functions

 ButterworthFilter (double frequency, int sampleRate, PassType filterPassType, double resonance)
 
double calculate () override
 
RTFilterBasePtr clone () const override
 
void setInitialValue (double value)
 
double update (const IceUtil::Time &timestamp, double newValue) override
 
- Public Member Functions inherited from RTFilterBase
double getCurrentValue () const
 
virtual void reset ()
 
 RTFilterBase (const RTFilterBase &other)=default
 
 RTFilterBase (size_t historySize)
 
double update (double deltaSec, double newValue)
 
virtual ~RTFilterBase ()
 

Protected Attributes

double a1
 
double a2
 
double a3
 
double b1
 
double b2
 
double c
 
::armarx::PassType filterPassType
 
double frequency
 
std::vector< double > inputHistory = std::vector<double>(2, 0.0)
 Array of input values, latest are in front. More...
 
double newestValue
 
std::vector< double > outputHistory = std::vector<double>(3, 0.0)
 Array of output values, latest are in front. More...
 
double resonance
 
int sampleRate
 
- Protected Attributes inherited from RTFilterBase
double currentValue = 0.0
 
boost::circular_buffer< std::pair< IceUtil::Time, double > > dataHistory
 

Detailed Description

Definition at line 34 of file ButterworthFilter.h.

Constructor & Destructor Documentation

◆ ButterworthFilter()

ButterworthFilter ( double  frequency,
int  sampleRate,
PassType  filterPassType,
double  resonance 
)

Definition at line 33 of file ButterworthFilter.cpp.

+ Here is the caller graph for this function:

Member Function Documentation

◆ calculate()

double calculate ( )
overridevirtual

Implements RTFilterBase.

Definition at line 89 of file ButterworthFilter.cpp.

+ Here is the caller graph for this function:

◆ clone()

RTFilterBasePtr clone ( ) const
overridevirtual

Implements RTFilterBase.

Definition at line 70 of file ButterworthFilter.cpp.

+ Here is the call graph for this function:

◆ setInitialValue()

void setInitialValue ( double  value)

Definition at line 76 of file ButterworthFilter.cpp.

+ Here is the call graph for this function:

◆ update()

double update ( const IceUtil::Time &  timestamp,
double  newValue 
)
overridevirtual

Reimplemented from RTFilterBase.

Definition at line 103 of file ButterworthFilter.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ a1

double a1
protected

Definition at line 62 of file ButterworthFilter.h.

◆ a2

double a2
protected

Definition at line 64 of file ButterworthFilter.h.

◆ a3

double a3
protected

Definition at line 66 of file ButterworthFilter.h.

◆ b1

double b1
protected

Definition at line 68 of file ButterworthFilter.h.

◆ b2

double b2
protected

Definition at line 70 of file ButterworthFilter.h.

◆ c

double c
protected

Definition at line 60 of file ButterworthFilter.h.

◆ filterPassType

::armarx::PassType filterPassType
protected

Definition at line 58 of file ButterworthFilter.h.

◆ frequency

double frequency
protected

Definition at line 54 of file ButterworthFilter.h.

◆ inputHistory

std::vector<double> inputHistory = std::vector<double>(2, 0.0)
protected

Array of input values, latest are in front.

Definition at line 47 of file ButterworthFilter.h.

◆ newestValue

double newestValue
protected

Definition at line 45 of file ButterworthFilter.h.

◆ outputHistory

std::vector<double> outputHistory = std::vector<double>(3, 0.0)
protected

Array of output values, latest are in front.

Definition at line 50 of file ButterworthFilter.h.

◆ resonance

double resonance
protected

Definition at line 52 of file ButterworthFilter.h.

◆ sampleRate

int sampleRate
protected

Definition at line 56 of file ButterworthFilter.h.


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