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

Here is the caller graph for this function:

◆ getLastOutput()

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

Here is the caller graph for this function:

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 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020