Monado OpenXR Runtime
|
A IMU fusion specially made for 3dof devices. More...
#include "xrt/xrt_defines.h"
Go to the source code of this file.
Data Structures | |
struct | m_imu_3dof |
Macros | |
#define | M_IMU_3DOF_USE_GRAVITY_DUR_300MS (1 << 0) |
#define | M_IMU_3DOF_USE_GRAVITY_DUR_20MS (1 << 1) |
Enumerations | |
enum | m_imu_3dof_state { M_IMU_3DOF_STATE_START = 0, M_IMU_3DOF_STATE_RUNNING = 1 } |
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 M_IMU_3DOF_USE_GRAVITY_DUR_20MS (1 << 1) |
Referenced by vive_controller_found().
#define M_IMU_3DOF_USE_GRAVITY_DUR_300MS (1 << 0) |
enum m_imu_3dof_state |
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.