A window on the sky, and flags on the routes

The terminal board says what is overhead.  This says where: a real map
with the aircraft moving on it as the frames arrive, and beside each one a
box carrying everything known about the flight -- type and registration,
who operates it, where it came from and where it is going, height with a
rate of climb, speed and heading, how far away and on what bearing, its
position, how many frames it has sent and how long since the last one.

Qt is asked for and not required.  Four bindings are tried, the module
imports on a machine with none of them, and asking for the window without
one gets the instructions rather than a traceback -- before the receiver
is opened, since nothing is gained by taking the dongle for a window that
cannot be drawn.

In the menu, "listen now" is now "passive capture" with a realtime
display beside it.  Closing the window leaves exactly the files pressing
control-C leaves, because listen and watch share one read loop and one
finishing step; the receiver runs on its own thread, so a slow repaint
cannot cost a frame and a slow tile fetch cannot stall the picture.

The animation's labels grew to match: flight level and speed, type and
registration, and both ends of the route, each with a small flag of the
country its airport is in.  The flags are a table rather than a network --
twelve pixels by eight, where a flag is the arrangement that makes one
recognisable rather than a rendering of the real thing -- and a country
not in the table is named by its two letters, since a flag that is nearly
another country's is worse than none.  Where a route arrives as bare
codes the country comes from the ICAO prefix.

Four things found on the way.  The window ignored --seconds, so "listen
for ten minutes" meant something different with a window open; it closes
itself now.  The register was being asked twice per aircraft, once for
labels and once for airport positions.  Cached routes had no country in
them, so the first real redraw drew no flags at all -- routes are
versioned now.  And past fourteen aircraft on one frame the labels go
back to the callsign, the height and the speed, because five lines beside
each of three hundred aircraft is a page of overlapping text with a map
somewhere behind it.

Long names are folded rather than allowed to stretch a box, breaking at
the arrow of a route so the two ends stay whole; and the animation's
label placement gained the same ring search the window uses, having only
ever tried four spots.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
The Dust Council 2026-09-04 13:38:47 -07:00
parent e50d43d6e2
commit df080f6571
21 changed files with 2848 additions and 145 deletions

View file

@ -985,10 +985,54 @@ on one picture. **The log always keeps knots**, because that is what the
aircraft broadcast: the recording stays the thing that arrived, and the
conversion happens at the moment of showing it to somebody.
### A window, while it happens
```bash
bandsaunter adsb --window # or the menus: 5, then r
```
The terminal board says what is overhead; this says **where**. A real map, the
aircraft moving on it as the frames arrive, and beside each one a box with
everything known about the flight — type and registration, who operates it,
where it came from and where it is going — each end with its country's flag —
altitude with a climb or descent rate, speed and heading, how far away and on
what bearing, its position, how many frames it has sent and how long since the
last one.
![the realtime window](docs/realtime.png)
The boxes are placed so they cover neither each other nor another aircraft's
symbol: the eight spots beside the aircraft are tried first, then rings
outward, and a leader line runs to the near edge of the box rather than
through it. Altitude is the colour, low warm to high cold, the same ramp the
GIFs use.
Long names are folded rather than allowed to stretch the box — a route
between two airports with their full names runs to sixty characters, which
would otherwise make one box wider than the map under it. A route breaks at
the arrow first, so the two ends of the flight stay whole and sit under one
another where they read as a pair.
`d` cycles the detail — full box, just height and speed, or symbols alone —
for when the sky is busy. `t` toggles trails, `g` the map underneath, `+`/`-`
the range, `q` closes it.
**Closing the window leaves exactly the files a passive capture does**: the
same log, the same report, the same KML and animation, because it is the same
code with a different thing watching it. The receiver runs on its own thread,
so a slow repaint cannot cost a frame and a slow tile fetch cannot stop the
picture moving.
Qt is asked for and not required — PyQt6, PyQt5, PySide6 and PySide2 are all
tried, since distributions disagree about which to package. Without any of
them you lose this window and nothing else, and the program says how to get
one rather than failing.
**Or from the menus: `bandsaunter` → 5, Aircraft (ADS-B).** Every option is
on one screen with what it does beside it, `?N` explains any of them at
length, `l` listens and `m` draws a map from a log — no flags to remember,
and the options can be saved as the default.
length, `p` starts a passive capture, `r` opens the realtime window and `m`
draws a map from a log — no flags to remember, and the options can be saved
as the default.
> **This is not a scan, and the band plan's `adsb` preset will not do it.**
> Sweeping 1090 MHz records the bursts as clicks in a WAV file and decodes
@ -1099,6 +1143,29 @@ Time runs at `--speed` seconds of flying per second of animation, or give
high cold, with the key along the bottom; the trail behind each aircraft is the
path it actually flew, in the colours of the heights it flew them at.
Beside each aircraft goes what is known about it — flight level and speed,
type and registration, and the two ends of the route, each with **a small flag
of the country the airport is in**:
```
BAW49
330 552MPH
B744 G-VROS
[GB] EGLL
[US] KSEA
```
The flags are twelve pixels by eight, drawn from a table in `flags.py` rather
than fetched: at that size a flag is not a rendering of the real thing but the
arrangement that makes one recognisable — the bands and where they run, the
canton, the disc. A country not in the table is named by its two letters
instead, because a flag that is nearly another country's is worse than no flag
at all.
Where a route arrives as nothing but a pair of airport codes, the country
comes from the code itself: the first letter or two of an ICAO code is a
region, so `EGLL` is British and `KSEA` American with nothing else to go on.
The GIF is written here from first principles — a palette, an LZW stream, frame
differencing with a transparent index — in the same spirit as the PNGs
elsewhere, so nothing but numpy is needed to draw one. Where ffmpeg happens to