diff --git a/core/constants.py b/core/constants.py index c025e1f..4463e90 100644 --- a/core/constants.py +++ b/core/constants.py @@ -154,7 +154,9 @@ SIGS = [ name="FEA", comment_names=["FEA"], 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( name="DTMBA", @@ -162,6 +164,11 @@ SIGS = [ description="Diploma Teatri Musei e Belle Arti", 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( name="Toilets", comment_names=[], diff --git a/providers/sigrefdata/fea.py b/providers/sigrefdata/fea.py index 186f8c3..2880133 100644 --- a/providers/sigrefdata/fea.py +++ b/providers/sigrefdata/fea.py @@ -36,7 +36,10 @@ class FEA(FileDownloadSIGRefDataProvider): for row in all_rows: 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 # the data in this case diff --git a/static/js/ui-ham.js b/static/js/ui-ham.js index 32dd14f..ad9f5ab 100644 --- a/static/js/ui-ham.js +++ b/static/js/ui-ham.js @@ -324,22 +324,6 @@ function bandToContrastColor(band) { 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 = { "POTA": "fa-tree", "SOTA": "fa-mountain-sun", @@ -367,39 +351,10 @@ const SIG_ICONS = { "FEA": "fa-house-flood-water", "Tiles": "fa-square", "DTMBA": "fa-masks-theater", + "BIWOTA": "fa-ship", "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 function sigToIcon(sig, defaultIcon) { 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; -} diff --git a/templates/add_spot.html b/templates/add_spot.html index 7072301..8035344 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 f5ca74d..b74fa94 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -84,7 +84,7 @@ - + diff --git a/templates/bands.html b/templates/bands.html index 1df173d..d5f969b 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -76,8 +76,8 @@ - - + + diff --git a/templates/base.html b/templates/base.html index c0c5d87..2e1dbf1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,6 +1,6 @@ {% extends "skeleton.html" %} {% block head_extra %} - + @@ -15,10 +15,10 @@ window.fetchEventSource = fetchEventSource; - - - - + + + + {% end %} {% block body %}
diff --git a/templates/conditions.html b/templates/conditions.html index aa8716c..f635d8f 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -284,7 +284,7 @@
- + diff --git a/templates/map.html b/templates/map.html index 84452a5..9cc412b 100644 --- a/templates/map.html +++ b/templates/map.html @@ -113,8 +113,8 @@ const CARTODB_API_KEY = "{{ web_ui_options.get('cartodb_api_key', '') }}"; - - + + diff --git a/templates/spots.html b/templates/spots.html index 1023cdc..e20131f 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -113,8 +113,8 @@ - - + + diff --git a/templates/status.html b/templates/status.html index 10ea67b..c514117 100644 --- a/templates/status.html +++ b/templates/status.html @@ -86,7 +86,7 @@ - +