MRPT
2.0.4
|
1-order low-pass IIR filter.
Discrete time equation: y[k]=alpha*y[k-1]+(1-alpha)*x[k]
. With: x[k] input, y[k] output, alpha a parameter in [0,1]
#include <mrpt/math/filters.h>
Public Member Functions | |
LowPassFilter_IIR1 (double alpha=0.5, double y_k_minus_1=.0) | |
double | filter (double x) |
Processes one input sample, updates the filter state and return the filtered value. More... | |
double | getLastOutput () const |
Public Attributes | |
double | alpha |
See equation in LowPassFilter_IIR1. More... | |
Private Attributes | |
double | m_y_km1 |
LowPassFilter_IIR1::LowPassFilter_IIR1 | ( | double | alpha = 0.5 , |
double | y_k_minus_1 = .0 |
||
) |
Definition at line 16 of file filters.cpp.
double LowPassFilter_IIR1::filter | ( | double | x | ) |
Processes one input sample, updates the filter state and return the filtered value.
Definition at line 21 of file filters.cpp.
References alpha, and m_y_km1.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().
double LowPassFilter_IIR1::getLastOutput | ( | ) | const |
Definition at line 29 of file filters.cpp.
References m_y_km1.
Referenced by mrpt::nav::CAbstractPTGBasedReactive::generate_vel_cmd(), mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep(), and mrpt::nav::CAbstractPTGBasedReactive::STEP8_GenerateLogRecord().
double mrpt::math::LowPassFilter_IIR1::alpha |
See equation in LowPassFilter_IIR1.
Definition at line 32 of file filters.h.
Referenced by filter().
|
private |
Definition at line 35 of file filters.h.
Referenced by filter(), and getLastOutput().
Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020 |