altosui: Delay starting KML output for flight and GPS coords
authorKeith Packard <keithp@keithp.com>
Thu, 19 Jul 2012 16:46:20 +0000 (09:46 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 19 Jul 2012 16:48:29 +0000 (09:48 -0700)
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>
altosui/AltosKML.java

index 2993607be281ca1840dffd7b83f04f6dafef5b23..ff0734b8cbbe25a36c8edb40058b79809d13603e 100644 (file)
@@ -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;