Commit graph

6 commits

Author SHA1 Message Date
The Dust Council
2665a17a22 Cache what has been looked up, make it browsable, and say where this lives
Four things asked for in turn, landing together because they run through the
same files.

THE MAPS.  The tiles were already cached and always had been -- a second
evening on the same view was measured at nought network requests -- but the
work done on them was not.  Every window open decoded forty PNGs and resampled
a megapixel and a half into this program's own projection, for an answer that
cannot have changed, because a coastline does not move.  The finished map is
kept beside the tiles now: 0.61 seconds become 0.01, byte for byte identical,
two hundred kilobytes a view.  Both windows and both kinds of still picture get
it, all four reaching the ground through one function.  A map with squares
missing is deliberately not kept, since caching a hole would keep it for a
month and the point of calling a partial map provisional is that it is asked
for again.  And because this adds a disk consumer, the whole cache is now
pruned to four hundred megabytes, least recently *used* first: a tile fetched a
year ago and looked at last night is the receiver's own neighbourhood, and
discarding that to keep last week's holiday is the wrong way round.

THE LOOKUPS.  APRS and FT8 now ask who each station is licensed to.  Every
other mode that hears a callsign already did -- speech transcripts, Morse
idents, the recording browser -- and all five resolve through one file, so a
callsign heard on two bands is asked about once.  The rules for finding the
licensed callsign inside a heard one are now in one place rather than per band,
because getting them wrong is silent: a register asked about W1AW-9 returns
nothing, which looks exactly like a station that is not licensed.  An SSID, a
rover suffix, a guest prefix, a digipeater alias and an unspelled hash all come
off or are refused.

The bug worth recording is that the first cut of this did the lookups and threw
them away.  The book has to be told to save and was not, so every evening would
have asked the register about the same net again -- which is the one thing
caching them was for, and is invisible from inside a single run because the
answers are all in memory while it lasts.  Caught by looking at the file on
disk rather than at the display.  There is a test for each side of it now, and a
register of which modules resolve callsigns at all, which fails when a new one
starts so that somebody has to decide whether it should.

THE REGISTER.  c in saunterbrowse opens everything ever looked up: sixty-odd
callsigns and sixteen hundred aircraft here, every field of each in two columns
because a licence has a dozen and a screen is wider than it is tall.  tab
switches, / searches every field rather than the name -- the question is
usually "who was in Arizona" rather than "which callsign" -- and g opens the
place in a browser.  Only the coordinates go into that link: a map does not
need to be told whose licence it is looking at, and the link is the one part of
this that leaves the machine.  A headless box, which is the normal case for a
receiver, gets the coordinates printed instead.  Callsigns no register could
place are kept rather than dropped, because "asked about, and in no register
reachable from here" is a fact about a station.

THE FRONT OF IT.  A title screen for each program: five rows of blocks cut by
hand, a figlet dependency to draw eleven letters being the largest thing that
would then be in the requirements, coloured blue to red across the width, which
is the ramp every waterfall here already uses because it is what a spectrum
looks like.  The interesting part is where it does not appear -- everything
here can be piped into something else and a banner in the middle of that is
corruption rather than decoration, so anything that is not a terminal gets
nothing, --help is untouched because it is drawn after parsing, --no-splash
turns it off for a run and BANDSAUNTER_NO_SPLASH=1 for good.

And the address.  INSTALL.md said "git clone <the repository>" for a long time:
a placeholder in the first command anybody types, unnoticed because nothing
reads install instructions except somebody installing, who then cannot.  It is
filled in, along with the readme, the metadata, both manuals and the Homepage
field of all three packages.  The tile server's User-Agent pointed at a topic
listing on somebody else's site for want of an address of its own; the usage
policy of that service asks for one naming the application and giving somewhere
to look it up, so an operator with a question about the traffic has somebody to
ask, and now it gives the real one.  Seven tests so the placeholder cannot come
back, verified by putting it back and watching two of them fail.

One thing forced by all this: the keys page in saunterbrowse was exactly as
tall as an eighty-by-twenty-four terminal, so the register entry pushed "q
quit" off the bottom.  A test caught it.  Home and End have merged into the
Page Up line, which were always the same thought.

THE WINDOWS.  They open maximised now, this being a map and the thing anybody
wants more of being map; f goes to true full screen and back, and is written
along the top of the screen because a window with no frame is one somebody has
to know a key to get out of.  Maximised rather than frameless by default,
because the title bar is where the band and the frequency are written.

And a map made bigger now gets a sharper map, which it did not.  The window
only ever re-examined the ground when the view left the box that had been
fetched, so a window opened at its default size and taken to the whole screen
kept the map it started with until an aircraft wandered far enough to move it
-- on a quiet band, a long time to look at a blurred coastline.  Measured
before it was believed: 1100 to 1920 asked for nothing and stretched a
1364-pixel map across 1920, then across 3840.  It now compares map pixels per
degree in hand against what the view wants, and asks when it is being blown up
by more than fifteen per cent.

