Give the aerodromes a colour of their own, and say what each aircraft is

Four things about the animated pictures, and the window kept in step with
them.

The aerodromes were amber, and so is an aeroplane at twelve thousand feet.
Sixteen units of CIELAB apart is not two colours, it is one: an aircraft low
over a field was drawn in the field's own colour and neither could be picked
out from the other.  They are magenta now, fifty-six units from the nearest
altitude colour, which is what the ramp leaves free once red, amber, green,
cyan and violet have gone on height -- and what an aeronautical chart marks
an aerodrome in anyway.  The test states that as the distance rather than as
the colour, so that changing the ramp cannot quietly walk an aircraft back
into the airports.

The height beside an aircraft was the flight level, which is shorter and is
what an aviator reads, but "376" is only a height to somebody who already
knows it is one.  It is feet with the unit on it now, rounded to the
twenty-five feet Mode S reports altitude in: a real reading is a multiple of
that and comes through untouched, while a moment interpolated between two
reports stops claiming to know the height to the foot.

The flag of the country of registration now comes off the address block
where no register answered.  Taking it from the register's answer alone left
the flag off exactly the aircraft that had nothing else beside them either.
Mexico was missing from the address table while we were in there, which a
receiver in the American southwest notices; two registers independently give
XA- registrations for that block.

And what sort of aircraft it is, which is two facts and not one.  What it is
comes off the air: every identification message carries three bits under its
type code saying whether it is light, large, heavy, a rotorcraft, a glider,
a drone or a van on the apron, and that is the only word about what an
aircraft *is* that needs no register.  They were being decoded and thrown
away.  They are inside the identification frame the log already writes down
in full, so every log this program has ever written has them, including the
ones written before anything here knew to look.

Whether it is military comes off no air at all -- a tanker calls itself
heavy exactly as an airliner does -- and is read from the address block
instead.  On one evening here AE07D3 broadcast "heavy" and sat in the United
States military block; the register, asked separately, came back with a
C-17A Globemaster III, tail 90-0534, United States Air Force.

Labels in an animation now behave as the boxes in the window do.  One keeps
its place for as long as that place still works and is moved only when
something takes it, which on a real log is about half as many moves as
deciding afresh every frame; the moves that are left are eased over half a
second of playback; and what the next label is laid out against is where a
moving one is going rather than where it has reached.  A still has no frame
before it and places its labels exactly as it always did.

The fading was only half done.  A label's name faded, because it is drawn in
the aircraft's own colour, but its rows and its flag were fixed colours and
stayed at full brightness -- so the brightest thing on that part of the
picture was the one aeroplane nothing had been heard from.  An indexed
picture cannot blend, so the row grey and all twelve flag colours now have
dimmed copies at each of the four fade steps, and the whole box goes
together.  A crowded frame, which drops back to the short label, drops the
class and the flag with it.

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 22:45:41 -07:00
parent 8eb3bdbb86
commit f9b21f7e35
13 changed files with 1616 additions and 67 deletions

View file

@ -278,3 +278,45 @@ def test_the_unit_reaches_the_display_from_the_options():
finally:
if live is not None:
live.stop()
def test_the_emitter_category_is_kept_as_the_frames_arrive():
"""It comes off the air in the identification message, alongside the
callsign, and is the only word about what an aircraft *is* that does
not need a register."""
import binascii
from bandsaunter.adsb import _read, category_name
# A real identification frame: type code 4, category 3.
raw = binascii.unhexlify("8DA80A97234CB5F5CF4C604EB016")
frame = _read("".join(f"{b:08b}" for b in raw), raw)
assert (frame.type_code, frame.category) == (4, 3)
assert category_name(4, 3) == "large"
reg = AircraftRegistry()
craft = reg.add(frame, when=1.0)
assert craft.category == "large"
def test_an_aircraft_that_declines_to_say_is_not_given_a_category():
from bandsaunter.adsb import Frame, category_name
assert category_name(4, 0) == "" # zero means "not saying"
assert category_name(9, 3) == "" # not an identification message
reg = AircraftRegistry()
craft = reg.add(Frame(icao="ABCDEF", type_code=4, category=0), when=1.0)
assert craft.category == ""
def test_the_same_three_bits_mean_different_things_under_different_codes():
"""Which list they index depends on the type code, which is why it is a
table of tables: category 1 is a light aeroplane under type 4 and a
glider under type 3."""
from bandsaunter.adsb import category_name
assert category_name(4, 1) == "light"
assert category_name(3, 1) == "glider"
assert category_name(2, 1) == "emergency vehicle"
assert category_name(4, 7) == "rotorcraft"
assert category_name(3, 7) == "spacecraft"