Monado OpenXR Runtime
Functions
m_imu_pre.c File Reference

IMU pre filter struct. More...

#include "math/m_api.h"
#include "math/m_imu_pre.h"
Include dependency graph for m_imu_pre.c:

Functions

void m_imu_pre_filter_init (struct m_imu_pre_filter *imu, float ticks_to_float_accel, float ticks_to_float_gyro)
 A simple init function that just takes the two ticks_to_float values, all other values are set to identity. More...
 
void m_imu_pre_filter_set_switch_x_and_y (struct m_imu_pre_filter *imu)
 Sets the transformation to flip X and Y axis. More...
 
void m_imu_pre_filter_data (struct m_imu_pre_filter *imu, const struct xrt_vec3_i32 *accel, const struct xrt_vec3_i32 *gyro, struct xrt_vec3 *out_accel, struct xrt_vec3 *out_gyro)
 Pre-filters the values, taking them from ticks into float values. More...
 

Detailed Description

IMU pre filter struct.

Author
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Function Documentation

◆ m_imu_pre_filter_data()

void m_imu_pre_filter_data ( struct m_imu_pre_filter imu,
const struct xrt_vec3_i32 accel,
const struct xrt_vec3_i32 gyro,
struct xrt_vec3 out_accel,
struct xrt_vec3 out_gyro 
)

Pre-filters the values, taking them from ticks into float values.

See description of m_imu_pre_filter_part for formula used. Also rotates values with the imu_to_head pose.

◆ m_imu_pre_filter_init()

void m_imu_pre_filter_init ( struct m_imu_pre_filter imu,
float  ticks_to_float_accel,
float  ticks_to_float_gyro 
)

A simple init function that just takes the two ticks_to_float values, all other values are set to identity.

◆ m_imu_pre_filter_set_switch_x_and_y()

void m_imu_pre_filter_set_switch_x_and_y ( struct m_imu_pre_filter imu)

Sets the transformation to flip X and Y axis.

This changes the handedness of the coordinates.