That comparison has to be per degree rather than pixel against pixel, which a
surviving mutation was what established: the fetched box is a quarter wider
than the view, so a map with exactly as many pixels as the window is wide has
only four fifths of them on the screen.  The two ways of measuring agree
everywhere except a narrow band, and the realistic case sits inside it.  There
is a test pinning that case now.  Asking is safe at any size, because the
request is keyed on the window's dimensions: once answered, nothing more is
asked, which is what stops a window larger than the tile budget can cover from
asking all evening.

The braille, while this was open.  The banners were blocks in capitals; they
are braille in mixed case, two dots wide and four tall to a character, which is
eight times the detail and is what makes room for two heights of letter at
once -- a five-row block font has no second height to spend, so the name came
out shouted.  Two attempts failed first: thin one-dot strokes came out as
confetti, because braille dots render as dots and a one-dot stroke reads as a
dotted line rather than a line.  What worked was cutting the font small, at cap
height seven where there is only one way to draw each letter, and doubling it.
Coloured deep blue through cyan to a cool white, which is deliberately not the
waterfall ramp the rest of the program draws in: that one has to run to red
because it stands in for a spectrum, and a title screen stands in for nothing.

One hundred and four new tests.  Full suite 2892 passed.  Built as
2026-09-24_01.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-24 00:36:18 -07:00
The Dust Council
e203b3e581 Draw the map's missing squares as gaps, and its rings in your own units
Two faults reported from in front of the window, both of them the map saying
something confidently and wrongly.

Tiles that did not arrive.  Resizing the window does not refetch the map: the
window deliberately fetches more world than it shows, so a resize still fits
inside what is in hand and gets stretched to the new size.  It refetches when
the view leaves that box, which is what a new station does -- and that fetch
asks a volunteer-funded server for a hundred tiles that have never been on
this disk, all at once, at the sharper zoom the bigger window chose.  Some of
them are refused.

What the window did with a refusal was draw it.  A tile that never arrived
leaves its square of the canvas black, and black is not a neutral colour
here: the brightness is inverted on the way in, because a printed map is ink
on paper and this picture is the other way round.  So the darkest possible
square came out as the brightest thing on the picture, a glowing rectangle
where the map should be.  Measured on a reproduction, one missing tile in
eighteen put thirteen thousand pixels at full brightness -- and dragged the
floor of the map's own contrast down to black with it, so thirteen thousand
four hundred and ninety pixels changed in all: the whole map was redrawn
dimmer to make room for a square that was not there.  Then it was kept, cached
under the view it was fetched for, until the view moved again.

So the missing squares are asked for again at once, and only those, the rest
being on the disk by then; what is still missing is drawn as bare ground and
left out of the reckoning when the darkest and brightest of the map are worked
out, which puts the same reproduction at two pixels changed rather than
thirteen thousand four hundred and ninety, a hairline where a cell is averaged
over part of a tile and part of nothing; and the map is kept as provisional
rather than as the last word, asked for again half a minute later, four
attempts in all, each retrying its own misses once.

Found while measuring that: the politeness pause between requests was being
paid on every tile, including the ones read straight back off the disk.  Two
hundred and twenty tiles at an eighth of a second is twenty-six seconds of
sleeping to redraw a view that was entirely cached, and it would have made
asking again for three missing squares cost the wait for the two hundred that
were not.  The constant's own comment already said it should only be paid on a
tile that was not already there.  Now it is.

The APRS map's units.  Setting imperial changed nothing at all about the
window: the unit it measures in was hardcoded to kilometres, and that one
value drives the ring labels and the scale along the bottom; and --radius was
always read as kilometres, so the rings were not merely mislabelled, they were
at the wrong distance from the flag.  A ring is what a distance gets judged
against by eye, and one labelled in a unit it was not drawn in is a wrong
answer given confidently.  The aircraft side has done this properly all along
-- a radius read in whatever unit the speeds are in, and no unit suffix on the
setting because the suffix belongs to the other setting -- so this now mirrors
it exactly.  At --radius 100 in imperial the outermost ring stands seventy-
five statute miles from the flag and says so, where it used to stand seventy-
five kilometres and say kilometres whatever you had asked for.

Twenty-one new tests against sixteen deliberately broken builds.  One
survived, and removing what it broke was the right answer rather than
strengthening a test: a check that the remembered request still matched the
map in hand could not be made to fail, a request for a different view being
taken up only after the slot it guards is already full.  The tests do not
trust the drawing to mark its own homework -- the one that matters walks north
from the flag by each ring's radius and measures the great-circle distance
with a haversine written in the test, then checks that against the printed
label.  Full suite 2685 passed.  Built as 2026-09-21_03.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-21 02:36:43 -07:00
The Dust Council
e05b66ec3d Tell the APRS map which band it is on, and where you are standing
Three things wrong with the window, all reported from the chair in front of
it, and all three the same kind of wrong: the map had been handed the aircraft
map's furniture and nobody had checked which bits of it were about aircraft.

