prop/priv/repo/migrations/20260415193413_create_ionosonde_observations.exs
Graham McIntire 361b9dec5a
Ionosphere: GIRO ionosonde ingestion (foF2/foEs/hmF2/MUFD)
First step toward physics-based HF / sporadic-E scoring. Polls GIRO's
DIDBase tabular endpoint every 10 minutes for two US ionosondes
(Millstone Hill MHJ45, Alpena AL945), parses the plain-text response
into observation rows, and upserts into a new ionosonde_observations
table keyed on (station_code, valid_time).

This gets foEs (E-layer sporadic critical frequency) into the database
as a direct measurement — the key input for predicting 144 MHz Es
openings via ITU-R P.534-6. foF2 + MUFD are the F2-layer inputs for
HF MUF predictions.

Not yet wired into scoring. Boulder/Wallops/Austin/Idaho/Point Arguello
are in the GIRO catalog but were silent when probed — add them back
if/when they come online.

Next steps: SWPC JSON (Kp, F10.7, sunspot), GOES X-ray flux, D-RAP text,
and the P.534-6 Es scoring factor that uses foEs at midpoint for the
144/440 band configs.
2026-04-15 14:37:43 -05:00

22 lines
689 B
Elixir

defmodule Microwaveprop.Repo.Migrations.CreateIonosondeObservations do
use Ecto.Migration
def change do
create table(:ionosonde_observations, primary_key: false) do
add :id, :binary_id, primary_key: true
add :station_code, :string, null: false
add :valid_time, :utc_datetime, null: false
add :confidence_score, :integer
add :fo_f2_mhz, :float
add :fo_e_mhz, :float
add :fo_es_mhz, :float
add :hm_f2_km, :float
add :mufd_mhz, :float
timestamps(type: :utc_datetime)
end
create unique_index(:ionosonde_observations, [:station_code, :valid_time])
create index(:ionosonde_observations, [:valid_time])
end
end