Tell the boxes from the flight paths, and say how far out things are

Three changes to what is on the picture, and both drawings got all three.

The line from an information box to its aircraft was drawn in the
aircraft's own colour, which made it the same colour as that aircraft's
trail: a straight solid line running out of an aeroplane, in the colour of
the path behind the aeroplane, reads as more path, and on a busy picture
that is a heading nobody flew.  It has its own colour now, and is dashed.
Qt measures a dash pattern in multiples of the pen's width, so each pass of
the glow divides the pattern by its own width; without that the halo's
dashes are three times the core's and the line comes out as beads.

The animation had no such line at all, which only came out when the two
were held up against each other: a label pushed into one of the outward
rings by a crowd had nothing tying it to the aeroplane it was about.  It has
one now, walked along the line's own length rather than along whichever axis
is longer, so that a nearly horizontal leader and a nearly vertical one get
dashes of the same length and neither runs past the aircraft it points at.

A red flag stands where the receiver was told it is standing, from the
coordinates in the settings.  The foot of the pole is the position and the
pennant flies up and to the right, so nothing the flag is made of covers the
place it points at.  It is pure red in every theme: that is the one mark on
the picture whose meaning must not change with the colours, and pure red is
both the brightest red there is and the one furthest from every altitude
colour -- a softer one sat close enough to a low aeroplane on the default
map, and to a mid-altitude one on the red theme, to be taken for one.  It is
drawn only where a position was actually given, since a middle worked out
from whatever flew past is not a place anybody is standing.

And the range rings: faint discs at a quarter, a half and three quarters of
the radius, concentric on the receiver and labelled with the distance.  They
are translucent and they stack, so the ground inside the innermost is lifted
three times and the outer once, which gives a sense of how far away a thing
is without measuring anything.  An indexed picture cannot blend, so
translucent there means moving the ground under the disc a step or two up
its own ramp of shades, which keeps the coastline and the roads visible
through it.  Separate settings for the two, because a picture is studied and
a window is glanced at.

Two bugs found by the tests rather than by looking.  The rings were built
across the whole canvas instead of the part of it the map is drawn on, so
they came out stretched by the height of the title bar -- four per cent,
which is invisible and wrong.  And a radius of zero killed the window: the
projection collapses, every pixel maps to one point, and the graticule asks
for lines across a span of nothing until Qt aborts.  The program never
passes a zero, but a caller could, and a crash is not an answer.

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-06 11:49:48 -07:00
parent 2e20c48971
commit 2da1d1f245
12 changed files with 1099 additions and 16 deletions

View file

@ -1042,6 +1042,56 @@ brightness or the map itself has. Doing it every frame put a ceiling of a
dozen frames a second on the window at 1920×1080 and spent a whole core
holding it there; keeping it takes the same window from 87 ms a frame to 14.
**The line from a box to its aircraft is dashed, and is its own colour**, on
the animated pictures as well as here. It used to be drawn in the aircraft's
own colour, which made it the same colour as that aircraft's trail — and a straight solid line running out of an
aeroplane, in the colour of the path behind the aeroplane, reads as more path.
On a busy picture that is a heading nobody flew. Dashes and a neutral colour
say "this box belongs to that aeroplane" instead, which is all it was ever
meant to say. Qt measures a dash pattern in multiples of the pen's width, so
each pass of the glow divides the pattern by its own width; without that the
halo's dashes are three times the core's and the line comes out as beads.
**The animation had no such line at all** until now — a label pushed out into
one of the outward rings by a crowd had nothing tying it to the aeroplane it
was about. It has one now, dashed and in the same colour, walked along the
line's own length rather than along whichever axis is longer so that a nearly
horizontal leader and a nearly vertical one get dashes of the same length
instead of one of them turning into a dotted line.
**A red flag stands where the receiver is**, on the window and on the animated
pictures alike, from the coordinates in the settings (`--at`, or **Receiver
position** in the menu). The foot of the pole is the position and the pennant
flies up and to the right of it, so nothing the flag is made of covers the
place it points at. It is pure red in every theme — "you are here" is the one
mark whose meaning must not change with the colours, and pure red is both the
brightest red there is and the one furthest from every altitude colour in
every theme. A softer red sat close enough to a low aeroplane on the default
map, and to a mid-altitude one on the red theme, to be taken for one.
The flag is drawn **only where the receiver was actually told where it is**.
Without a position the middle of the picture is worked out from whatever flew
past, which is not a place anybody is standing, and a flag on it would say
that somebody is.
**Range rings** put faint discs at a quarter, a half and three quarters of the
radius, concentric on the receiver and each labelled with its distance. They
are translucent and they stack, so the ground inside the innermost is lifted
three times, the next twice, the outer once. What that gives is a sense of how
far away something is without measuring anything: an aircraft two shades in is
about halfway to the edge of what this receiver hears.
An indexed picture cannot blend, so "translucent" in the animation means
moving the ground under the disc a step or two up its own ramp of shades —
which keeps the coastline and the roads visible through it, where a flat wash
of one colour would not. The window has real alpha and simply paints one.
They need a receiver position and a radius and are not drawn without both, and
each is a separate setting: `--rings` / `--no-rings` for the pictures,
`--window-rings` / `--no-window-rings` for the window, both also in the ADS-B
options menu. A picture is studied and a window is glanced at, and the rings
help one more than the other depending which you are doing.
**The aerodromes are marked here too**, in the same colour and with the same
square as the animation draws them. They are asked for once per area, on the
thread that fetches the tiles but not behind them — they used to be fetched