SimpleFOClibrary  2.1
lowpass_filter.h
Go to the documentation of this file.
1 #ifndef LOWPASS_FILTER_H
2 #define LOWPASS_FILTER_H
3 
4 
5 #include "time_utils.h"
6 #include "foc_utils.h"
7 
12 {
13 public:
17  LowPassFilter(float Tf);
18  ~LowPassFilter() = default;
19 
20  float operator() (float x);
21  float Tf;
22 
23 protected:
24  unsigned long timestamp_prev;
25  float y_prev;
26 };
27 
28 #endif // LOWPASS_FILTER_H
LowPassFilter::~LowPassFilter
~LowPassFilter()=default
LowPassFilter::y_prev
float y_prev
filtered value in previous execution step
Definition: lowpass_filter.h:25
foc_utils.h
time_utils.h
LowPassFilter::timestamp_prev
unsigned long timestamp_prev
Last execution timestamp.
Definition: lowpass_filter.h:24
LowPassFilter::operator()
float operator()(float x)
Definition: lowpass_filter.cpp:11
LowPassFilter
Definition: lowpass_filter.h:12
LowPassFilter::Tf
float Tf
Low pass filter time constant.
Definition: lowpass_filter.h:21
LowPassFilter::LowPassFilter
LowPassFilter(float Tf)
Definition: lowpass_filter.cpp:3