Monado OpenXR Runtime
|
Public Member Functions | |
m_lowpass_integer (Rational64 alpha) | |
struct m_lowpass_integer * | m_lowpass_integer_create (int64_t alpha_numerator, int64_t alpha_denominator) |
Constructor. More... | |
void | m_lowpass_integer_add_sample (struct m_lowpass_integer *mli, int64_t sample) |
Filter a sample. More... | |
int64_t | m_lowpass_integer_get_state (const struct m_lowpass_integer *mli) |
Get the filtered value. More... | |
bool | m_lowpass_integer_is_initialized (const struct m_lowpass_integer *mli) |
Get whether we have initialized state. More... | |
void | m_lowpass_integer_destroy (struct m_lowpass_integer **ptr_to_mli) |
Destroy a lowpass integer filter. More... | |
Data Fields | |
IntegerLowPassIIRFilter< int64_t > | filter |
void m_lowpass_integer_add_sample | ( | struct m_lowpass_integer * | mli, |
int64_t | sample | ||
) |
Filter a sample.
mli | self-pointer |
sample | The value to filter |
struct m_lowpass_integer * m_lowpass_integer_create | ( | int64_t | alpha_numerator, |
int64_t | alpha_denominator | ||
) |
Constructor.
Together, the two parameters specify the alpha value used to blend between new input and existing state. Larger values mean more influence from new input.
alpha_numerator | The numerator of the alpha value. Must be greater than 0 and less than alpha_denominator |
alpha_denominator | The denominator of the alpha value. Must be greater than 0. |
void m_lowpass_integer_destroy | ( | struct m_lowpass_integer ** | ptr_to_mli | ) |
Destroy a lowpass integer filter.
Does null checks.
ptr_to_mli | Address of your lowpass integer filter. Will be set to zero. |
int64_t m_lowpass_integer_get_state | ( | const struct m_lowpass_integer * | mli | ) |
Get the filtered value.
Probably 0 or other meaningless value if it's not initialized: see m_lowpass_integer_is_initialized
mli | self-pointer |
References xrt::auxiliary::math::IntegerLowPassIIRFilter< Scalar >::getState().
bool m_lowpass_integer_is_initialized | ( | const struct m_lowpass_integer * | mli | ) |
Get whether we have initialized state.
mli | self-pointer |
References xrt::auxiliary::math::IntegerLowPassIIRFilter< Scalar >::isInitialized().