From 84cd5d42d8b5659463544fe2a400758b56478609 Mon Sep 17 00:00:00 2001 From: Anthony Towns Date: Wed, 24 Nov 2010 02:13:32 +1000 Subject: [PATCH] altosui: sitemap uses rocket gps if no pad gps --- ao-tools/altosui/AltosSiteMap.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ao-tools/altosui/AltosSiteMap.java b/ao-tools/altosui/AltosSiteMap.java index 80970605..d4a4cbf4 100644 --- a/ao-tools/altosui/AltosSiteMap.java +++ b/ao-tools/altosui/AltosSiteMap.java @@ -230,16 +230,19 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay { // if insufficient gps data, nothing to update if (state.gps == null) return; - if (state.pad_lat == 0 && state.pad_lon == 0) + if (!state.gps.locked && state.gps.nsat < 4) return; - if (!state.gps.locked) { - if (state.gps.nsat < 4) - return; - } if (!initialised) { - initMaps(state.pad_lat, state.pad_lon); - initialised = true; + if (state.pad_lat != 0 || state.pad_lon != 0) { + initMaps(state.pad_lat, state.pad_lon); + initialised = true; + } else if (state.gps.lat != 0 || state.gps.lon != 0) { + initMaps(state.gps.lat, state.gps.lon); + initialised = true; + } else { + return; + } } final Point2D.Double pt = pt(state.gps.lat, state.gps.lon); -- 2.30.2