Bug fixes

This commit is contained in:
Ian Renton
2026-08-16 14:02:22 +01:00
parent 36ce350079
commit 8e48287edf
12 changed files with 32 additions and 24 deletions
+6 -6
View File
@@ -307,7 +307,7 @@ class Spot:
# If the spot itself doesn't have location yet, but the SIG ref does, extract it
if sig_ref.grid and not self.dx_grid:
self.dx_grid = sig_ref.grid
if sig_ref.latitude and not self.dx_latitude:
if sig_ref.latitude and not self.dx_latitude and sig_ref.longitude and not self.dx_longitude:
self.dx_latitude = sig_ref.latitude
self.dx_longitude = sig_ref.longitude
if self.sig == "WAB" or self.sig == "WAI" or self.sig == "Tiles":
@@ -360,7 +360,7 @@ class Spot:
self.de_grid = grid_mode_grid_match.group(2).upper()
# DX Grid to lat/lon and vice versa in case one is missing
if self.dx_grid and not self.dx_latitude:
if self.dx_grid and (not self.dx_latitude or not self.dx_longitude):
try:
ll = locator_to_latlong(self.dx_grid)
self.dx_latitude = ll[0]
@@ -393,7 +393,7 @@ class Spot:
# instead of the one from the park reference they're at.
if self.dx_call and not self.dx_name:
self.dx_name = dx_call_info.name
if self.dx_call and not self.dx_latitude:
if self.dx_call and (not self.dx_latitude or not self.dx_longitude):
self.dx_latitude = dx_call_info.latitude
self.dx_longitude = dx_call_info.longitude
self.dx_grid = dx_call_info.grid
@@ -411,12 +411,12 @@ class Spot:
# CQ and ITU zone lookup, preferably from location but failing that, from callsign
if not self.dx_cq_zone:
if self.dx_latitude:
if self.dx_latitude and self.dx_longitude:
self.dx_cq_zone = lat_lon_to_cq_zone(self.dx_latitude, self.dx_longitude)
elif self.dx_call:
self.dx_cq_zone = dx_call_info.cq_zone
if not self.dx_itu_zone:
if self.dx_latitude:
if self.dx_latitude and self.dx_longitude:
self.dx_itu_zone = lat_lon_to_itu_zone(self.dx_latitude, self.dx_longitude)
elif self.dx_call:
self.dx_itu_zone = dx_call_info.itu_zone
@@ -439,7 +439,7 @@ class Spot:
self.de_call
and any(char.isdigit() for char in str(self.de_call))
and not (self.de_call.startswith("T2") and self.source == "APRS-IS")
and not self.de_latitude
and (not self.de_latitude or not self.de_longitude)
):
# DE operator location lookup
self.de_latitude = de_call_info.latitude