The empty screen said "listening on 1090 MHz" and went on to explain that an
aeroplane is placed once an even and an odd position frame have both arrived.
That sentence was true of the window it was written for and false of every
word in this one.  What has to arrive before a mark can be placed is a fact
about the signal rather than about the window, so it is now a thing the window
is told: an aeroplane still says what an aeroplane needs, a station says that
most of them mention where they are every few minutes, and left unsaid the
words follow whatever channel the window was given rather than naming 1090
from memory.

There was no red flag.  The flag is drawn where the receiver was actually told
it is, and this section has its own --at that had never been filled in -- but
the aircraft section's had, by the same person, about the same aerial, on the
same roof.  One aerial does not move because the receiver was pointed at a
different band, so a position set on either side now serves both, this
section's own winning where it has one because two receivers in two places is
exactly what a separate setting is for.  It says out loud which it used, an
inherited position being a convenience right up until somebody has moved and
changed only one of them.  The flag, the range rings and every distance and
bearing all come from the same answer, so all four arrive together.

The boxes drew a station's position and never wrote it down.  A mark on a map
shows where something is; the figures are what gets read out over the air,
copied into a log or typed into something else.  They are also the only place
the doubt shows: a station that blanks its minutes is somewhere inside a
two-degree square, the diamond is as definite there as it is anywhere, and
only "49.0000N 72.0000W +/-340 km" admits it.

Twelve new tests against six deliberately broken builds.  One survived, and
it is the one that matters: with the drawing code changed back to print
aeroplanes at 1090 MHz, every test still passed, because they all read the
sentence off the object and none of them read the pixels.  That is the
reported fault exactly -- a window that holds one sentence and paints another
-- and the suite could not see it.  It reads the picture now, cropped below
the header, whose ticking clock has made a test pass for the wrong reason
twice already this session.  Full suite 2664 passed.  Built as
2026-09-21_02.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-21 01:05:11 -07:00
The Dust Council
2c7b1ba25e Put APRS stations on the live map, where they stay
The same window the aircraft use, given marks that are not aeroplanes.  It
already knew how to fetch a map, place an information box where it covers
nothing, glide it when its owner moves, draw range rings, put a flag where
the aerial stands and a scale along the bottom -- and not one of those has
anything to do with aviation.  What it did not know is that a mark might not
fade, might not point anywhere, and might be coloured by what it is rather
than by how high it is.  Those are three hooks rather than a second window,
and the aircraft map is untouched: every one of them defaults to exactly what
an aeroplane does.

Nothing fades, which is the difference asked for and the right one.  An
aeroplane that stops transmitting has flown out of range, and drawing it an
hour later where it was would be drawing something that is certainly not
there.  A fixed amateur station that stops transmitting is still exactly
where it was -- it beacons every half hour, and the gaps are silence rather
than absence.  So the picture accumulates and an evening of listening fills a
map.  Marks are ordered most-recently-heard first, because that is the order
the boxes are laid out in and an accumulating map has more marks on it than
it has room for boxes.

Marks are drawn by what they are: something moving as a body with a stalk
pointing where it is going, and anything fixed as a diamond, which is the one
shape on the picture with no front -- a house that beacons twice an hour is a
place, and a triangle would have it pointing north for no reason.  Colours
come off the altitude ramp, not because a station has an altitude but because
that ramp is the one set of colours all five themes define: warm to cold on
the default map, dim to bright on the phosphor ones, so a digipeater stays
distinguishable from a car everywhere without a colour being named here.

The box says what the station is, how far off and in which bearing, what it
is doing if it is moving, its altitude, its weather, its status, the
digipeaters it came through, how many packets and how many of those arrived
directly, and how strongly.  The heading prints the callsign once: an
aeroplane has two names and the heading was built for that.

Reachable both ways, as everything here is -- --window on the command line, w
in the menu -- with the same eight map settings the aircraft side has.

Forty new tests against nine deliberately broken builds.  Two of them survived
the first attempt, and both for the same reason: they asked whether the
rendered frames differed rather than whether the symbol did, and the strip
along the top carries a running clock, so two frames taken a millisecond apart
differ by a few hundred pixels whatever is on the map.  They now crop to the
mark.  That is the second time this session that a ticking header has made a
test pass for the wrong reason.  Full suite 2652 passed.  Built as
2026-09-21_01.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-21 00:12:10 -07:00
The Dust Council
14ba77da9a Put the APRS channel on the front page, and find it for you
The region was in the menu, in the receiver group, between the sample rate and
the invented channel.  That is the wrong place for it.  It is the setting that
decides whether anything is heard at all, and being on the wrong one sounds
exactly like having no aerial, so it does not belong a level down among the
things that make a working receiver work slightly better.

