mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-16 11:55:39 +00:00
a/tracking: Fix conversion warnings
This commit is contained in:
parent
f0d5cc1670
commit
f9b4af04e4
|
@ -214,7 +214,7 @@ SimpleIMUFusion::getPredictedQuat(timepoint_ns timestamp) const
|
||||||
return Eigen::Quaterniond::Identity();
|
return Eigen::Quaterniond::Identity();
|
||||||
}
|
}
|
||||||
time_duration_ns delta_ns = timestamp - state_time;
|
time_duration_ns delta_ns = timestamp - state_time;
|
||||||
float dt = time_ns_to_s(delta_ns);
|
double dt = time_ns_to_s(delta_ns);
|
||||||
return quat_ * flexkalman::util::quat_exp(angVel_ * dt * 0.5);
|
return quat_ * flexkalman::util::quat_exp(angVel_ * dt * 0.5);
|
||||||
}
|
}
|
||||||
inline bool
|
inline bool
|
||||||
|
@ -227,13 +227,14 @@ SimpleIMUFusion::handleGyro(Eigen::Vector3d const &gyro, timepoint_ns timestamp)
|
||||||
"report");
|
"report");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
time_duration_ns delta_ns = (last_gyro_timestamp_ == 0) ? 1e6 : timestamp - last_gyro_timestamp_;
|
time_duration_ns delta_ns =
|
||||||
|
(last_gyro_timestamp_ == 0) ? (time_duration_ns)1e6 : timestamp - last_gyro_timestamp_;
|
||||||
if (delta_ns > 1e10) {
|
if (delta_ns > 1e10) {
|
||||||
|
|
||||||
SIMPLE_IMU_DEBUG("Clamping integration period");
|
SIMPLE_IMU_DEBUG("Clamping integration period");
|
||||||
// Limit integration to 1/10th of a second
|
// Limit integration to 1/10th of a second
|
||||||
// Does not affect updating the last gyro timestamp.
|
// Does not affect updating the last gyro timestamp.
|
||||||
delta_ns = 1e10;
|
delta_ns = (time_duration_ns)1e10;
|
||||||
}
|
}
|
||||||
float dt = time_ns_to_s(delta_ns);
|
float dt = time_ns_to_s(delta_ns);
|
||||||
last_gyro_timestamp_ = timestamp;
|
last_gyro_timestamp_ = timestamp;
|
||||||
|
|
Loading…
Reference in a new issue