RadioBook's DX Spots screen shows a live feed of who's being heard where, pulled from a public DX cluster. The map view draws a color-coded great-circle line between spotter and spotted station for each one — but it was missing the thing that makes a HamClock-style map actually useful at a glance: the grayline.
The grayline is the day/night terminator — the line separating the sunlit half of the Earth from the dark half. HF operators watch it because propagation often gets unusually good right around it, as the D-layer forms or dissipates.
Getting the math right
The terminator is a great circle, 90° away from the point on Earth directly under the sun. Finding that point (the sun's current declination and which longitude is at local solar noon right now) is a standard solar-position calculation — the same kind used in sundial and solar-panel software.
I validated it against three known reference cases before trusting it anywhere near the map: solar elevation at the equator on the equinox at solar noon (should read close to 88°), the same point at midnight (close to -88°), and 40°N at the summer solstice (close to 73°). All three checked out before any of this touched the app.
Shading, not just a line
A thin terminator line is correct but hard to read at a glance. The map now shades the day side with a light tint against a dark basemap, so night and day are obvious without staring at a thin line — the shading is bounded by the terminator curve itself, computed fresh each time the map opens.
Also in this pass: the map switched to a dark basemap, spot lines got bolder, and you can now tap any band in the legend to hide or show just that band's lines, with the whole legend collapsible so it doesn't eat map space when you don't need it.