It is now on the front page of the APRS menu, named as well as numbered, and
so is the Listen line: "north-america 144.39 MHz" rather than "144.39 MHz",
because the number alone does not say whether it is the right one and the name
alone does not say what will be tuned.  A channel that is no region's says so
rather than claiming one.

The region and the frequency are separate settings -- somebody may want a
local packet network on neither -- which means they can be made to disagree.
Every place that chooses a region now goes through one function, so they
cannot.

And there is a search.  `bandsaunter aprs --find-channel`, or f in the menu,
listens on each region's channel in turn and prints what was on each, then
offers to use the busiest.  This answers the one question about APRS that
cannot be answered on any single frequency, because the answer *is* a
frequency: somebody who has just plugged a dongle in cannot tell a wrong
channel from a dead aerial, and that is worth a minute of listening rather
than an evening of doubt.

What it does not do is claim more than it found.  A quiet channel is not proof
of an empty one -- a fixed station beacons every half hour -- so what it finds
is traffic, and when every channel comes back silent it says that this is not
the same as an empty band and points at the aerial instead.

The invented channel now honours tuning, and only carries its stations on its
own frequency.  Without that the search would pass on a simulated band having
never searched anything, which is the kind of test that is worse than none.

Sixteen new tests against six deliberately broken builds.  The three that
searched a whole simulated band were doing the same expensive thing three
times over and now build their results directly, leaving one real end-to-end
search; that file went from nine and a half minutes to two.  Full suite 2612
passed.  Built as 2026-09-20_03.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-20 20:39:45 -07:00
The Dust Council
2b653c2c3e Read the APRS channel: who is out there, and what they said
A third section, alongside the aircraft and the weather sensors, and for the
same reason as both: a scan stops on a signal, records it and moves on, while
APRS is a two-second transmission every few minutes from a hundred stations
sharing one frequency.  A sweep catches whichever happened to key up as it
passed.  `bandsaunter aprs` parks on the channel and catches all of them;
`bandsaunter packets` reads a log back.

Four layers, three of them new.

The link layer was already here, opportunistically, in the generic decoder --
a correlator, NRZI, HDLC and a checksum, run on whatever a scan happened to
record.  It is now a receiver.  What had to change is the state that survives
a block boundary: the tail of the audio so the correlators see no edge, the
phase of the sampling loop so a bit is not lost where one block meets the
next, the tone the line was last at, and the bits themselves.  A packet is
most of a second and a block is about one, so frames straddling the boundary
are not an edge case, they are most of them.

Above that, the APRS information field, which is not one format but about
twenty, chosen by the first character and accreted over thirty years.
Positions uncompressed and compressed; Mic-E, which every Kenwood and Yaesu
mobile sends and which hides the latitude inside the destination callsign
because in 1995 those six bytes were carrying the word "APRS" and nothing
else; weather with a position and without; messages, acknowledgements,
rejections and bulletins; objects and items; status; telemetry; third-party
traffic, credited to whoever originally sent it rather than to the gateway.
Course and speed, altitude, power and antenna height, range and the precision
extension, all of which ride in the comment.  Every one has a writer beside
its reader, so a packet goes in and the same packet comes out.

Above that the section: a registry of who is out there and what each last
said of each kind, distances and bearings from --at, a log keeping the whole
frame under whatever was made of it, a spreadsheet, a map, and a channel full
of stations that are not there for --simulate.

One rule is worth naming because it is the difference between a decoder and a
liar.  A packet whose format does not match what its first character promised
comes back as unparsed with its text intact.  Thirteen characters of a
*malformed* uncompressed position are perfectly good base-91, so trying one
format and falling back to the other does not fail on a bad packet -- it
succeeds, as a confident and completely different place, usually a thousand
miles away.  The specification makes the two unambiguous, a leading digit
always meaning uncompressed, and the rule is read rather than guessed at.

Two faults found by building it, both by measurement rather than by reading
the code again.  The framer handed back frames it had already reported,
because it trimmed its buffer to before them rather than after -- every packet
counted twice, for ever, which only shows up once the same signal is read
across more than one block.  And the invented channel truncated a
transmission at the end of the block it began in rather than carrying the
remainder over, which was invisible for as long as the simulated clock
advanced in exact seconds and put every transmission at a block boundary; the
moment it was paced against a real clock, nothing decoded at all.

204 new tests against seven deliberately broken builds, one of which survived
until a test was written for the case it actually breaks.  Full suite 2597
passed.  Built as 2026-09-20_02.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
2026-09-20 19:36:30 -07:00