From 52f3fe1d9af53e5f1dd40714aa177fcc4c5e0047 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 26 Jan 2015 20:23:42 +0100 Subject: Added more docs to offset as suggested by @velocoderaptor, thanks! --- src/drivers/mpu6000/mpu6000.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp index 1c35bae2d..2be758244 100644 --- a/src/drivers/mpu6000/mpu6000.cpp +++ b/src/drivers/mpu6000/mpu6000.cpp @@ -921,7 +921,17 @@ MPU6000::gyro_self_test() if (self_test()) return 1; + /* + * Maximum deviation of 20 degrees, according to + * http://www.invensense.com/mems/gyro/documents/PS-MPU-6000A-00v3.4.pdf + * Section 6.1, initial ZRO tolerance + */ const float max_offset = 0.34f; + /* 30% scale error is chosen to catch completely faulty units but + * to let some slight scale error pass. Requires a rate table or correlation + * with mag rotations + data fit to + * calibrate properly and is not done by default. + */ const float max_scale = 0.3f; /* evaluate gyro offsets, complain if offset -> zero or larger than 20 dps. */ -- cgit v1.2.3