Monado OpenXR Runtime
|
One Euro filter for a unit quaternion (used as 3D rotation). More...
#include <math/m_filter_one_euro.h>
Public Member Functions | |
void | m_filter_euro_quat_init (struct m_filter_euro_quat *f, double fc_min, double fc_min_d, double beta) |
Initialize a unit quaternion (3D rotation) filter. More... | |
void | m_filter_euro_quat_run (struct m_filter_euro_quat *f, uint64_t ts, const struct xrt_quat *in_y, struct xrt_quat *out_y) |
Filter a measurement and commit changes to filter state. More... | |
Data Fields | |
struct m_filter_one_euro_base | base |
Base/common data. More... | |
struct xrt_quat | prev_y |
The most recent measurement, after filtering. More... | |
struct xrt_quat | prev_dy |
The most recent sample derivative, after filtering. More... | |
One Euro filter for a unit quaternion (used as 3D rotation).
void m_filter_euro_quat_init | ( | struct m_filter_euro_quat * | f, |
double | fc_min, | ||
double | fc_min_d, | ||
double | beta | ||
) |
Initialize a unit quaternion (3D rotation) filter.
f | self pointer |
fc_min | Minimum frequency cutoff for filter |
fc_min_d | Minimum frequency cutoff for derivative filter |
beta | Beta value for "responsiveness" of filter |
void m_filter_euro_quat_run | ( | struct m_filter_euro_quat * | f, |
uint64_t | ts, | ||
const struct xrt_quat * | in_y, | ||
struct xrt_quat * | out_y | ||
) |
Filter a measurement and commit changes to filter state.
[in,out] | f | self pointer |
ts | measurement timestamp | |
in_y | raw measurement | |
[out] | out_y | filtered measurement |
References base, filter_one_euro_compute_alpha_d(), filter_one_euro_handle_first_sample(), xrt_quat::math_quat_ln(), xrt_quat::math_quat_unrotate(), prev_dy, prev_y, and xrt_quat::XRT_QUAT_IDENTITY.
struct m_filter_one_euro_base m_filter_euro_quat::base |
Base/common data.
Referenced by m_filter_euro_quat_run().
struct xrt_quat m_filter_euro_quat::prev_dy |
The most recent sample derivative, after filtering.
Referenced by m_filter_euro_quat_run().
struct xrt_quat m_filter_euro_quat::prev_y |
The most recent measurement, after filtering.
Referenced by m_filter_euro_quat_run().