The open source OpenXR runtime

a/tracking: Fix conversion warnings

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
f9b4af04 f0d5cc16

+4 -3
+4 -3
src/xrt/auxiliary/tracking/t_imu_fusion.hpp
··· 214 214 return Eigen::Quaterniond::Identity(); 215 215 } 216 216 time_duration_ns delta_ns = timestamp - state_time; 217 - float dt = time_ns_to_s(delta_ns); 217 + double dt = time_ns_to_s(delta_ns); 218 218 return quat_ * flexkalman::util::quat_exp(angVel_ * dt * 0.5); 219 219 } 220 220 inline bool ··· 227 227 "report"); 228 228 return false; 229 229 } 230 - time_duration_ns delta_ns = (last_gyro_timestamp_ == 0) ? 1e6 : timestamp - last_gyro_timestamp_; 230 + time_duration_ns delta_ns = 231 + (last_gyro_timestamp_ == 0) ? (time_duration_ns)1e6 : timestamp - last_gyro_timestamp_; 231 232 if (delta_ns > 1e10) { 232 233 233 234 SIMPLE_IMU_DEBUG("Clamping integration period"); 234 235 // Limit integration to 1/10th of a second 235 236 // Does not affect updating the last gyro timestamp. 236 - delta_ns = 1e10; 237 + delta_ns = (time_duration_ns)1e10; 237 238 } 238 239 float dt = time_ns_to_s(delta_ns); 239 240 last_gyro_timestamp_ = timestamp;