Replace "WAB/WAI GRID" as a location source. Closes #116

This commit is contained in:
Ian Renton
2026-08-08 13:19:28 +01:00
parent 1651629109
commit 605b172bb3
3 changed files with 23 additions and 13 deletions
+9 -9
View File
@@ -57,12 +57,12 @@ class Spot:
# lookup
dx_latitude: float | None = None
dx_longitude: float | None = None
# DX Location source. Indicates how accurate the location might be. Values: "SPOT", "WAB/WAI GRID", "HOME QTH",
# "DXCC", "NONE"
# DX Location source. Indicates how accurate the location might be. Values: "SPOT", "GRID", "SIG REF LOOKUP",
# "HOME QTH", "DXCC", "NONE"
dx_location_source: str = "NONE"
# DX Location good. Indicates that the software thinks the location data is good enough to plot on a map. This is
# true if the location source is "SPOT" or "WAB/WAI GRID", or if the location source is "HOME QTH" and the DX
# callsign doesn't have a suffix like /P.
# true if the location source is "SPOT", "SIG REF LOOKUP" or "GRID", or if the location source is "HOME QTH" and the
# DX callsign doesn't have a suffix like /P.
dx_location_good: bool = False
# DE (Spotter) info
@@ -296,8 +296,8 @@ class Spot:
if sig_ref.latitude and not self.dx_latitude:
self.dx_latitude = sig_ref.latitude
self.dx_longitude = sig_ref.longitude
if self.sig == "WAB" or self.sig == "WAI":
self.dx_location_source = "WAB/WAI GRID"
if self.sig == "WAB" or self.sig == "WAI" or self.sig == "Tiles":
self.dx_location_source = "GRID"
else:
self.dx_location_source = "SIG REF LOOKUP"
@@ -319,7 +319,7 @@ class Spot:
self.de_grid = grid_mode_grid_match.group(1).upper()
if not self.dx_grid:
self.dx_grid = grid_mode_grid_match.group(4).upper()
self.dx_location_source = "SPOT"
self.dx_location_source = "GRID"
# And extract propagation mode (group 2 for <...>, group 3 for (...)):
mode_tag = (grid_mode_grid_match.group(2) or grid_mode_grid_match.group(3) or "").upper()
@@ -339,7 +339,7 @@ class Spot:
# regex matches, so extract grids:
if not self.dx_grid:
self.dx_grid = grid_mode_grid_match.group(1).upper()
self.dx_location_source = "SPOT"
self.dx_location_source = "GRID"
if not self.de_grid:
self.de_grid = grid_mode_grid_match.group(2).upper()
@@ -411,7 +411,7 @@ class Spot:
# is likely at home.
self.dx_location_good = bool(self.dx_latitude and self.dx_longitude and (
self.dx_location_source == "SPOT" or self.dx_location_source == "SIG REF LOOKUP"
or self.dx_location_source == "WAB/WAI GRID"
or self.dx_location_source == "GRID"
or (self.dx_location_source == "HOME QTH" and "/" not in (self.dx_call or ""))))
# DE with no digits and APRS servers starting "T2" are not things we can look up location for