MRPT  1.9.9
mrpt::math::LowPassFilter_IIR1 Struct Reference

Detailed Description

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]

Definition at line 24 of file filters.h.

#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
 

Constructor & Destructor Documentation

◆ LowPassFilter_IIR1()

LowPassFilter_IIR1::LowPassFilter_IIR1 ( double  alpha = 0.5,
double  y_k_minus_1 = .0 
)

Definition at line 16 of file filters.cpp.

Member Function Documentation

◆ filter()

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().

◆ getLastOutput()

Member Data Documentation

◆ alpha

double mrpt::math::LowPassFilter_IIR1::alpha

See equation in LowPassFilter_IIR1.

Definition at line 32 of file filters.h.

Referenced by filter().

◆ m_y_km1

double mrpt::math::LowPassFilter_IIR1::m_y_km1
private

Definition at line 35 of file filters.h.

Referenced by filter(), and getLastOutput().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020