defmodule MicrowavepropWeb.AboutLive do @moduledoc "Static `/about` page — project overview, credits, contact info." use MicrowavepropWeb, :live_view alias Microwaveprop.Repo @impl true def mount(_params, _session, socket) do {:ok, socket |> assign(:page_title, "About") |> assign(:stats, fetch_stats())} end @impl true def render(assigns) do ~H""" <.header> About NTMS Propagation Prediction <:subtitle>What we're building and why.

Line-of-sight is wrong for the microwave bands. Every operator on 902 MHz and up has made contacts over hills, through trees, and 200 km past the horizon — contacts that shouldn't have worked if LOS were the whole story. What's actually going on is the lower atmosphere: temperature inversions, humidity gradients, ducting layers, and rain cells that bend, trap, and absorb signals in ways that change by the hour. The window for a good contact is often minutes, not days.

Jim KM5PO started this project to try to predict those windows from weather data. Graham W5ISP picked it up and is iterating on it from there. The goal: a map that tells you when to get on the air, per band, based on real atmospheric conditions and what we've learned from the contacts you and everyone else have already made.

How it works, roughly

Two things, paired up. Most propagation tools keep them separate.

  1. The weather. Hourly 3 km HRRR forecasts give surface fields and pressure-level profiles. We derive refractivity profiles, minimum refractivity gradient, ducting detection, boundary-layer depth, and precipitable water for every grid cell. ASOS surface obs, 12-hourly upper-air soundings, and gridded IEMRE reanalysis fill in the gaps. A 9-factor composite score is written out for every 0.125° cell across CONUS, for each hour of an 18-hour forecast.
  2. The contacts. 58k+ amateur microwave QSOs, each tagged with the atmosphere at both ends of the path (and along it) at the time the contact happened. That's a ground-truth dataset we can actually fit against — "when you had this score, how far did the contact go, and did it happen at all?"

The scoring is a weighted sum of ten factors: rain, humidity, precipitable water (PWAT), season, refractivity gradient, pressure, T–Td depression, sky cover, wind, and time of day. Weights were calibrated via gradient descent against 5,000 QSOs. The physics changes by frequency: humidity helps at 10 GHz (more refractivity) and hurts at 24+ GHz (absorption). Refractivity now uses native HRRR hybrid-sigma levels (10–50 m resolution) for duct detection.

What we've collected so far

Straight from the production database:

Contacts
{format_count(@stats.contacts)}
Weather stations
{format_count(@stats.weather_stations)}
Surface observations
{format_count(@stats.surface_observations)}
Upper-air soundings
{format_count(@stats.soundings)}
HRRR profiles
{format_count(@stats.hrrr_profiles)}
IEMRE gridded obs
{format_count(@stats.iemre_observations)}
Terrain profiles
{format_count(@stats.terrain_profiles)}
Propagation scores
{format_count(@stats.propagation_scores)}
Beacons
{format_count(@stats.beacons)}
Commercial link samples
{format_count(@stats.commercial_samples)}

How it's built

  • Elixir / Phoenix 1.8 + LiveView for everything web-facing. Ecto on Postgres for storage. Oban runs the background pipelines (HRRR pulls, terrain, ASOS, soundings, IEMRE, solar indices, commercial links).
  • Leaflet + Canvas tile layers for the propagation heatmap — we render 0.125° cells at interactive frame rates. Tailwind v4 + daisyUI for layout, esbuild for JS bundling.
  • Physics: ITU-R P.526-16 knife-edge + Deygout 3-edge terrain diffraction, ITU-R P.838-3 rain attenuation, dynamic k-factor from live HRRR refractivity gradients, great-circle geometry, FSPL with frequency-dependent O₂ and H₂O absorption.
  • Data sources: NOAA HRRR (AWS S3, hourly analysis + 18 h forecasts), Iowa Environmental Mesonet (ASOS and upper-air soundings), IEMRE gridded reanalysis, SRTM 90 m terrain, SNMP polling on seven commercial microwave links near DFW at 5-minute intervals, and NCEP NARR for pre-2014 contact enrichment.
  • There's Nx/Axon/EXLA scaffolding for a small feed-forward model (13 features → 64 → 32 → 1 sigmoid). Not trained yet — waiting on enough calibrated data to not overfit.

What's next

  • Beacon calibration. A distributed network of amateur receivers reporting CW beacon signal levels on a schedule. Beacon submissions are already open to anyone via the Beacons page.
  • Weight calibration. Fit the 9 factor weights against recorded distances / QSO counts per band so the score reflects real propagation, not my intuition.
  • Training the model. Once there are enough clean (contact, conditions) pairs, train the Axon model to augment or replace the hand-tuned scoring.
  • Better inputs. MRMS for precipitation at 24+ GHz where rain attenuation dominates, RTMA/URMA surface analysis blending, GOES total precipitable water.
""" end # For tables that get huge (tens of millions of rows), using count(*) on # every About page load is wasteful. We use PostgreSQL's pg_class.reltuples # estimate — it's maintained by ANALYZE and is accurate to within a few # percent, which is plenty for "big number on a marketing page." @estimate_tables ~w(hrrr_profiles propagation_scores surface_observations) @stat_keys ~w( contacts weather_stations surface_observations soundings hrrr_profiles iemre_observations terrain_profiles propagation_scores beacons commercial_samples )a defp fetch_stats do %{ contacts: count_exact("contacts"), weather_stations: count_exact("weather_stations"), surface_observations: count_estimate("surface_observations"), soundings: count_exact("soundings"), hrrr_profiles: count_estimate("hrrr_profiles"), iemre_observations: count_exact("iemre_observations"), terrain_profiles: count_exact("terrain_profiles"), propagation_scores: count_estimate("propagation_scores"), beacons: count_exact("beacons"), commercial_samples: count_exact("commercial_samples") } rescue _ -> Map.new(@stat_keys, fn k -> {k, 0} end) end defp count_exact(table) do %Postgrex.Result{rows: [[count]]} = Repo.query!("SELECT count(*) FROM #{table}") count end defp count_estimate(table) when table in @estimate_tables do %Postgrex.Result{rows: [[estimate]]} = Repo.query!("SELECT reltuples::bigint FROM pg_class WHERE relname = $1", [table]) max(estimate || 0, 0) end defp format_count(n) when is_integer(n) and n >= 1_000_000 do "#{Float.round(n / 1_000_000, 1)}M" end defp format_count(n) when is_integer(n) and n >= 1_000 do "#{Float.round(n / 1_000, 1)}k" end defp format_count(n) when is_integer(n), do: Integer.to_string(n) defp format_count(_), do: "—" end