gr-apollo/grc/apollo_downlink_decoder.block.yml
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

49 lines
1.1 KiB
YAML

id: apollo_downlink_decoder
label: Apollo Downlink Decoder
category: '[Apollo USB]'
flags: [python]
parameters:
- id: buffer_size
label: Buffer Size (words)
dtype: int
default: '400'
inputs:
- label: agc_data
domain: message
outputs:
- label: downlink
domain: message
templates:
imports: from apollo import downlink_decoder
make: apollo.downlink_decoder.downlink_decoder(buffer_size=${buffer_size})
documentation: |-
Apollo AGC Downlink Decoder
Reassembles 15-bit AGC words from channel 34/35 byte pairs and
interprets downlink list headers to identify mission-phase telemetry.
The AGC sends telemetry snapshots in "downlink lists" whose format
depends on mission phase:
ID 0: CM Powered Flight
ID 1: LM Orbital Maneuvers
ID 2: CM Coast/Alignment
ID 3: LM Coast/Alignment
ID 7: LM Descent/Ascent
ID 8: LM Lunar Surface Alignment
ID 9: CM Entry Update
AGC word reassembly:
DNTM1 (ch 34): bits 14-8 (high 7 bits)
DNTM2 (ch 35): bits 7-0 (low 8 bits)
Combined: 15-bit word (0-32767)
Parameters:
buffer_size: Number of 15-bit words per downlink buffer (default 400)
file_format: 1