Monado OpenXR Runtime
|
Public Member Functions | |
m_lowpass_float (float cutoff_hz) | |
struct m_lowpass_float * | m_lowpass_float_create (float cutoff_hz) |
Constructor. More... | |
void | m_lowpass_float_add_sample (struct m_lowpass_float *mlf, float sample, timepoint_ns timestamp_ns) |
Filter a sample. More... | |
float | m_lowpass_float_get_state (const struct m_lowpass_float *mlf) |
Get the filtered value. More... | |
timepoint_ns | m_lowpass_float_get_timestamp_ns (const struct m_lowpass_float *mlf) |
Get the time of last update. More... | |
bool | m_lowpass_float_is_initialized (const struct m_lowpass_float *mlf) |
Get whether we have initialized state. More... | |
void | m_lowpass_float_destroy (struct m_lowpass_float **ptr_to_mlf) |
Destroy a lowpass integer filter. More... | |
Data Fields | |
LowPassIIRFilter< float > | filter |
void m_lowpass_float_add_sample | ( | struct m_lowpass_float * | mlf, |
float | sample, | ||
timepoint_ns | timestamp_ns | ||
) |
Filter a sample.
mlf | self-pointer |
sample | The value to filter |
timestamp_ns | The time that this sample was measured. |
struct m_lowpass_float * m_lowpass_float_create | ( | float | cutoff_hz | ) |
Constructor.
cutoff_hz | A cutoff frequency in Hertz: signal changes much lower in frequency will be passed through the filter, while signal changes much higher in frequency will be blocked. |
void m_lowpass_float_destroy | ( | struct m_lowpass_float ** | ptr_to_mlf | ) |
Destroy a lowpass integer filter.
Does null checks.
ptr_to_mlf | Address of your lowpass integer filter. Will be set to zero. |
float m_lowpass_float_get_state | ( | const struct m_lowpass_float * | mlf | ) |
Get the filtered value.
Probably 0 or other meaningless value if it's not initialized: see m_lowpass_float_is_initialized
mlf | self-pointer |
References xrt::auxiliary::math::LowPassIIRFilter< Scalar >::getState().
timepoint_ns m_lowpass_float_get_timestamp_ns | ( | const struct m_lowpass_float * | mlf | ) |
Get the time of last update.
mlf | self-pointer |
References xrt::auxiliary::math::LowPassIIRFilter< Scalar >::getTimestampNs().
bool m_lowpass_float_is_initialized | ( | const struct m_lowpass_float * | mlf | ) |
Get whether we have initialized state.
mlf | self-pointer |
References xrt::auxiliary::math::LowPassIIRFilter< Scalar >::isInitialized().