mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-23 21:25:12 +00:00
Short/long/closed display for each band calculated from latest data for each ionosonde station
This commit is contained in:
@@ -11,3 +11,5 @@ class Band:
|
||||
start_freq: float
|
||||
# Stop frequency, in Hz
|
||||
end_freq: float
|
||||
# Whether this is an HF amateur radio band
|
||||
is_ham_hf: bool = False
|
||||
|
||||
@@ -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__)
|
||||
|
||||
Reference in New Issue
Block a user