41 uint64_t timestamp_ns);
51 uint64_t *out_timestamp_ns);
85 FilterFifo3F() =
delete;
87 FilterFifo3F(
size_t size)
104 get(
size_t num,
xrt_vec3 *out_sample, uint64_t *out_timestamp_ns)
110 filter(uint64_t start_ns,
size_t m_ff_vec3_f32_filter(struct m_ff_vec3_f32 *ff, uint64_t start_ns, uint64_t stop_ns, struct xrt_vec3 *out_average)
Averages all samples in the fifo between the two timepoints, returns number of samples sampled...
Definition: m_filter_fifo.c:112
void push(struct oxr_instance *inst, struct oxr_event *event)
Definition: oxr_event.c:62
A 3 element vector with single floats.
Definition: xrt_defines.h:133
void m_ff_vec3_f32_free(struct m_ff_vec3_f32 **ff_ptr)
Frees the given filter fifo and all it's samples.
Definition: m_filter_fifo.c:73
void m_ff_vec3_f32_push(struct m_ff_vec3_f32 *ff, const struct xrt_vec3 *sample, uint64_t timestamp_ns)
Pushes a sample at the given timepoint, pushing samples out of order yields unspecified behaviour...
Definition: m_filter_fifo.c:86
size_t num
Definition: m_filter_fifo.c:18
Definition: m_filter_fifo.c:16
Common defines and enums for XRT.
void m_ff_vec3_f32_alloc(struct m_ff_vec3_f32 **ff_out, size_t num)
Allocates a filter fifo tracking num samples and fills it with num samples at timepoint zero...
Definition: m_filter_fifo.c:65
struct vive_imu_sample sample[3]
Definition: vive_protocol.h:210
void m_ff_vec3_f32_get(struct m_ff_vec3_f32 *ff, size_t num, struct xrt_vec3 *out_sample, uint64_t *out_timestamp_ns)
Return the sample at the index, zero means the last sample push, one second last and so on...
Definition: m_filter_fifo.c:101