Listen to FT8: fifteen seconds of everybody at once
A new section, alongside the aircraft, the weather sensors and APRS. FT8 is the odd one out among the things this program listens to, and the reason is worth stating because it shapes everything below. Every station on the band transmits in the same quarter-minute slots, on the same dial frequency, fifty hertz wide each, stacked across three kilohertz of audio. One receiver parked on one frequency therefore hears the whole band's worth of stations at once -- and hears most of them well below the noise, because half of what is sent is error-correcting code. That is the entire trick: a rate of about one half buys a mode that decodes twenty-odd decibels under what an operator can hear. A receiver that took the loudest tone of each symbol and hoped would decode almost nothing, which is why the tone detector reports how confident it is bit by bit rather than what it thinks it heard. Written from first principles except for two tables. The checksum, the belief propagation over the sparse graph, the Costas sync search, the waterfall, the soft-bit metric, and the seventy-seven bits that hold two callsigns and a grid square are all here. The generator and the parity-check matrix are not: they cannot be derived, being the code itself rather than consequences of anything, so they are taken from ft8_lib under its MIT licence with the attribution it asks for, and said so in the readme, the manual and the file. No decoding logic came with them. That the two agree -- and they are not derivable from one another, the generator's parity half running to fifty-odd bits a row against the sparse matrix's six or seven -- is a test rather than an assumption. Tested against the air, not against itself. Eleven off-air recordings with published decodes: ninety-seven of a hundred and fifty messages, no false decodes, timing within a hundredth of a second, frequency within a hertz, signal reports within half a decibel on average. The third not decoded are the weakest in each slot; a mature decoder subtracts what it has decoded and looks again in the remainder, and does ordered-statistics decoding where belief propagation fails, and neither is built here. What is here decodes nothing that other receivers did not also hear, which is the property that matters in a log. Ten whole codewords lifted off the air are in the tests as a permanent fixture, so the recordings can go missing and the regression cannot. Three things that looked like bugs and were not, and three that were. The half-second timing discrepancy was the convention: a transmission is 12.64 seconds in a slot of fifteen and everybody starts half a second in, so lateness is reported against that. Synthetic signals at known offsets proved the clock self-consistent before anything was changed. The signal reports were twenty-one decibels optimistic because those recordings have a receiver passband above three kilohertz, putting a whole-band median twelve to sixteen decibels below the real noise floor -- so noise is now measured beside the signal, and in the tone that was actually sent rather than the loudest of eight, the largest of eight noisy numbers being well above their mean even with no signal at all. And the test transmitter was thirteen decibels pessimistic, scaling its noise into a fifty-hertz reference instead of the sampled bandwidth, which made the decoder look deaf when it was the test signal that had been quietly attenuated. The real bug the simulator caught was a one-block timestamp error: samples were dated a block earlier than they were taken, which slid every slot slice a second late and cut the first half-second -- three symbols, part of the opening Costas array -- off every transmission on the band. One decode a slot became six. Reachable both ways, as everything here is. Twenty-one options, every one of them a command-line flag and a line in the menu, both built from one table so they cannot disagree -- and a test that says so, since an option in no group would be settable from the command line and invisible in the menu. The band list says which channels a plain dongle can reach and which need an upconverter, because almost all the activity is on shortwave and finding that out by listening to silence for ten minutes is the wrong way to learn it. The default is two metres, which a plain dongle can hear. --grid turns decodes into geography: every CQ says where it is, so each gets a distance and a bearing and the furthest is named. --adif writes the log in the form every amateur logging program imports, marked as heard rather than worked, because nothing here transmits and an ADIF that let a logging program treat these as contacts would put claims into somebody's log that they cannot make. One bug shipped and found by being used rather than by being tested: the line that opens the receiver called a function this program has never had. Every test reached it through the simulator, which takes the other branch, so the one line that matters to somebody with an aerial was the one line never run. There is now a check that every name these modules import actually exists -- it names the missing one rather than failing somewhere downstream -- and two that say a receiver which cannot be opened is reported rather than raised, and that nothing claims to be listening before there is one. It had been announcing the frequency first, so a dongle that would not open read as listening that had gone wrong. Ninety-six new tests. Full suite 2781 passed. Built as 2026-09-21_04. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PsWPTweCT6pwxKngvVxcg
This commit is contained in:
parent
e203b3e581
commit
93120b80a6
14 changed files with 4247 additions and 3 deletions
105
README.md
105
README.md
|
|
@ -2630,6 +2630,93 @@ dongles ship with; the stock telescopic one extended properly does well.
|
|||
`--packets` shows each frame as it arrives, which is the thing to watch while
|
||||
moving an aerial about.
|
||||
|
||||
## FT8
|
||||
|
||||
Fifteen seconds of everybody at once.
|
||||
|
||||
```
|
||||
bandsaunter ft8 --band 20m --grid IO91
|
||||
```
|
||||
|
||||
Every station on the band transmits in the same quarter-minute slots, on the
|
||||
same dial frequency, fifty hertz wide each, stacked across three kilohertz of
|
||||
audio. So one receiver parked on one frequency hears the whole band's worth
|
||||
of stations simultaneously — and hears most of them **well below the noise**.
|
||||
|
||||
```
|
||||
FT8 20m — 14.074 MHz 12 slots 187 decodes 63 stations 15.6 a slot 3:00 from IO91
|
||||
|
||||
last slot — 16 decoded
|
||||
snr dt hz message
|
||||
-19 -0.5 309 G4CUS SP4FCA RRR
|
||||
-6 0.1 528 VK3EVE SQ3MZM RR73
|
||||
18 0.1 1110 9A9TT IK4LZH -10
|
||||
6 0.0 2535 CQ IZ3XJM JN55
|
||||
|
||||
heard so far — 63 stations
|
||||
station grid away n best hz last
|
||||
IZ3XJM JN55 1180 km 4 6 2535 2s
|
||||
IK4LZH JN54 1140 km 7 18 1110 2s
|
||||
```
|
||||
|
||||
Half of what is transmitted is error-correcting code, and that is the whole
|
||||
trick: it is what buys a mode that decodes twenty-odd decibels under what an
|
||||
operator can hear. A receiver that took the loudest tone of each symbol and
|
||||
hoped would decode almost nothing.
|
||||
|
||||
### What it needs
|
||||
|
||||
**The clock has to be right**, to a second or two. The slots are
|
||||
quarter-minutes of UTC and every station on earth agrees about which one it
|
||||
is. A receiver a second out still decodes; one a slot out hears every
|
||||
transmission split across two captures and decodes none of them. This is the
|
||||
one failure that looks exactly like a dead band, so the display and the
|
||||
report both say so when nothing arrives.
|
||||
|
||||
**Almost all the activity is on shortwave**, which a plain dongle cannot
|
||||
reach. The default here is therefore the two-metre channel at 144.174 MHz,
|
||||
which it can. All thirteen channels are in the list and the shortwave ones
|
||||
work perfectly well through an upconverter or a receiver in direct-sampling
|
||||
mode — the menu says which is which rather than leaving you to find out by
|
||||
listening to silence.
|
||||
|
||||
### What comes out
|
||||
|
||||
`--grid IO91` is what turns decodes into geography: every station calling CQ
|
||||
says where it is, so with your own square filled in the report gives each one
|
||||
a distance and a bearing, and names the furthest heard. On shortwave that is
|
||||
the entire interest of the thing.
|
||||
|
||||
Three tables afterwards: **stations heard** with grid, distance, count and
|
||||
best and worst report; **calling CQ**, which is who is available; and **who
|
||||
was working whom**, which is the band as a social event rather than a list.
|
||||
|
||||
`--adif` writes the log again in the form every amateur logging program
|
||||
imports — marked as *heard*, not worked. Nothing here transmits, so nothing
|
||||
here is a contact, and an ADIF that let a logging program treat these as
|
||||
worked would put claims into somebody's log they cannot make.
|
||||
|
||||
### How well it works
|
||||
|
||||
Checked against eleven off-air recordings with published decodes, which is
|
||||
the only honest way to test a decoder — an encoder tested against its own
|
||||
decoder agrees with it about anything they are both wrong about, a lesson
|
||||
this project learned expensively on 433 MHz.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| messages decoded | 97 of 150 (65%), **no false decodes** |
|
||||
| timing | +0.00 s, spread 0.04 |
|
||||
| frequency | +0.1 Hz, spread 1.1 |
|
||||
| signal report | −0.4 dB, spread 4.8 |
|
||||
| weakest decoded | −24 dB on this program's own scale |
|
||||
|
||||
The 35% not decoded are the weakest signals in each slot. A mature decoder
|
||||
subtracts each signal it decodes and looks again in what is left, and does
|
||||
ordered-statistics decoding when belief propagation fails; neither is built
|
||||
here. What *is* here decodes nothing that other receivers did not also hear,
|
||||
which is the property that matters in a log.
|
||||
|
||||
## Meters on 900 MHz
|
||||
|
||||
A scan of 902–928 MHz that turns up a burst gets it named rather than reported
|
||||
|
|
@ -3439,3 +3526,21 @@ by the Free Software Foundation. It is distributed in the hope that it will be
|
|||
useful, but with no warranty whatsoever — not even the implied warranty of
|
||||
merchantability or fitness for a particular purpose. The full text is in
|
||||
[LICENSE](LICENSE), and at <https://www.gnu.org/licenses/>.
|
||||
|
||||
### Borrowed material
|
||||
|
||||
One file is not original work. `bandsaunter/ft8tables.py` holds the two fixed
|
||||
tables that *define* the FT8 error-correcting code — the generator and the
|
||||
sparse parity-check matrix — taken from
|
||||
[ft8_lib](https://github.com/kgoba/ft8_lib), MIT licensed, copyright © 2018
|
||||
Kārlis Goba, which took them in turn from WSJT-X. They are reproduced under
|
||||
the MIT terms, which permit it, and that file carries the attribution they
|
||||
ask for.
|
||||
|
||||
They are there because they cannot be derived. Everything else about FT8 in
|
||||
this program is worked out from first principles — the tones, the sync, the
|
||||
parity arithmetic, the belief propagation, the way a callsign is squeezed
|
||||
into twenty-eight bits — but those two tables are not derived from anything.
|
||||
They are the code itself, chosen once by its designers and published, and a
|
||||
receiver that guessed at them would be speaking a different protocol. No
|
||||
decoding logic was taken.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue