summaryrefslogtreecommitdiff
path: root/altoslib/AltosCalData.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-26 18:22:02 -0700
committerKeith Packard <keithp@keithp.com>2017-05-26 18:22:02 -0700
commit3d29882f5c70e627b0bbfe42c0a31d6cb5f6b6bf (patch)
tree88bc7d8d915646365f0500f902bf020b065239be /altoslib/AltosCalData.java
parentfd738d47bbc46d36698350d5450abe1125d990a3 (diff)
altoslib: Get KML export working again
Even annotate the states with avg speed/accel for fun. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosCalData.java')
-rw-r--r--altoslib/AltosCalData.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/altoslib/AltosCalData.java b/altoslib/AltosCalData.java
index 3da0e400..fff6ba67 100644
--- a/altoslib/AltosCalData.java
+++ b/altoslib/AltosCalData.java
@@ -206,9 +206,13 @@ public class AltosCalData {
public AltosGPS gps_pad = null;
+ public double gps_pad_altitude = AltosLib.MISSING;
+
public void set_gps(AltosGPS gps) {
if ((state != AltosLib.MISSING && state < AltosLib.ao_flight_boost) || gps_pad == null)
gps_pad = gps;
+ if (gps_pad_altitude == AltosLib.MISSING && gps.alt != AltosLib.MISSING)
+ gps_pad_altitude = gps.alt;
}
/*
@@ -226,8 +230,8 @@ public class AltosCalData {
if (temp_gps != null) {
if (temp_gps.locked && temp_gps.nsat >= 4)
set_gps(temp_gps);
+ temp_gps = null;
}
- temp_gps = null;
}
public boolean gps_pending() {
@@ -235,9 +239,8 @@ public class AltosCalData {
}
public AltosGPS make_temp_gps(int tick, boolean sats) {
- if (temp_gps == null) {
+ if (temp_gps == null)
temp_gps = new AltosGPS();
- }
if (sats) {
if (tick != temp_gps_sat_tick)
temp_gps.cc_gps_sat = null;