diff options
author | Keith Packard <keithp@keithp.com> | 2017-06-08 20:37:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-06-08 20:37:58 -0700 |
commit | 32de85691f2e4ed1430a259e05a514ad820b32d9 (patch) | |
tree | 25ba96ae1bf03732c4cb6ef419bdc9286be1f091 /altoslib/AltosEepromRecordMega.java | |
parent | 4c5acb57d7ac1abec7bb4cda9dc88c2a19767a2d (diff) |
altoslib: Compute orientation from eeprom data files
This was lost in the AltosFlightSeries transformation.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosEepromRecordMega.java')
-rw-r--r-- | altoslib/AltosEepromRecordMega.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/altoslib/AltosEepromRecordMega.java b/altoslib/AltosEepromRecordMega.java index 0abc3fe7..18d435af 100644 --- a/altoslib/AltosEepromRecordMega.java +++ b/altoslib/AltosEepromRecordMega.java @@ -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; |