Monado OpenXR Runtime
|
A very simple integer low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR), also known as an exponential filter. More...
#include <math/m_lowpass_integer.hpp>
Public Member Functions | |
IntegerLowPassIIRFilter (math::Rational< Scalar > alpha) noexcept | |
Constructor. More... | |
void | reset () noexcept |
Reset the filter to newly-created state. More... | |
void | addSample (Scalar sample, math::Rational< Scalar > weight=math::Rational< Scalar >::simplestUnity()) |
Filter a sample, with an optional weight. More... | |
Scalar | getState () const noexcept |
Get the filtered value. More... | |
bool | isInitialized () const noexcept |
Get whether we have initialized state. More... | |
A very simple integer low-pass filter, using a "one-pole infinite impulse response" design (one-pole IIR), also known as an exponential filter.
Configurable in scalar type.
|
inlineexplicitnoexcept |
Constructor.
alpha | The alpha value used to blend between new input and existing state. Larger values mean more influence from new input. math::Rational::isBetweenZeroAndOne() must be true for alpha . |
|
inline |
Filter a sample, with an optional weight.
sample | The value to filter |
weight | An optional value between 0 and 1. The smaller this value, the less the current sample influences the filter state. For the first call, this is always assumed to be 1 regardless of what you pass. |
|
inlinenoexcept |
Get the filtered value.
Referenced by m_lowpass_integer::m_lowpass_integer_get_state().
|
inlinenoexcept |
Get whether we have initialized state.
Referenced by m_lowpass_integer::m_lowpass_integer_is_initialized().
|
inlinenoexcept |
Reset the filter to newly-created state.
References xrt::auxiliary::math::detail::IntegerLowPassIIR< Value, Scalar >::reset().