Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Public Member Functions | Public Attributes | Private Attributes
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 28 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 22 of file filters.cpp.

References alpha, and m_y_km1.

Referenced by mrpt::nav::CAbstractPTGBasedReactive::performNavigationStep().

◆ getLastOutput()

double LowPassFilter_IIR1::getLastOutput ( ) const

Member Data Documentation

◆ alpha

double mrpt::math::LowPassFilter_IIR1::alpha

See equation in LowPassFilter_IIR1.

Definition at line 33 of file filters.h.

Referenced by filter().

◆ m_y_km1

double mrpt::math::LowPassFilter_IIR1::m_y_km1

Definition at line 35 of file filters.h.

Referenced by filter(), and getLastOutput().

Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020