Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
qlibs::smootherLPF2 Class Reference

A 2nd order Low-Pass Filter. More...

#include <smoother.hpp>

Inheritance diagram for qlibs::smootherLPF2:
qlibs::smoother

Public Member Functions

virtual ~smootherLPF2 ()
 
bool setup (const real_t a=0.9_re)
 Setup an initialize the 2nd order Low-Pass Filter.
 
real_t smooth (const real_t x) override
 Perform the smooth operation recursively for the input signal x.
 
- Public Member Functions inherited from qlibs::smoother
virtual ~smoother ()
 
bool isInitialized (void) const
 Check if the smoother filter is initialized.
 
bool reset (void)
 Reset the the smoother filter.
 

Detailed Description

A 2nd order Low-Pass Filter.

Constructor & Destructor Documentation

◆ ~smootherLPF2()

virtual qlibs::smootherLPF2::~smootherLPF2 ( )
inlinevirtual

Member Function Documentation

◆ setup()

bool smootherLPF2::setup ( const real_t a = 0.9_re)

Setup an initialize the 2nd order Low-Pass Filter.

Parameters
[in]aThe filter adjustment parameter. A value between [ 0 < a < 1 ]
Returns
true on success, otherwise return false.

◆ smooth()

real_t smootherLPF2::smooth ( const real_t x)
overridevirtual

Perform the smooth operation recursively for the input signal x.

Precondition
Instance must be previously initialized
Parameters
[in]xA sample of the input signal.
Returns
The smoothed output.

Implements qlibs::smoother.