From 040ef3ec00098ef8758b2e1a87a11a6f9eef4d51 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Wed, 17 Dec 2025 10:07:35 +0000 Subject: [PATCH] Reject lat/longs within 0.1deg latitude of the poles. These are almost always a result of someone having a default grid of "AA00AA" set. Apologies to any hams at the Amundsen-Scott research station. --- core/lookup_helper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/lookup_helper.py b/core/lookup_helper.py index a6e5c5a..f7ac5f3 100644 --- a/core/lookup_helper.py +++ b/core/lookup_helper.py @@ -358,10 +358,12 @@ class LookupHelper: # Coordinates that look default are rejected (apologies if your position really is 0,0, enjoy your voyage) def infer_latlon_from_callsign_online_lookup(self, call): data = self.get_qrz_data_for_callsign(call) - if data and "latitude" in data and "longitude" in data and (data["latitude"] != 0 or data["longitude"] != 0): + if data and "latitude" in data and "longitude" in data and (data["latitude"] != 0 or data["longitude"] != 0) and -89.9 < \ + data["latitude"] < 89.9: return [data["latitude"], data["longitude"]] data = self.get_hamqth_data_for_callsign(call) - if data and "latitude" in data and "longitude" in data and (data["latitude"] != 0 or data["longitude"] != 0): + if data and "latitude" in data and "longitude" in data and (data["latitude"] != 0 or data["longitude"] != 0) and -89.9 < \ + data["latitude"] < 89.9: return [data["latitude"], data["longitude"]] else: return None