Loosen gyro zeroing fault thresholds
Change-Id: I915ce4234bbb5f9865cd0c7f4c5a2d490baeb68b
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/frc971/zeroing/imu_zeroer.h b/frc971/zeroing/imu_zeroer.h
index 2473a66..f3af9c5 100644
--- a/frc971/zeroing/imu_zeroer.h
+++ b/frc971/zeroing/imu_zeroer.h
@@ -47,7 +47,7 @@
static constexpr double kAccelMaxVariation = 0.05; // g's
// If we ever are able to rezero and get a zero that is more than
// kGyroFaultVariation away from the original zeroing, fault.
- static constexpr double kGyroFaultVariation = 0.005; // rad / sec
+ static constexpr double kGyroFaultVariation = 0.05; // rad / sec
bool GyroZeroReady() const;
bool AccelZeroReady() const;
diff --git a/frc971/zeroing/imu_zeroer_test.cc b/frc971/zeroing/imu_zeroer_test.cc
index b984b1a..0a68541 100644
--- a/frc971/zeroing/imu_zeroer_test.cc
+++ b/frc971/zeroing/imu_zeroer_test.cc
@@ -163,7 +163,7 @@
<< "We should not fault until we complete a second cycle of zeroing.";
for (size_t ii = 0; ii < kMinSamplesToZero; ++ii) {
zeroer.InsertAndProcessMeasurement(
- MakeMeasurement({0.01, 0.05, 0.03}, {4, 5, 6}).message());
+ MakeMeasurement({0.01, -0.05, 0.03}, {4, 5, 6}).message());
}
ASSERT_TRUE(zeroer.Faulted());
ASSERT_FALSE(zeroer.Zeroed());