From 152c12c283118347a4a34ffaa123ccbc24940812 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 20 Nov 2012 18:26:03 +1100 Subject: [PATCH] INS: fixed raw accel offset for APM1 we now get reasonable offset values --- libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp b/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp index 130b11398d..2aee5dfeaa 100644 --- a/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp +++ b/libraries/AP_InertialSensor/AP_InertialSensor_Oilpan.cpp @@ -23,7 +23,7 @@ const float AP_InertialSensor_Oilpan::_adc_constraint = 900; // Oilpan accelerometer scaling & offsets #define OILPAN_ACCEL_SCALE_1G (GRAVITY * 2.0 / (2465.0 - 1617.0)) -#define OILPAN_RAW_ACCEL_OFFSET ((2465.0 - 1617.0) / 2) +#define OILPAN_RAW_ACCEL_OFFSET ((2465.0 + 1617.0) * 0.5) #define OILPAN_RAW_GYRO_OFFSET 1658.0 #define ToRad(x) (x*0.01745329252) // *pi/180