Rename dx_aprs_ssid to just dx_ssid, and add support for de_ssid. Add SSIDs to the web interface. #68

This commit is contained in:
Ian Renton
2025-10-30 10:47:57 +00:00
parent 3ea782579b
commit 8ec3a67cf5
7 changed files with 66 additions and 31 deletions

View File

@@ -41,9 +41,8 @@ class Spot:
dx_cq_zone: int = None
# ITU zone of the DX operator
dx_itu_zone: int = None
# If this is an APRS spot, what SSID was the DX operator using?
# This is a string not an int for now, as I often see non-numeric ones somehow
dx_aprs_ssid: str = None
# If this is an APRS/Packet/etc spot, what SSID was the DX operator using?
dx_ssid: str = None
# Maidenhead grid locator for the DX. This could be from a geographical reference e.g. POTA, or just from the
# country
dx_grid: str = None
@@ -68,6 +67,8 @@ class Spot:
de_flag: str = None
# Continent of the spotter
de_continent: str = None
# If this is an APRS/Packet/etc spot, what SSID was the spotter/receiver using?
de_ssid: str = None
# Maidenhead grid locator for the spotter. This is not going to be from a xOTA reference so it will likely just be
# a QRZ or DXCC lookup. If the spotter is also portable, this is probably wrong, but it's good enough for some
# simple mapping.
@@ -157,7 +158,10 @@ class Spot:
# Clean up DX call if it has an SSID or -# from RBN
if self.dx_call and "-" in self.dx_call:
self.dx_call = self.dx_call.split("-")[0]
split = self.dx_call.split("-")
self.dx_call = split[0]
if len(split) > 1 and split[1] != "#":
self.dx_ssid = split[1]
# DX country, continent, zones etc. from callsign
if self.dx_call and not self.dx_country:
@@ -175,7 +179,10 @@ class Spot:
# Clean up spotter call if it has an SSID or -# from RBN
if self.de_call and "-" in self.de_call:
self.de_call = self.de_call.split("-")[0]
split = self.de_call.split("-")
self.de_call = split[0]
if len(split) > 1 and split[1] != "#":
self.de_ssid = split[1]
# If we have a spotter of "RBNHOLE", we should have the actual spotter callsign in the comment, so extract it.
# RBNHole posts come from a number of providers, so it's dealt with here in the generic spot handling code.
@@ -192,8 +199,8 @@ class Spot:
self.de_call = sotamat_call_match.group(1).upper()
# Spotter country, continent, zones etc. from callsign.
# DE of "RBNHOLE" and "SOTAMAT" are not things we can look up location for
if self.de_call != "RBNHOLE" and self.de_call != "SOTAMAT":
# DE call with no digits, or APRS servers starting "T2" are not things we can look up location for
if any(char.isdigit() for char in self.de_call) and not (self.de_call.startswith("T2") and self.source == "APRS-IS"):
if self.de_call and not self.de_country:
self.de_country = lookup_helper.infer_country_from_callsign(self.de_call)
if self.de_call and not self.de_continent:
@@ -290,8 +297,8 @@ class Spot:
self.dx_location_good = self.dx_location_source == "SPOT" or self.dx_location_source == "WAB/WAI GRID" or (
self.dx_location_source == "QRZ" and not "/" in self.dx_call)
# DE of "RBNHOLE" and "SOTAMAT" are not things we can look up location for
if self.de_call != "RBNHOLE" and self.de_call != "SOTAMAT":
# DE with no digits and APRS servers starting "T2" are not things we can look up location for
if any(char.isdigit() for char in self.de_call) and not (self.de_call.startswith("T2") and self.source == "APRS-IS"):
# DE operator position lookup, using QRZ.com.
if self.de_call and not self.de_latitude:
latlon = lookup_helper.infer_latlon_from_callsign_qrz(self.de_call)