27#define M_EURO_FILTER_HEAD_TRACKING_FCMIN 30.0
28#define M_EURO_FILTER_HEAD_TRACKING_FCMIN_D 25.0
29#define M_EURO_FILTER_HEAD_TRACKING_BETA 0.6
C interface to math library.
One Euro filter for a single float measurement.
Definition: m_filter_one_euro.h:65
void m_filter_euro_f32_run(struct m_filter_euro_f32 *f, uint64_t ts, const float *in_y, float *out_y)
Filter a measurement and commit changes to filter state.
Definition: m_filter_one_euro.c:136
double prev_y
The most recent measurement, after filtering.
Definition: m_filter_one_euro.h:70
double prev_dy
The most recent sample derivative, after filtering.
Definition: m_filter_one_euro.h:73
void m_filter_euro_f32_init(struct m_filter_euro_f32 *f, double fc_min, double fc_min_d, double beta)
Initialize a 1D filter.
Definition: m_filter_one_euro.c:130
struct m_filter_one_euro_base base
Base/common data.
Definition: m_filter_one_euro.h:67
One Euro filter for a unit quaternion (used as 3D rotation).
Definition: m_filter_one_euro.h:117
struct m_filter_one_euro_base base
Base/common data.
Definition: m_filter_one_euro.h:119
struct xrt_quat prev_dy
The most recent sample derivative, after filtering.
Definition: m_filter_one_euro.h:125
struct xrt_quat prev_y
The most recent measurement, after filtering.
Definition: m_filter_one_euro.h:122
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.
Definition: m_filter_one_euro.c:256
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.
Definition: m_filter_one_euro.c:262
One Euro filter for a 2D float measurement.
Definition: m_filter_one_euro.h:82
struct xrt_vec2 prev_y
The most recent measurement, after filtering.
Definition: m_filter_one_euro.h:87
void m_filter_euro_vec2_run(struct m_filter_euro_vec2 *f, uint64_t ts, const struct xrt_vec2 *in_y, struct xrt_vec2 *out_y)
Filter a measurement and commit changes to filter state.
Definition: m_filter_one_euro.c:169
struct m_filter_one_euro_base base
Base/common data.
Definition: m_filter_one_euro.h:84
struct xrt_vec2 prev_dy
The most recent sample derivative, after filtering.
Definition: m_filter_one_euro.h:90
void m_filter_euro_vec2_run_no_commit(struct m_filter_euro_vec2 *f, uint64_t ts, const struct xrt_vec2 *in_y, struct xrt_vec2 *out_y)
Filter a measurement without committing changes to filter state.
Definition: m_filter_one_euro.c:195
void m_filter_euro_vec2_init(struct m_filter_euro_vec2 *f, double fc_min, double fc_min_d, double beta)
Initialize a 2D filter.
Definition: m_filter_one_euro.c:163
One Euro filter for a 3D float measurement.
Definition: m_filter_one_euro.h:99
struct xrt_vec3 prev_y
The most recent measurement, after filtering.
Definition: m_filter_one_euro.h:104
void m_filter_euro_vec3_run(struct m_filter_euro_vec3 *f, uint64_t ts, const struct xrt_vec3 *in_y, struct xrt_vec3 *out_y)
Filter a measurement and commit changes to filter state.
Definition: m_filter_one_euro.c:229
struct xrt_vec3 prev_dy
The most recent sample derivative, after filtering.
Definition: m_filter_one_euro.h:107
struct m_filter_one_euro_base base
Base/common data.
Definition: m_filter_one_euro.h:101
void m_filter_euro_vec3_init(struct m_filter_euro_vec3 *f, double fc_min, double fc_min_d, double beta)
Initialize a 3D filter.
Definition: m_filter_one_euro.c:223
Base data type for One Euro filter instances.
Definition: m_filter_one_euro.h:42
float beta
Beta value for "responsiveness" of filter - default = 0.01.
Definition: m_filter_one_euro.h:50
float fc_min
Minimum frequency cutoff for filter, default = 25.0.
Definition: m_filter_one_euro.h:44
bool have_prev_y
true if we have already processed a history sample
Definition: m_filter_one_euro.h:53
uint64_t prev_ts
Timestamp of previous sample (nanoseconds)
Definition: m_filter_one_euro.h:56
float fc_min_d
Minimum frequency cutoff for derivative filter, default = 10.0.
Definition: m_filter_one_euro.h:47
A quaternion with single floats.
Definition: xrt_defines.h:216
A 2 element vector with single floats.
Definition: xrt_defines.h:250
A 3 element vector with single floats.
Definition: xrt_defines.h:271
Common defines and enums for XRT.