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 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 1.9.9 Git: 479715d5b Tue Nov 12 07:26:21 2019 +0100 at mar nov 12 07:30:12 CET 2019