diff options
author | Robert Garbee <robert@gag.com> | 2012-07-18 14:25:27 -0600 |
---|---|---|
committer | Robert Garbee <robert@gag.com> | 2012-07-18 14:25:27 -0600 |
commit | e2b472bbb2418fc13be42dbc7c52beb88479c46d (patch) | |
tree | 80c758082cad6517d86fb4aa31abc6a6049555eb /altoslib/AltosState.java | |
parent | 75d6aa6f798606f1a6c5a46542065dda81e63b2a (diff) | |
parent | b242f2756a8d9419a9bdba890b9e6b73560bdc19 (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altoslib/AltosState.java')
-rw-r--r-- | altoslib/AltosState.java | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/altoslib/AltosState.java b/altoslib/AltosState.java index 68c7611f..e20ec9a7 100644 --- a/altoslib/AltosState.java +++ b/altoslib/AltosState.java @@ -160,7 +160,8 @@ public class AltosState { } ngps++; } - } + } else + pad_alt = ground_altitude; gps_waiting = MIN_PAD_SAMPLES - npad; if (gps_waiting < 0) @@ -173,14 +174,14 @@ public class AltosState { boost = (AltosLib.ao_flight_boost == state); /* Only look at accelerometer data under boost */ - if (boost && acceleration > max_acceleration) + if (boost && acceleration > max_acceleration && acceleration != AltosRecord.MISSING) max_acceleration = acceleration; - if (boost && speed > max_speed) + if (boost && speed > max_speed && speed != AltosRecord.MISSING) max_speed = speed; - if (boost && baro_speed > max_baro_speed) + if (boost && baro_speed > max_baro_speed && baro_speed != AltosRecord.MISSING) max_baro_speed = baro_speed; - if (height > max_height) + if (height > max_height && height != AltosRecord.MISSING) max_height = height; if (data.gps != null) { if (gps == null || !gps.locked || data.gps.locked) |