SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
LowPassFilter Class Reference

#include <lowpass_filter.h>

Public Member Functions

 LowPassFilter (float Tf, float Ts=NOT_SET)
 
 ~LowPassFilter ()=default
 
float operator() (float x)
 

Public Attributes

float Tf
 Low pass filter time constant.
 
float Ts
 Fixed sampling time (optional default NOT_SET)
 

Protected Attributes

unsigned long timestamp_prev
 Last execution timestamp.
 
float y_prev
 filtered value in previous execution step
 

Detailed Description

Low pass filter class

Definition at line 11 of file lowpass_filter.h.

Constructor & Destructor Documentation

◆ LowPassFilter()

LowPassFilter::LowPassFilter ( float  Tf,
float  Ts = NOT_SET 
)
Parameters
Tf- Low pass filter time constant
Ts- Filter sampling time
Note
If sampling time Ts is not set the filter will measure the elapsed time between each call.
Ts can be changed dynamically as well by modifying the variable in runtime.

Definition at line 3 of file lowpass_filter.cpp.

Here is the call graph for this function:

◆ ~LowPassFilter()

LowPassFilter::~LowPassFilter ( )
default

Member Function Documentation

◆ operator()()

Definition at line 12 of file lowpass_filter.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ Tf

float LowPassFilter::Tf

Low pass filter time constant.

Definition at line 27 of file lowpass_filter.h.

◆ timestamp_prev

unsigned long LowPassFilter::timestamp_prev
protected

Last execution timestamp.

Definition at line 31 of file lowpass_filter.h.

◆ Ts

float LowPassFilter::Ts

Fixed sampling time (optional default NOT_SET)

Definition at line 28 of file lowpass_filter.h.

◆ y_prev

float LowPassFilter::y_prev
protected

filtered value in previous execution step

Definition at line 32 of file lowpass_filter.h.


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