Tweak FEA reference handling, add understanding of BIWOTA, remove some unused junk from ui-ham.js

This commit is contained in:
Ian Renton
2026-08-31 11:05:53 +01:00
parent bc326388ac
commit 8345238d76
11 changed files with 28 additions and 94 deletions
+8 -1
View File
@@ -154,7 +154,9 @@ SIGS = [
name="FEA", name="FEA",
comment_names=["FEA"], comment_names=["FEA"],
description="Diploma Faros de España", description="Diploma Faros de España",
ref_regex=r"([DE]|FEA)\-\d{4}(\.\d)?", # FEA references are technically [DE]\-\d{4}(\.\d)? but spotters always seem to miss out the D- or E-
# prefix and just use FEA 1234, so we treat FEA reference IDs as if they were just the number.
ref_regex=r"\d{4}(\.\d)?",
), ),
SIG( SIG(
name="DTMBA", name="DTMBA",
@@ -162,6 +164,11 @@ SIGS = [
description="Diploma Teatri Musei e Belle Arti", description="Diploma Teatri Musei e Belle Arti",
ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}", ref_regex=r"I-?[0-9]{3,4}\s?[A-Z]{2}",
), ),
SIG(
name="BIOWTA",
comment_names=["BIWOTA"],
description="British Inland Waterways on the Air"
),
SIG( SIG(
name="Toilets", name="Toilets",
comment_names=[], comment_names=[],
+4 -1
View File
@@ -36,7 +36,10 @@ class FEA(FileDownloadSIGRefDataProvider):
for row in all_rows: for row in all_rows:
if not "REF" in row[0] and not "\n" in row[0]: if not "REF" in row[0] and not "\n" in row[0]:
new_data.append(SIGRef(sig=self.SIG, id=row[0].strip(), name=row[1].strip(), ref_type="Lighthouse")) # FEA references are technically [DE]\-\d{4}(\.\d)? but spotters always seem to miss out the D- or E-
# prefix and just use FEA 1234, so we treat FEA reference IDs as if they were just the number.
ref_id = row[0].strip().replace("D-", "").replace("E-", "")
new_data.append(SIGRef(sig=self.SIG, id=ref_id, name=row[1].strip(), ref_type="Lighthouse"))
# Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest of # Bail out if a stop has been requested, i.e. the program is shutting down - no need to parse the rest of
# the data in this case # the data in this case
+1 -77
View File
@@ -324,22 +324,6 @@ function bandToContrastColor(band) {
return (lum > 128) ? "#000000" : "#ffffff"; return (lum > 128) ? "#000000" : "#ffffff";
} }
const MODE_TYPE_COLOR_SCHEMES = {
"CW": "red",
"PHONE": "green",
"DATA": "blue"
}
// Mode type (CW, PHONE, DATA) to colour. If the mode type is unknown, black will be returned.
function modeTypeToColor(modeType) {
let col = (modeType != null) ? MODE_TYPE_COLOR_SCHEMES[modeType.toUpperCase()] : null;
if (col) {
return col;
} else {
return "#000000";
}
}
const SIG_ICONS = { const SIG_ICONS = {
"POTA": "fa-tree", "POTA": "fa-tree",
"SOTA": "fa-mountain-sun", "SOTA": "fa-mountain-sun",
@@ -367,39 +351,10 @@ const SIG_ICONS = {
"FEA": "fa-house-flood-water", "FEA": "fa-house-flood-water",
"Tiles": "fa-square", "Tiles": "fa-square",
"DTMBA": "fa-masks-theater", "DTMBA": "fa-masks-theater",
"BIWOTA": "fa-ship",
"Toilets": "fa-toilet" "Toilets": "fa-toilet"
} }
const SIG_NAMES = {
"POTA": "Parks on the Air",
"SOTA": "Summits on the Air",
"WWFF": "Worldwide Flora & Fauna",
"GMA": "Global Mountain Activity",
"GMA Islands": "Global Mountain Activity - Islands",
"WWBOTA": "Bunkers on the Air",
"HEMA": "Humps Excluding Marilyns Award",
"IOTA": "Islands on the Air",
"MOTA": "Mills on the Air",
"ARLHS": "Amateur Radio Lighthouse Society",
"ILLW": "International Lighthouse Lightship Weekend",
"SIOTA": "Silos on the Air",
"WCA": "World Castles Award",
"ZLOTA": "New Zealand on the Air",
"WOTA": "Wainwrights on the Air",
"BOTA": "Beaches on the Air",
"KRMNPA": "Keith Roget Memorial National Parks Award",
"SANPCPA": "South Australia National Parks and Conservation Parks Award",
"LLOTA": "Lagos y Lagunas on the Air",
"WWTOTA": "Towers on the Air",
"WAB": "Worked All Britain",
"WAI": "Worked All Ireland",
"DME": "Diploma Municipios de España",
"FEA": "Diploma Faros de España",
"Tiles": "Tiles on the Air",
"DTMBA": "Diploma Teatri Musei e Belle Arti",
"TOTA": "Toilets on the Air"
}
// Get the Font Awesome icon for a given SIG. If the SIG is unknown, the provided default symbol will be returned // Get the Font Awesome icon for a given SIG. If the SIG is unknown, the provided default symbol will be returned
function sigToIcon(sig, defaultIcon) { function sigToIcon(sig, defaultIcon) {
let col = (sig != null) ? SIG_ICONS[sig] : null; let col = (sig != null) ? SIG_ICONS[sig] : null;
@@ -415,34 +370,3 @@ function sigToIcon(sig, defaultIcon) {
} }
} }
// Get the full name for a given SIG abbreviation. If the SIG is unknown, an empty string will be returned.
function sigToName(sig) {
let col = (sig != null) ? SIG_NAMES[sig] : null;
if (col) {
return col;
} else {
let col = (sig != null) ? SIG_NAMES[sig.toUpperCase()] : null;
if (col) {
return col;
} else {
return "";
}
}
}
// Get the list of known SIGs
function getKnownSIGs() {
return Array.from(Object.keys(SIG_ICONS));
}
// Format a Maidenhead grid with alternating alphabetic blocks in lower case
function formatGrid(grid) {
grid = grid.toUpperCase();
if (grid.length >= 6) {
grid = grid.substring(0, 4) + grid.substring(4, 6).toLowerCase() + grid.substring(6);
}
if (grid.length >= 12) {
grid = grid.substring(0, 10) + grid.substring(10, 12).toLowerCase() + grid.substring(14);
}
return grid;
}
+1 -1
View File
@@ -76,7 +76,7 @@
</div> </div>
<script src="/static/js/add-spot.js?v=1788165546"></script> <script src="/static/js/add-spot.js?v=1788170754"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-add-spot").addClass("active"); $("#nav-link-add-spot").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -84,7 +84,7 @@
</div> </div>
<script src="/static/js/alerts.js?v=1788165546"></script> <script src="/static/js/alerts.js?v=1788170753"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-alerts").addClass("active"); $("#nav-link-alerts").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -76,8 +76,8 @@
</div> </div>
<script src="/static/js/spotsbandsandmap.js?v=1788165546"></script> <script src="/static/js/spotsbandsandmap.js?v=1788170754"></script>
<script src="/static/js/bands.js?v=1788165546"></script> <script src="/static/js/bands.js?v=1788170754"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-bands").addClass("active"); $("#nav-link-bands").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+5 -5
View File
@@ -1,6 +1,6 @@
{% extends "skeleton.html" %} {% extends "skeleton.html" %}
{% block head_extra %} {% block head_extra %}
<link rel="stylesheet" href="/static/css/style.css?v=1788165546" type="text/css"> <link rel="stylesheet" href="/static/css/style.css?v=1788170753" type="text/css">
<link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet"> <link href="/static/vendor/css/bootstrap-5.3.8.min.css" rel="stylesheet">
<link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet"> <link href="/static/vendor/css/fontawesome-6.7.2.min.css" rel="stylesheet">
<link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet"> <link href="/static/vendor/css/solid-6.7.2.min.css" rel="stylesheet">
@@ -15,10 +15,10 @@
window.fetchEventSource = fetchEventSource; window.fetchEventSource = fetchEventSource;
</script> </script>
<script src="/static/js/utils.js?v=1788165546"></script> <script src="/static/js/utils.js?v=1788170753"></script>
<script src="/static/js/ui-ham.js?v=1788165546"></script> <script src="/static/js/ui-ham.js?v=1788170753"></script>
<script src="/static/js/geo.js?v=1788165546"></script> <script src="/static/js/geo.js?v=1788170753"></script>
<script src="/static/js/common.js?v=1788165546"></script> <script src="/static/js/common.js?v=1788170753"></script>
{% end %} {% end %}
{% block body %} {% block body %}
<div class="container"> <div class="container">
+1 -1
View File
@@ -284,7 +284,7 @@
</div> </div>
<script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script> <script src="/static/vendor/js/chart-4.4.9.umd.min.js"></script>
<script src="/static/js/conditions.js?v=1788165546"></script> <script src="/static/js/conditions.js?v=1788170753"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-conditions").addClass("active"); $("#nav-link-conditions").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}";
</script> </script>
<script src="/static/js/spotsbandsandmap.js?v=1788165545"></script> <script src="/static/js/spotsbandsandmap.js?v=1788170753"></script>
<script src="/static/js/map.js?v=1788165545"></script> <script src="/static/js/map.js?v=1788170753"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-map").addClass("active"); $("#nav-link-map").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+2 -2
View File
@@ -113,8 +113,8 @@
</div> </div>
<script src="/static/js/spotsbandsandmap.js?v=1788165545"></script> <script src="/static/js/spotsbandsandmap.js?v=1788170753"></script>
<script src="/static/js/spots.js?v=1788165545"></script> <script src="/static/js/spots.js?v=1788170753"></script>
<script>$(document).ready(function () { <script>$(document).ready(function () {
$("#nav-link-spots").addClass("active"); $("#nav-link-spots").addClass("active");
}); <!-- highlight active page in nav --></script> }); <!-- highlight active page in nav --></script>
+1 -1
View File
@@ -86,7 +86,7 @@
</div> </div>
</div> </div>
<script src="/static/js/status.js?v=1788165546"></script> <script src="/static/js/status.js?v=1788170754"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
$("#nav-link-status").addClass("active"); $("#nav-link-status").addClass("active");