altoslib: Compute orientation from eeprom data files
[fw/altos] / altoslib / AltosEepromRecordMega.java
index 0abc3fe73865c64bae21ec23d5f39c0f0fee47e7..18d435afd7f582c73658c1f7cb2619dcc239188a 100644 (file)
@@ -161,11 +161,13 @@ public class AltosEepromRecordMega extends AltosEepromRecord {
                                         cal_data.mag_through(mag_through));
 
 
+                       final double lsb_per_g = 1920.0/105.5;
+
                        double acceleration = AltosConvert.acceleration_from_sensor(
                                accel(),
-                               config_data.accel_cal_plus,
-                               config_data.accel_cal_minus,
-                               AltosLib.MISSING);
+                               cal_data.ground_accel,
+                               cal_data.ground_accel + 2 * lsb_per_g,
+                               cal_data.ground_accel);
 
                        listener.set_acceleration(acceleration);
                        break;