mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-04-29 18:25:58 +00:00
Solar weather table #92
This commit is contained in:
@@ -6,9 +6,9 @@ from dataclasses import dataclass
|
||||
# the first entry whose threshold the value meets or exceeds is used.
|
||||
|
||||
BLACKOUT_DESCRIPTIONS = {
|
||||
"X": "Extreme HF radio blackout on entire sunlit side",
|
||||
"M": "Wide area HF radio blackout on sunlit side",
|
||||
"C": "Occasional loss of HF communications on sunlit side",
|
||||
"X": "Wide area HF radio blackout across sunlit side",
|
||||
"M": "Occasional loss of HF communications on sunlit side",
|
||||
"C": "Low absorption of HF signals on sunlit side",
|
||||
"B": "No significant radio blackout",
|
||||
"A": "No impact",
|
||||
}
|
||||
|
||||
@@ -94,11 +94,11 @@ class HamQSL(HTTPSolarConditionsProvider):
|
||||
"aurora_latitude": float_val("latdegree"),
|
||||
"solar_wind": float_val("solarwind"),
|
||||
"magnetic_field": float_val("magneticfield"),
|
||||
"geomag_field": (lambda v: "Unsettled" if v == "Unsettld" else v)(text("geomagfield").title()) if text("geomagfield") else None,
|
||||
"geomag_field": (lambda v: "Unsettled" if v == "Unsettld" else v)(text("geomagfield").title()),
|
||||
"geomag_noise": text("signalnoise"),
|
||||
"hf_conditions": hf_conditions,
|
||||
"vhf_conditions": {
|
||||
"vhf_aurora_northern_hemi": vhf_map.get(("vhf-aurora", "northern_hemi")),
|
||||
"vhf_aurora_northern_hemi": vhf_map.get(("vhf-aurora", "northern_hemi")).title().replace("Lat Aur", "Latitude"),
|
||||
"es_2m_europe": vhf_map.get(("E-Skip", "europe")),
|
||||
"es_4m_europe": vhf_map.get(("E-Skip", "europe_4m")),
|
||||
"es_6m_europe": vhf_map.get(("E-Skip", "europe_6m")),
|
||||
|
||||
@@ -22,6 +22,7 @@ class ParksNPeaks(HTTPSpotProvider):
|
||||
def _http_response_to_spots(self, http_response):
|
||||
new_spots = []
|
||||
# Iterate through source data
|
||||
if http_response and http_response != "":
|
||||
for source_spot in http_response.json():
|
||||
# Convert to our spot format
|
||||
spot = Spot(source=self.name,
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<p>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.</p>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-about").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -69,8 +69,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/add-spot.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/add-spot.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-add-spot").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -56,8 +56,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/alerts.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/alerts.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-alerts").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -62,9 +62,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774769497"></script>
|
||||
<script src="/js/bands.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774771259"></script>
|
||||
<script src="/js/bands.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-bands").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -46,10 +46,10 @@
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/tinycolor2@1.6.0/cjs/tinycolor.min.js"></script>
|
||||
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1774769497"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/storage.js?v=1774769497"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1774769497"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1774769497"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/utils.js?v=1774771259"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/storage.js?v=1774771259"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/ui-ham.js?v=1774771259"></script>
|
||||
<script src="https://misc.ianrenton.com/jsutils/geo.js?v=1774771259"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -96,12 +96,49 @@
|
||||
Solar Weather
|
||||
</div>
|
||||
<div class="card-body">
|
||||
Coming soon!
|
||||
<div class="row border-bottom py-2 align-items-start">
|
||||
<div class="col-12 col-md-2 fw-semibold">Solar Flux</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<span class="me-3">SFI: <strong id="sw-sfi"></strong></span>
|
||||
<span>Sunspots: <strong id="sw-sunspots"></strong></span>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 text-muted" id="sw-band-conditions-desc"></div>
|
||||
</div>
|
||||
<div class="row border-bottom py-2 align-items-start">
|
||||
<div class="col-12 col-md-2 fw-semibold">Geomagnetic</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<span class="me-3">K: <strong id="sw-k-index"></strong></span>
|
||||
<span class="me-3">A: <strong id="sw-a-index"></strong></span>
|
||||
<span class="me-3"><strong>G</strong><strong id="sw-geomag-storm-scale"></strong></span>
|
||||
<span>Noise: <strong id="sw-geomag-noise"></strong></span>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 text-muted">
|
||||
<span id="sw-geomag-field"></span><span class="mx-1 text-body-tertiary">, </span><span id="sw-geomag-storm-desc"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row border-bottom py-2 align-items-start">
|
||||
<div class="col-12 col-md-2 fw-semibold">X-ray Flux</div>
|
||||
<div class="col-12 col-md-3"><strong id="sw-x-ray"></strong></div>
|
||||
<div class="col-12 col-md-7 text-muted" id="sw-blackout-desc"></div>
|
||||
</div>
|
||||
<div class="row border-bottom py-2 align-items-start">
|
||||
<div class="col-12 col-md-2 fw-semibold">Proton Flux</div>
|
||||
<div class="col-12 col-md-3">
|
||||
<span class="me-3"><strong id="sw-proton-flux"></strong> pfu</span>
|
||||
<span class="me-3"><strong>S</strong><strong id="sw-solar-storm-scale"></strong></span>
|
||||
</div>
|
||||
<div class="col-12 col-md-7 text-muted" id="sw-proton-flux-desc"></div>
|
||||
</div>
|
||||
<div class="row py-2 align-items-start">
|
||||
<div class="col-12 col-md-2 fw-semibold">Electron Flux</div>
|
||||
<div class="col-12 col-md-3"><strong id="sw-electron-flux"></strong> efu</div>
|
||||
<div class="col-12 col-md-7 text-muted" id="sw-electron-flux-desc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/conditions.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/conditions.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-conditions").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -70,9 +70,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774769497"></script>
|
||||
<script src="/js/map.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774771259"></script>
|
||||
<script src="/js/map.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-map").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -87,9 +87,9 @@
|
||||
<script>
|
||||
let spotProvidersEnabledByDefault = {% raw json_encode(web_ui_options["spot-providers-enabled-by-default"]) %};
|
||||
</script>
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774769497"></script>
|
||||
<script src="/js/spots.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/spotsbandsandmap.js?v=1774771259"></script>
|
||||
<script src="/js/spots.js?v=1774771259"></script>
|
||||
<script>$(document).ready(function() { $("#nav-link-spots").addClass("active"); }); <!-- highlight active page in nav --></script>
|
||||
|
||||
{% end %}
|
||||
@@ -59,8 +59,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/js/common.js?v=1774769497"></script>
|
||||
<script src="/js/status.js?v=1774769497"></script>
|
||||
<script src="/js/common.js?v=1774771259"></script>
|
||||
<script src="/js/status.js?v=1774771259"></script>
|
||||
<script>
|
||||
$(document).ready(function() { $("#nav-link-status").addClass("active"); }); <!-- highlight active page in nav -->
|
||||
</script>
|
||||
|
||||
@@ -20,12 +20,47 @@ function loadSolarConditions() {
|
||||
Object.entries(jsonData.vhf_conditions).forEach(function([key, condition]) {
|
||||
const cell = $('#vhf-conditions-' + key);
|
||||
cell.text(condition);
|
||||
cell.addClass(condition === 'Band Closed' ? 'table-danger' : 'table-success');
|
||||
let vhfClass;
|
||||
if (condition === 'Band Closed') {
|
||||
vhfClass = 'table-danger';
|
||||
} else if (condition.includes('High')) {
|
||||
vhfClass = 'table-warning';
|
||||
} else {
|
||||
vhfClass = 'table-success';
|
||||
}
|
||||
cell.addClass(vhfClass);
|
||||
});
|
||||
}
|
||||
if (jsonData.aurora_latitude !== null && jsonData.aurora_latitude !== undefined) {
|
||||
$('#vhf-conditions-aurora-lat').text(jsonData.aurora_latitude + '°');
|
||||
}
|
||||
|
||||
// Solar Weather
|
||||
|
||||
const swFields = {
|
||||
'sfi': 'sw-sfi',
|
||||
'sunspots': 'sw-sunspots',
|
||||
'band_conditions_desc': 'sw-band-conditions-desc',
|
||||
'k_index': 'sw-k-index',
|
||||
'a_index': 'sw-a-index',
|
||||
'geomag_field': 'sw-geomag-field',
|
||||
'geomag_storm_scale': 'sw-geomag-storm-scale',
|
||||
'geomag_storm_desc': 'sw-geomag-storm-desc',
|
||||
'geomag_noise': 'sw-geomag-noise',
|
||||
'x_ray': 'sw-x-ray',
|
||||
'blackout_desc': 'sw-blackout-desc',
|
||||
'proton_flux': 'sw-proton-flux',
|
||||
'solar_storm_scale': 'sw-solar-storm-scale',
|
||||
'proton_flux_desc': 'sw-proton-flux-desc',
|
||||
'electron_flux': 'sw-electron-flux',
|
||||
'electron_flux_desc': 'sw-electron-flux-desc',
|
||||
};
|
||||
Object.entries(swFields).forEach(function([field, id]) {
|
||||
const val = jsonData[field];
|
||||
if (val !== null && val !== undefined) {
|
||||
$('#' + id).text(val);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user