Main MRPT website > C++ reference for MRPT 1.9.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 26 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()

double LowPassFilter_IIR1::getLastOutput ( ) const

Member Data Documentation

◆ alpha

double mrpt::math::LowPassFilter_IIR1::alpha

See equation in LowPassFilter_IIR1.

Definition at line 34 of file filters.h.

Referenced by filter().

◆ m_y_km1

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

Definition at line 37 of file filters.h.

Referenced by filter(), and getLastOutput().




Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST