summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-19 09:46:20 -0700
committerKeith Packard <keithp@keithp.com>2012-07-19 09:48:29 -0700
commit15ebd9c75aa57572040e3b1ee41e6f3eb8cf92ee (patch)
treeffe6def4f8005bb9d38fb9c277b6ded673426a2f
parentada6f2dfc045e77cb9499f20cdec1b4a54ef0db1 (diff)
altosui: Delay starting KML output for flight and GPS coords
Don't start outputing KML data until the telem record containing flight number and GPS coordinates are present. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosui/AltosKML.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/altosui/AltosKML.java b/altosui/AltosKML.java
index 2993607b..ff0734b8 100644
--- a/altosui/AltosKML.java
+++ b/altosui/AltosKML.java
@@ -133,6 +133,12 @@ public class AltosKML implements AltosWriter {
if (gps == null)
return;
+ if ((record.seen & (AltosRecord.seen_flight)) == 0)
+ return;
+ if ((record.seen & (AltosRecord.seen_gps_lat)) == 0)
+ return;
+ if ((record.seen & (AltosRecord.seen_gps_lon)) == 0)
+ return;
if (!started) {
start(record);
started = true;