Monado OpenXR Runtime
|
A IMU fusion specially made for 3dof devices. More...
#include "util/u_misc.h"
#include "math/m_api.h"
#include "math/m_filter_fifo.h"
#include "math/m_imu_3dof.h"
#include "math/m_vec3.h"
#include <stdio.h>
Macros | |
#define | DUR_1S_IN_NS (1000 * 1000 * 1000) |
#define | DUR_300MS_IN_NS (300 * 1000 * 1000) |
#define | DUR_20MS_IN_NS (20 * 1000 * 1000) |
Functions | |
void | m_imu_3dof_init (struct m_imu_3dof *f, int flags) |
void | m_imu_3dof_close (struct m_imu_3dof *f) |
void | m_imu_3dof_update (struct m_imu_3dof *f, uint64_t timepoint_ns, const struct xrt_vec3 *accel, const struct xrt_vec3 *gyro) |
A IMU fusion specially made for 3dof devices.
#define DUR_1S_IN_NS (1000 * 1000 * 1000) |
Referenced by m_imu_3dof_update().
#define DUR_20MS_IN_NS (20 * 1000 * 1000) |
#define DUR_300MS_IN_NS (300 * 1000 * 1000) |
void m_imu_3dof_close | ( | struct m_imu_3dof * | f | ) |
References m_imu_3dof::gyro_ff, m_ff_vec3_f32_free(), and m_imu_3dof::word_accel_ff.
void m_imu_3dof_init | ( | struct m_imu_3dof * | f, |
int | flags | ||
) |
References m_imu_3dof::flags, m_imu_3dof::gyro_ff, m_ff_vec3_f32_alloc(), m_imu_3dof::rot, U_ZERO, xrt_quat::w, and m_imu_3dof::word_accel_ff.
Referenced by vive_controller_found().
void m_imu_3dof_update | ( | struct m_imu_3dof * | f, |
uint64_t | timepoint_ns, | ||
const struct xrt_vec3 * | accel, | ||
const struct xrt_vec3 * | gyro | ||
) |
Skip the first sample.
References m_imu_3dof::accel, m_imu_3dof::delta_ms, DUR_1S_IN_NS, m_imu_3dof::gyro, gyro, m_imu_3dof::gyro_ff, m_imu_3dof::last, m_ff_vec3_f32_push(), M_IMU_3DOF_STATE_RUNNING, M_IMU_3DOF_STATE_START, xrt_vec3::math_quat_rotate_vec3(), m_imu_3dof::rot, m_imu_3dof::state, m_imu_3dof::timepoint_ns, and m_imu_3dof::word_accel_ff.