gr-apollo/grc/apollo_sco_demod.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

53 lines
1.2 KiB
YAML

id: apollo_sco_demod
label: Apollo SCO Demod
category: '[Apollo USB]'
flags: [python]
parameters:
- id: sco_number
label: SCO Channel (1-9)
dtype: int
default: '1'
- id: sample_rate
label: Sample Rate (Hz)
dtype: real
default: '5120000'
inputs:
- label: in
domain: stream
dtype: float
outputs:
- label: out
domain: stream
dtype: float
templates:
imports: from apollo import sco_demod
make: >-
apollo.sco_demod.sco_demod(
sco_number=${sco_number},
sample_rate=${sample_rate})
documentation: |-
Apollo Subcarrier Oscillator (SCO) Demodulator
Recovers analog sensor voltages (0-5V) from FM subcarrier oscillators used
in FM downlink mode. The spacecraft PMP generates 9 SCO channels encoding
analog telemetry as frequency deviations of +/-7.5% around each channel's
center frequency.
SCO Channels:
1: 14,500 Hz 4: 40,000 Hz 7: 95,000 Hz
2: 22,000 Hz 5: 52,500 Hz 8: 125,000 Hz
3: 30,000 Hz 6: 70,000 Hz 9: 165,000 Hz
Only valid in FM downlink mode (not PM mode).
Parameters:
sco_number: SCO channel number (1-9)
sample_rate: Input sample rate in Hz (default 5.12 MHz)
file_format: 1