The open source OpenXR runtime
0
fork

Configure Feed

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

d/vive: Document conversion value

+5 -2
+5 -2
src/xrt/drivers/vive/vive_device.c
··· 35 35 #include "vive_source.h" 36 36 #include "xrt/xrt_tracking.h" 37 37 38 + // Used to scale the IMU range from config. 39 + #define VIVE_IMU_RANGE_CONVERSION_VALUE (32768.0) 40 + 38 41 39 42 static bool 40 43 vive_mainboard_power_off(struct vive_device *d); ··· 377 380 d->config.imu.acc_bias.z, 378 381 }; 379 382 380 - scale = (double)d->config.imu.acc_range / 32768.0f; 383 + scale = (double)d->config.imu.acc_range / VIVE_IMU_RANGE_CONVERSION_VALUE; 381 384 struct xrt_vec3 acceleration = { 382 385 scale * acc_scale[0] * acc[0] - acc_bias[0], 383 386 scale * acc_scale[1] * acc[1] - acc_bias[1], ··· 413 416 d->config.imu.gyro_bias.z, 414 417 }; 415 418 416 - scale = (double)d->config.imu.gyro_range / 32768.0f; 419 + scale = (double)d->config.imu.gyro_range / VIVE_IMU_RANGE_CONVERSION_VALUE; 417 420 struct xrt_vec3 angular_velocity = { 418 421 scale * gyro_scale[0] * gyro[0] - gyro_bias[0], 419 422 scale * gyro_scale[1] * gyro[1] - gyro_bias[1],