Requantize by resolution / 8
Requantizing by resolution / 4 causing the calibration error / min on
calibrated sensors to be too high. Changing to 8 reduces that error
enough to keep sensor accuracy below our thresholds.
Bug: 158451802
Test: Verify that calibration error / min is low
Change-Id: I350980734cc0a46f4f06878371e0d9bd7ce07de0
diff --git a/services/sensorservice/SensorDeviceUtils.h b/services/sensorservice/SensorDeviceUtils.h
index d7e621c..c232f0b 100644
--- a/services/sensorservice/SensorDeviceUtils.h
+++ b/services/sensorservice/SensorDeviceUtils.h
@@ -36,7 +36,7 @@
// Increase the value of the sensor's nominal resolution to ensure that
// sensor accuracy improvements, like runtime calibration, are not masked
// during requantization.
- double incRes = 0.25 * resolution;
+ double incRes = 0.125 * resolution;
*value = round(static_cast<double>(*value) / incRes) * incRes;
}