diff --git a/data/solar_conditions.py b/data/solar_conditions.py index bb5c3e7..9a4710d 100644 --- a/data/solar_conditions.py +++ b/data/solar_conditions.py @@ -33,16 +33,16 @@ SOLAR_STORM_SCALES = [ ] GEOMAG_STORM_DESCRIPTIONS = [ - (9, "Solar storm. Complete HF blackout, S30+ noise"), - (8, "Solar storm. HF sporadic only, S20-30 noise"), - (7, "Solar storm. HF intermittent, S9-20 noise"), - (6, "Solar storm. HF fading at higher latitudes, S6-9 noise"), - (5, "Solar storm. HF fading at higher latitudes, S4-6 noise"), - (4, "Active. Minor HF fading at higher latitudes, S2-3 noise"), - (3, "Unsettled. Minor HF fading at higher latitudes, S2-3 noise"), - (2, "Inactive. No impact, S0-2 noise"), - (1, "Quiet. No impact, S0-2 noise"), - (0, "Quiet. No impact, S0-2 noise"), + (9, "Complete HF blackout"), + (8, "HF sporadic only"), + (7, "HF intermittent"), + (6, "HF fading at higher latitudes"), + (5, "HF fading at higher latitudes"), + (4, "Minor HF fading at higher latitudes"), + (3, "Minor HF fading at higher latitudes"), + (2, "No impact"), + (1, "No impact"), + (0, "No impact"), ] GEOMAG_STORM_SCALES = [ diff --git a/solarconditionsproviders/hamqsl.py b/solarconditionsproviders/hamqsl.py index 96359d0..8de8648 100644 --- a/solarconditionsproviders/hamqsl.py +++ b/solarconditionsproviders/hamqsl.py @@ -97,7 +97,7 @@ class HamQSL(HTTPSolarConditionsProvider): "aurora_latitude": float_val("latdegree"), "solar_wind": float_val("solarwind"), "magnetic_field": float_val("magneticfield"), - "geomag_field": text("geomagfield"), + "geomag_field": (lambda v: "Unsettled" if v == "Unsettld" else v)(text("geomagfield").title()) if text("geomagfield") else None, "geomag_noise": text("signalnoise"), "hf_conditions": hf_conditions, "vhf_conditions": vhf_conditions diff --git a/templates/about.html b/templates/about.html index 546f40a..846e630 100644 --- a/templates/about.html +++ b/templates/about.html @@ -67,7 +67,7 @@

This software is dedicated to the memory of Tom G1PJB, SK, a friend and colleague who sadly passed away around the time I started writing it in Autumn 2025. I was looking forward to showing it to you when it was done.

- + {% end %} \ No newline at end of file diff --git a/templates/add_spot.html b/templates/add_spot.html index cc7a7e8..36549f5 100644 --- a/templates/add_spot.html +++ b/templates/add_spot.html @@ -69,8 +69,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/alerts.html b/templates/alerts.html index f6d6a07..9e96b7b 100644 --- a/templates/alerts.html +++ b/templates/alerts.html @@ -56,8 +56,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/bands.html b/templates/bands.html index b4f6b3d..4804829 100644 --- a/templates/bands.html +++ b/templates/bands.html @@ -62,9 +62,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index 8365828..7532ae3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -46,10 +46,10 @@ crossorigin="anonymous"> - - - - + + + + diff --git a/templates/conditions.html b/templates/conditions.html index 87acf61..a2ed256 100644 --- a/templates/conditions.html +++ b/templates/conditions.html @@ -3,25 +3,91 @@
- Propagation + Band Conditions
-
HF Conditions
+
HF
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BandDayNight
80-40m
30-20m
17-15m
12-10m
-
VHF Conditions
+
VHF
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Propagation ModeCondition
Sporadic-E 6m (Europe)
Sporadic-E 4m (Europe)
Sporadic-E 2m (Europe)
Sporadic-E 2m (North America)
Aurora (Northern Hemisphere)
Aurora Minimum Latitude
+
Data from HamQSL.net.
@@ -34,8 +100,8 @@ - - + + {% end %} \ No newline at end of file diff --git a/templates/map.html b/templates/map.html index 14373d1..2ba97a6 100644 --- a/templates/map.html +++ b/templates/map.html @@ -70,9 +70,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/spots.html b/templates/spots.html index b556028..d78f9d6 100644 --- a/templates/spots.html +++ b/templates/spots.html @@ -87,9 +87,9 @@ - - - + + + {% end %} \ No newline at end of file diff --git a/templates/status.html b/templates/status.html index 3b4fee6..0739cee 100644 --- a/templates/status.html +++ b/templates/status.html @@ -59,8 +59,8 @@ - - + + diff --git a/webassets/js/conditions.js b/webassets/js/conditions.js index d91a2f6..12a9538 100644 --- a/webassets/js/conditions.js +++ b/webassets/js/conditions.js @@ -1,11 +1,41 @@ // Load solar conditions function loadSolarConditions() { $.getJSON('/api/v1/solar', function(jsonData) { + const hfConditionClass = { 'Good': 'table-success', 'Fair': 'table-warning', 'Poor': 'table-danger' }; + if (jsonData.hf_conditions) { + jsonData.hf_conditions.forEach(function(entry) { + const cell = $('#hf-conditions-' + entry.band + '-' + entry.time); + cell.text(entry.condition); + const cls = hfConditionClass[entry.condition]; + if (cls) { cell.addClass(cls); } + }); + } + + const vhfIdMap = { + 'vhf-aurora|northern_hemi': 'vhf-conditions-aurora', + 'E-Skip|europe_6m': 'vhf-conditions-es-6m-eu', + 'E-Skip|europe_4m': 'vhf-conditions-es-4m-eu', + 'E-Skip|europe': 'vhf-conditions-es-2m-eu', + 'E-Skip|north_america':'vhf-conditions-es-2m-na', + }; + if (jsonData.vhf_conditions) { + jsonData.vhf_conditions.forEach(function(entry) { + const id = vhfIdMap[entry.phenomenon + '|' + entry.location]; + if (id) { + const cell = $('#' + id); + cell.text(entry.condition); + cell.addClass(entry.condition === 'Band Closed' ? 'table-danger' : 'table-success'); + } + }); + } + if (jsonData.aurora_latitude !== null && jsonData.aurora_latitude !== undefined) { + $('#vhf-conditions-aurora-lat').text(jsonData.aurora_latitude + '°'); + } }); } // Startup $(document).ready(function() { loadSolarConditions(); -}); \ No newline at end of file +});