diff options
| author | Keith Packard <keithp@keithp.com> | 2011-04-09 22:53:12 -0700 |
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-04-09 22:53:12 -0700 |
| commit | 7f49d694e776819e03b2c708e1c4ee23ba311430 (patch) | |
| tree | 9c58c83fd17633b1fb1770dca64cbfec096416b9 /altosui/AltosEepromIterable.java | |
| parent | 835ab3a8c2741a09b27de58c37439a193c9919ce (diff) | |
altos/altosui: Log averaged baro sensor data in Tm/Tn
Instead of logging the best height guess from the kalman filter, log
barometer data. The logged data consists of the average value betwen
log points to reduce noise.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromIterable.java')
| -rw-r--r-- | altosui/AltosEepromIterable.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/altosui/AltosEepromIterable.java b/altosui/AltosEepromIterable.java index 624e1dd3..16349b88 100644 --- a/altosui/AltosEepromIterable.java +++ b/altosui/AltosEepromIterable.java @@ -134,8 +134,13 @@ public class AltosEepromIterable extends AltosRecordIterable { eeprom.seen |= seen_sensor; has_accel = true; break; - case Altos.AO_LOG_HEIGHT: - state.height = (short) record.a; + case Altos.AO_LOG_PRESSURE: + state.pres = record.b; + state.flight_pres = state.pres; + if (eeprom.n_pad_samples == 0) { + eeprom.n_pad_samples++; + state.ground_pres = state.pres; + } eeprom.seen |= seen_sensor; break; case Altos.AO_LOG_TEMP_VOLT: |
