From 215b61593beba2ee4aa78acc1a5219bda65a14d7 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Tue, 23 Jun 2026 19:36:23 +0100 Subject: [PATCH] Seen GMA send "QRT" as a frequency --- spotproviders/gma.py | 18 +++++++++++------- templates/add_spot.html | 2 +- templates/alerts.html | 2 +- templates/bands.html | 4 ++-- templates/base.html | 10 +++++----- templates/conditions.html | 2 +- templates/map.html | 4 ++-- templates/spots.html | 4 ++-- templates/status.html | 2 +- 9 files changed, 26 insertions(+), 22 deletions(-) diff --git a/spotproviders/gma.py b/spotproviders/gma.py index b646c36..9803459 100644 --- a/spotproviders/gma.py +++ b/spotproviders/gma.py @@ -37,19 +37,21 @@ class GMA(HTTPSpotProvider): spot = Spot(source=self.name, dx_call=source_spot["ACTIVATOR"].upper(), de_call=source_spot["SPOTTER"].upper(), - freq=float(source_spot["QRG"]) * 1000 if (source_spot["QRG"] != "") else None, - # Seen GMA spots with no frequency - mode=source_spot["MODE"].upper() if "<>" not in source_spot["MODE"] else None, + # Seen GMA spots with no frequency or with "QRT" in this field + freq=float(source_spot["QRG"]) * 1000 if ( + source_spot["QRG"] != "" and source_spot["QRG"] != "QRT") else None, # Filter out some weird mode strings + mode=source_spot["MODE"].upper() if "<>" not in source_spot["MODE"] else None, comment=source_spot["TEXT"], sig_refs=[SIGRef(id=source_spot["REF"], sig="", name=source_spot["NAME"])], time=datetime.strptime(source_spot["DATE"] + source_spot["TIME"], "%Y%m%d%H%M").replace( tzinfo=pytz.UTC).timestamp(), + # Seen GMA spots with no (or empty) lat/lon dx_latitude=float(source_spot["LAT"]) if ( source_spot["LAT"] and source_spot["LAT"] != "") else None, - # Seen GMA spots with no (or empty) lat/lon dx_longitude=float(source_spot["LON"]) if ( - source_spot["LON"] and source_spot["LON"] != "") else None) + source_spot["LON"] and source_spot["LON"] != "") else None, + qrt=source_spot["QRG"] == "QRT") # GMA doesn't give what programme (SIG) the reference is for until we separately look it up. if "REF" in source_spot: @@ -63,8 +65,10 @@ class GMA(HTTPSpotProvider): # spots come through with reftype=POTA or reftype=WWFF. SOTA is harder to figure out because both SOTA # and GMA summits come through with reftype=Summit, so we must check for the presence of a "sota" entry # to determine if it's a SOTA summit. - if spot.sig_refs and "reftype" in ref_info and ref_info["reftype"] not in ["POTA", "WWFF"] and ( - ref_info["reftype"] != "Summit" or "sota" not in ref_info or ref_info["sota"] == ""): + if spot.sig_refs and "reftype" in ref_info and ref_info["reftype"] not in ["POTA", + "WWFF"] and ( + ref_info["reftype"] != "Summit" or "sota" not in ref_info or ref_info[ + "sota"] == ""): match ref_info["reftype"]: case "Summit": spot.sig_refs[0].sig = "GMA" diff --git a/templates/add_spot.html b/templates/add_spot.html index acf56dd..f0b0893 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -76,7 +76,7 @@ - + diff --git a/templates/alerts.html b/templates/alerts.html index a371b91..7d3f4ad 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -75,7 +75,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 9bb647c..d81d170 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -77,8 +77,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index f756d70..b044ec7 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -10,10 +10,10 @@ - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index e2926bb..bc36299 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 6621de2..b5ddee4 100644 --- a/templates/map.html +++ b/templates/map.html @@ -95,8 +95,8 @@ - - + + diff --git a/templates/spots.html b/templates/spots.html index c4d1c3e..933c1a5 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -116,8 +116,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index d33d329..6ed1759 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,7 +59,7 @@ - +