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,12 +358,10 @@ class LookupHelper:
|
|||||||
# Coordinates that look default are rejected (apologies if your position really is 0,0, enjoy your voyage)
|
# 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):
|
def infer_latlon_from_callsign_online_lookup(self, call):
|
||||||
data = self.get_qrz_data_for_callsign(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) and -89.9 < \
|
if data and "latitude" in data and "longitude" in data and (float(data["latitude"]) != 0 or float(data["longitude"]) != 0) and -89.9 < float(data["latitude"]) < 89.9:
|
||||||
data["latitude"] < 89.9:
|
|
||||||
return [data["latitude"], data["longitude"]]
|
return [data["latitude"], data["longitude"]]
|
||||||
data = self.get_hamqth_data_for_callsign(call)
|
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) and -89.9 < \
|
if data and "latitude" in data and "longitude" in data and (float(data["latitude"]) != 0 or float(data["longitude"]) != 0) and -89.9 < float(data["latitude"]) < 89.9:
|
||||||
data["latitude"] < 89.9:
|
|
||||||
return [data["latitude"], data["longitude"]]
|
return [data["latitude"], data["longitude"]]
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user