locationd: disable falling device detector (#23431)

old-commit-hash: ef225e3e3515c449ba9f69d6e28c02912f1579c3
This commit is contained in:
Adeeb Shihadeh
2022-01-06 12:01:14 -08:00
committed by GitHub
parent 1f0b5a6bc0
commit 305a8eac79
+2 -1
View File
@@ -232,9 +232,10 @@ void Localizer::handle_sensors(double current_time, const capnp::List<cereal::Se
if (sensor_reading.getSensor() == SENSOR_ACCELEROMETER && sensor_reading.getType() == SENSOR_TYPE_ACCELEROMETER) {
auto v = sensor_reading.getAcceleration().getV();
// TODO: reduce false positives and re-enable this check
// check if device fell, estimate 10 for g
// 40m/s**2 is a good filter for falling detection, no false positives in 20k minutes of driving
this->device_fell |= (floatlist2vector(v) - Vector3d(10.0, 0.0, 0.0)).norm() > 40.0;
//this->device_fell |= (floatlist2vector(v) - Vector3d(10.0, 0.0, 0.0)).norm() > 40.0;
auto meas = Vector3d(-v[2], -v[1], -v[0]);
if (meas.norm() < ACCEL_SANITY_CHECK) {