The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

d/wmr: Apply HMD IMU correction from calibration.

Apply the mix_matrix and bias_offsets adjustments for
IMU readings.

+6 -2
+6 -2
src/xrt/drivers/wmr/wmr_hmd.c
··· 264 264 struct xrt_vec3 raw_accel[4]; 265 265 266 266 for (int i = 0; i < 4; i++) { 267 - struct xrt_vec3 sample; 268 - vec3_from_hololens_gyro(wh->packet.gyro, i, &sample); 267 + struct xrt_vec3 raw_sample, sample; 268 + vec3_from_hololens_gyro(wh->packet.gyro, i, &raw_sample); 269 + math_matrix_3x3_transform_vec3(&wh->config.sensors.gyro.mix_matrix, &raw_sample, &sample); 270 + math_vec3_accum(&wh->config.sensors.gyro.bias_offsets, &sample); 269 271 math_quat_rotate_vec3(&wh->gyro_to_centerline.orientation, &sample, &raw_gyro[i]); 270 272 271 273 vec3_from_hololens_accel(wh->packet.accel, i, &sample); 274 + math_matrix_3x3_transform_vec3(&wh->config.sensors.accel.mix_matrix, &raw_sample, &sample); 275 + math_vec3_accum(&wh->config.sensors.accel.bias_offsets, &sample); 272 276 math_quat_rotate_vec3(&wh->accel_to_centerline.orientation, &sample, &raw_accel[i]); 273 277 } 274 278