diff options
author | Keith Packard <keithp@keithp.com> | 2010-09-19 02:50:43 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-09-19 02:50:43 -0700 |
commit | 7a4d7110debb88f4e906fee7c46f2badd561809d (patch) | |
tree | 4b9912ef61af4278ccd9d4f9ca5a70184c33dfa4 | |
parent | b9623f8ef26491e9fa14e2478295fe6f5cbbd87f (diff) |
altosui: Use recorded ground acceleration when reading eeprom files
The flight software records 1000 accelerometer samples and records
that in the flight log. Use that value instead of using the very few
samples recorded in the eeprom before boost is detected. This
generates far more accurate accerometer data in the .csv files.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | ao-tools/altosui/AltosEepromReader.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ao-tools/altosui/AltosEepromReader.java b/ao-tools/altosui/AltosEepromReader.java index 4cc8536a..03e73812 100644 --- a/ao-tools/altosui/AltosEepromReader.java +++ b/ao-tools/altosui/AltosEepromReader.java @@ -95,7 +95,6 @@ public class AltosEepromReader extends AltosReader { boolean last_reported; double ground_pres; - double ground_accel; int n_pad_samples; @@ -140,9 +139,6 @@ public class AltosEepromReader extends AltosReader { ground_pres += state.pres; state.ground_pres = (int) (ground_pres / n_pad_samples); state.flight_pres = state.ground_pres; - ground_accel += state.accel; - state.ground_accel = (int) (ground_accel / n_pad_samples); - state.flight_accel = state.ground_accel; } else { state.flight_pres = (state.flight_pres * 15 + state.pres) / 16; state.flight_accel = (state.flight_accel * 15 + state.accel) / 16; @@ -345,6 +341,7 @@ public class AltosEepromReader extends AltosReader { tick = record.tick; if (record.cmd == Altos.AO_LOG_FLIGHT) { state.ground_accel = record.a; + state.flight_accel = record.a; state.flight = record.b; boost_tick = tick; seen |= seen_flight; |