mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-12-18 18:13:39 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user