Ryan Malloy 0ee7ff0ad7 Implement full Apollo USB downlink decoder chain
Complete signal processing pipeline from complex baseband to decoded
PCM telemetry, verified against the 1965 NAA Study Guide (A-624):

Core demod (Phase 1):
  - PM demodulator with carrier PLL recovery
  - 1.024 MHz subcarrier extractor (bandpass + downconvert)
  - BPSK demodulator with Costas loop + symbol sync
  - Convenience hier_block2 combining subcarrier + BPSK

PCM frame processing (Phase 2):
  - 32-bit frame sync with Hamming distance correlator
  - SEARCH/VERIFY/LOCKED state machine, complement-on-odd handling
  - Frame demultiplexer (128-word, A/D voltage scaling)
  - AGC downlink decoder (15-bit word reassembly from DNTM1/DNTM2)

Voice and analog (Phase 3):
  - 1.25 MHz FM voice subcarrier demod to 8 kHz audio
  - SCO demodulator for 9 analog sensor channels (14.5-165 kHz)

Virtual AGC integration (Phase 4):
  - TCP bridge client with auto-reconnect and channel filtering
  - DSKY uplink encoder (VERB/NOUN/DATA command sequences)

Top-level receiver (Phase 5):
  - usb_downlink_receiver hier_block2: one block, complex in, PDUs out
  - 14 GRC block YAML definitions for GNU Radio Companion
  - Example scripts for signal analysis and full-chain demo

Infrastructure:
  - constants.py with all timing/frequency/frame parameters
  - protocol.py for sync word + AGC packet encode/decode
  - Synthetic USB signal generator for testing
  - 222 tests passing, ruff lint clean
2026-02-20 13:18:42 -07:00

gr-apollo

GNU Radio 3.10+ out-of-tree module for decoding Apollo Unified S-Band (USB) telecommunications signals.

Overview

The Apollo Unified S-Band system was the primary communication link between the spacecraft and Earth during the Apollo missions (1967-1972). This module implements GNU Radio blocks to decode these signals, enabling:

  • Reception of Apollo-era recordings
  • Integration with the Virtual AGC emulator
  • Educational exploration of 1960s space communications

Signal Specifications

Parameter Value
Downlink Frequency 2287.5 MHz
Uplink Frequency 2106.40625 MHz
Coherent Ratio 240/221
PM Peak Deviation 0.133 rad (7.6°)
PCM Subcarrier 1.024 MHz BPSK
PCM Bit Rate 51.2 kbps (high) / 1.6 kbps (low)
Voice Subcarrier 1.25 MHz FM
Frame Length 128 words × 8 bits @ 50 fps

Installation

# Using uv (recommended)
uv pip install -e .

# Install GRC blocks
cp grc/*.yml ~/.local/share/gnuradio/grc/blocks/

Signal Chain

RF 2287.5 MHz
     │
     ▼
┌─────────────┐
│ Carrier PLL │ ◄── 240/221 coherent recovery
└─────────────┘
     │
     ▼
┌─────────────┐
│  PM Demod   │ ◄── 0.133 rad peak deviation
└─────────────┘
     │
     ├────────────────────┬──────────────────┐
     ▼                    ▼                  ▼
┌──────────┐        ┌──────────┐       ┌──────────┐
│ 1.024MHz │        │ 1.25 MHz │       │ Ranging  │
│   BPSK   │        │    FM    │       │   PRN    │
└──────────┘        └──────────┘       └──────────┘
     │                    │
     ▼                    ▼
┌──────────┐        ┌──────────┐
│ PCM Sync │        │  Voice   │
│ 51.2kbps │        │ 300-3kHz │
└──────────┘        └──────────┘
     │
     ▼
┌──────────┐
│ 128-word │
│  Demux   │
└──────────┘
     │
     ▼
  Telemetry

References

License

MIT

Description
Apollo Unified S-Band decoder for GNU Radio 3.10+
Readme 881 KiB
Languages
Python 100%