Aircraft, from the menus, on a live board, over a real map
Four things the ADS-B mode was missing, and one it was actively getting
wrong.
The band plan lists 1090 MHz because that is where ADS-B is, so choosing
it from the band plan is the obvious thing to do -- and it records the
bursts as clicks in a WAV file and decodes nothing, silently. Both the
scanner and the menus now say so, before the sweep starts, and name the
mode that does decode it. It is not refused: looking at the raw spectrum
is a fair thing to want.
Menu 5, Aircraft (ADS-B), is the whole mode without a command line. Every
option on one screen with a line saying what it does, ?N for the long
version and the flag it corresponds to, l to listen, m to draw a map from
any log, s to keep the options. The listening and the drawing moved into
bandsaunter/aircraft.py so the menus and the command line run the same
code.
While it listens the screen is a live board: one line per aircraft in the
order first heard, the counter climbing as frames arrive, height coloured
low warm to high cold with an arrow for climb or descent, the age of the
last report going green to red, and the line removed once nothing has been
heard for --hold seconds, everything below moving up. The registers are
asked while it runs, so registration, type, operator and route fill
themselves in as the answers arrive.
--speed-unit knots|mph|kph changes the heading of that board, the speed
beside every aircraft on the map and the speeds in the report, and moves
the distances with it so that one picture never carries two different
miles. The log stays in knots, which is what the aircraft broadcast.
And there is a real map under the flight paths: {z}/{x}/{y} tiles fetched
once, cached in ~/.cache/bandsaunter/tiles, reprojected from Web Mercator
pixel by pixel, inverted and dimmed so the aircraft stay the brightest
thing on the picture. The PNGs are decoded here -- zlib and the five row
filters from the specification, checked byte for byte against Pillow on
real tiles -- so nothing new is depended on. Tiles are cached and never
re-fetched, every request says who is asking, and the attribution is drawn
onto the picture, because a GIF travels without its readme.
conftest now fails any test that reaches for a tile server or a register.
It caught four of these on the way in.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
4239635f74
commit
96fc21ac7d
18 changed files with 3298 additions and 281 deletions
81
README.md
81
README.md
|
|
@ -949,6 +949,53 @@ bandsaunter adsb --simulate # invent a sky, for a receiver with no aerial
|
|||
bandsaunter flights # read the log back: report, map, animation
|
||||
```
|
||||
|
||||
While it listens, the screen is a live board of what is overhead:
|
||||
|
||||
```
|
||||
╭─────────────────────────────────────────────────────────────────────────────╮
|
||||
│ 1090 MHz 6 overhead 9 seen 1,284 frames 19/s 0:04:31 control-C │
|
||||
╰─────────────────────────────────────────────────────────────────────────────╯
|
||||
callsign ICAO aircraft altitude speed kt track position frames last
|
||||
BAW49 4008F6 B744 G-VROS 33,025↑ 480 300° WNW 48.2775,-121.8050 1,204 0s
|
||||
ASA412 A24C71 B738 N625AS 12,400↓ 310 155° SSE 47.3323,-122.7387 412 1s
|
||||
N517HP A6F109 R44 N517HP 1,200 95 020° NNE 47.6485,-122.2647 88 2s
|
||||
```
|
||||
|
||||
One line per aircraft, in the order they were first heard. **The counter
|
||||
climbs as frames arrive**, altitude is coloured low-warm to high-cold with an
|
||||
arrow for climb or descent, and the age of the last frame goes green → yellow
|
||||
→ red. When nothing has been heard from an aircraft for `hold` seconds
|
||||
(45 by default) its line is removed and everything below moves up — the board
|
||||
is the sky now, not a list of everything ever heard. Nothing is lost by it:
|
||||
the log has every frame and the report at the end lists every aircraft.
|
||||
|
||||
The registers are asked *while* it listens, so the registration, type,
|
||||
operator and route fill themselves in on the line as the answers arrive. A
|
||||
narrow terminal drops the columns a website supplied and keeps the ones only
|
||||
the aircraft can give. `--frames` prints the raw stream instead, and a pipe
|
||||
or a log file gets a plain running count rather than a display that redraws
|
||||
four times a second.
|
||||
|
||||
**Speeds in whatever you read in.** `--speed-unit knots|mph|kph` (or the
|
||||
option in the menu) changes the column heading on the live display, the speed
|
||||
written beside every aircraft on the map, and the speeds in the report — and
|
||||
it moves the distances with them, so a map labelled in mph has a scale bar in
|
||||
statute miles and one in kph has kilometres, rather than two different miles
|
||||
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.
|
||||
|
||||
**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.
|
||||
|
||||
> **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
|
||||
> nothing: the signalling is a megabit a second and the scan path is 12.5 kHz
|
||||
> wide. Both the scanner and the menus now say so when a sweep is pointed at
|
||||
> 1090 MHz or 978 MHz, rather than letting it run silently.
|
||||
|
||||
Every airliner overhead broadcasts its address, callsign, altitude, position
|
||||
and speed twice a second, unencrypted, to nobody in particular.
|
||||
|
||||
|
|
@ -1058,6 +1105,34 @@ elsewhere, so nothing but numpy is needed to draw one. Where ffmpeg happens to
|
|||
be installed, `--out something.mp4` is smaller and smoother; where it is not,
|
||||
nothing breaks and a GIF is written instead.
|
||||
|
||||
### The ground under it
|
||||
|
||||
**There is a real map under the aircraft.** A flight path over a black
|
||||
rectangle says how the aircraft moved and nothing about where it was; over a
|
||||
coastline it says which airport it left.
|
||||
|
||||
Standard `{z}/{x}/{y}` raster tiles are fetched the first time an area is
|
||||
drawn — OpenStreetMap by default — reprojected from Web Mercator onto the
|
||||
picture pixel by pixel, inverted and dimmed so that the map is the ground and
|
||||
the aircraft stay the brightest thing on it. The PNG tiles are decoded here,
|
||||
by the same reasoning the PNGs are written here: zlib, numpy and the five
|
||||
row filters from the specification, and no imaging library.
|
||||
|
||||
Using somebody else's tile server carries three obligations, and all three
|
||||
are met rather than assumed:
|
||||
|
||||
- **tiles are cached** in `~/.cache/bandsaunter/tiles` and never fetched
|
||||
twice, so redrawing an evening costs nothing and works with no network;
|
||||
- **every request says who is asking**, in the User-Agent;
|
||||
- **the attribution is drawn onto the picture**, because a GIF travels
|
||||
without the readme that would otherwise carry it.
|
||||
|
||||
A drawing is capped at a few dozen tiles — past that the zoom drops, since a
|
||||
coarser map still says where the coastline is. `--no-basemap` draws the tracks
|
||||
on their own, `--tiles URL` points at another server (your own, if you run
|
||||
one), and when there is no network and nothing cached the picture falls back
|
||||
to the plain grid it drew before.
|
||||
|
||||
## Meters and weather sensors
|
||||
|
||||
Two things on the ISM bands are worth naming rather than reporting as hex.
|
||||
|
|
@ -1739,6 +1814,12 @@ deleted.
|
|||
|
||||
## Built-in help
|
||||
|
||||
Menu **5, Aircraft (ADS-B)**, is the whole of the aircraft mode without a
|
||||
command line: nineteen options on one screen, each with a line saying what it
|
||||
does, `?N` for the long version with the flag it corresponds to, `l` to listen
|
||||
and `m` to draw a map from any log in the recordings directory. `s` saves the
|
||||
options to `~/.config/bandsaunter/aircraft.yaml`.
|
||||
|
||||
Press `h` in the menus for topics covering setup, how the sweep works, why
|
||||
nothing (or too much) is being recorded, capturing conversations, where files
|
||||
go, trunked systems, HF reception and the keys available during a scan. Typing a setting name
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue