Short/long/closed display for each band calculated from latest data for each ionosonde station

This commit is contained in:
Ian Renton
2026-05-21 20:54:08 +01:00
parent c38be5b588
commit c939a5c1a1
15 changed files with 151 additions and 58 deletions

View File

@@ -161,7 +161,8 @@ class SolarConditions:
blackout_forecast_r1r2: dict = None
# NOAA Radio Blackout (R3 or greater) probability forecast, keyed by UNIX timestamp of start of day UTC
blackout_forecast_r3_or_greater: dict = None
# Ionosonde measurements from LGDC, dict keyed by URSI code, values are dicts with keys: ursi, name, fof2, muf, luf
# Ionosonde measurements from LGDC, dict keyed by URSI code, values are dicts with keys: ursi, name, fof2, muf, luf,
# band_states
ionosonde_data: dict = None
# Derived values (populated by infer_descriptions())
@@ -196,6 +197,7 @@ class SolarConditions:
self.electron_flux_desc = _lookup_by_threshold(self.electron_flux, ELECTRON_FLUX_DESCRIPTIONS)
def to_json(self):
"""JSON serialise"""
"""JSON serialise. Dict key order is insertion order (Python 3.7+ guarantee), so callers receive
fields in a predictable, logical sequence without relying on sort_keys."""
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True)
return json.dumps(self, default=lambda o: o.__dict__)