PhosphorTEX — Decoder Test Results
Accuracy testing of the PhosphorTEX NAVTEX decoder against real over-the-air recordings of 518 kHz maritime-safety broadcasts. The testing CLI (NavTexDecode) shares every DSP source file with the iOS app via symlinks — same code, same output.
Decoder stack
- Sample rate: 8 kHz (resampled from source if needed)
- FFT: 512-point Hann-windowed, ~15.6 Hz/bin
- Tone detection: I/Q quadrature demodulation with biquad low-pass filtering (102 Hz cutoff at 170 Hz shift); asymmetric decay-average envelope tracking
- Bit decision: mark / space magnitude comparison with hysteretic squelch (open > 0.002, close > 0.001)
- Clock recovery: DPLL with per-edge phase nudge, α = 0.05
- Framer: rolling 7-bit window + shift-until-valid phase search; sentinel-aligned alpha/rep routing per the CCIR-476 specification; polarity auto-detected via a parallel bit-inverted lane
- AFC: parabolic sub-bin peak interpolation (3-point fit), centre-frequency tracking with snap-on-acquire and ±3 Hz/frame clamp in steady-state, 1 Hz retune threshold; 170 Hz shift snapped to spec (±85 Hz around centre)
- Search band: 800–2500 Hz, spanning both common NAVTEX audio-tuning conventions (see Scope below)
Real-world SDR captures
Tested against publicly-available WebSDR recordings of live 518 kHz NAVTEX traffic. These are noisy over-the-air captures — no cleanup, no SNR preconditioning.
| Capture | Duration | Audio centre | Messages framed | Sample content |
| WebSDR 518 kHz, May 2018 |
8 min 35 s |
~1000 Hz |
20 messages |
Netherlands Coastguard nav warnings (Windfarm Borssele, geotechnical drilling, Riffgat lightbuoys, Helgoland German Bight exercises…) |
| WebSDR 518 kHz, July 2020 |
5 min 23 s |
~1000 Hz |
13 messages |
NCC-Hamburg nav warnings (German armed forces firing exercises, OWP Kaskasi survey operations…) |
Decoded output — WebSDR 518 kHz, May 2018
--- 2026-04-21 | PA19 | NAV WARNING
NETHERLANDS COASTGUARD
NAVIGATIONAL WARNING NR. 19 212040 UTC MAY
WINDFARM BORSSELE
GEOPHYSICAL SURVEY BY BIBBY TETHRA 2EGF8
A. 51-41N 003-08E
B. 51-41N 002-58E
C. 51-49N 003-08E
D. 51-49N 002-58E
WIDE BERTH REQUESTED
---
--- 2026-04-21 | PA42 | NAV WARNING
NETHERLANDS COASTGUARD
NAVIGATIONAL WARNING NR. 42 241200 UTC MAY
RIFFGAT
FOLLOWING LIGHTBUOYS ESTABLISHED
MARKING OYSTER SEABED FARM
CARDINAL SPAR BUOY WNF-N VQ
...
---
Decoded output — WebSDR 518 kHz, July 2020
--- 2026-04-21 | SA97 | NAV WARNING
NCC-HAMBURG
280430 UTC JUL 20
NAV. WARN. NO. 314
GERMAN BIGHT. NORTHWESTERLY OF HELIGOLAND.
FIRING EXERCISES OF GERMAN ARMED FORCES.
ON 29TH OF JULY FROM 0900 TO 1000 UTC. IN THE CHARTED AREA BOUNDED BY
FOLLOWING POSITIONS
54-40N 006-30E
54-40N 007-00E
54-15N 007-00E
54-15N 006-30E
CANCEL THIS MESSAGE 291100 UTC JUL 20.
---
Download Test Files
These WAV files are over-the-air WebSDR captures of live 518 kHz NAVTEX traffic. They can be played from any audio source (laptop, second phone) near the iPhone’s microphone to test the app without a shortwave receiver.
Testing Instructions
- Download either WAV file above (start with the 5-minute one for a quicker test).
- Launch PhosphorTEX on an iPhone. Grant microphone permission when asked.
- Open the DECODE tab (F1). Leave all defaults (AUTO FREQ on, INVERT off).
- Tap START.
- Play the WAV on a laptop or second device at conversational volume, 15–30 cm from the iPhone’s microphone.
- Within a few seconds the LOCK indicator in the status row (top-right) lights up and MARK / SPACE / SHIFT show frequencies in the ~915 / 1085 Hz range with a 170 Hz shift.
- After 10–20 seconds of phasing preamble, text starts appearing. In TAPE view (bottom-left of the DECODE tab) you’ll see lines like
ZCZC PA19 NETHERLANDS COASTGUARD NAVIGATIONAL WARNING NR. 19 …
- Switch to CARDS to see each framed message as a structured card with station letter, subject badge, timestamp, and body.
- LOG tab accumulates the framed messages. Over the full 8-minute WAV you should see ~20 entries.
Scope
The decoder targets both of the common NAVTEX audio tuning conventions:
- Maritime-receiver convention: USB with the carrier positioned so the mark tone lands at approximately 1615 Hz (space 1785 Hz, 170 Hz shift). This is what every NAVTEX receiver operator’s manual specifies.
- SDR / WebSDR convention: the receiver tuned to 517.000 kHz in USB mode, placing the mark tone at approximately 1085 Hz and space at 915 Hz (±85 around a centre of 1000 Hz). This is what the publicly-available recordings at 518 kHz universally use.
AFC search band is 800–2500 Hz to span both, and the decoder runs normal and polarity-inverted lanes in parallel so mark-on-upper-tone vs mark-on-lower-tone captures both decode without any manual toggle.