Expand description
Frame-head preamble for uvpacket’s coherent QPSK modem.
Replaces the 4-FSK Costas-4 head pattern that the Phase 1 design used (and that Phase 2 found could not survive the modulation pivot to coherent QPSK — Costas arrays are FSK-tone-index sequences, not constellation-point sequences).
The new sync is a 31-bit maximum-length sequence (PRBS,
generator polynomial x⁵ + x² + 1) mapped to BPSK at the
channel-symbol rate. 31 chips × 1 sym/chip = 26 ms preamble at
1200 baud. Autocorrelation sidelobes are bounded by 1/31 ≈
−15 dB amplitude, giving a clean correlator peak that the
receiver uses for symbol-timing acquisition, frequency-offset
estimation, and initial carrier-phase lock.
After the preamble, the receiver maintains phase via
decision-directed PLL with periodic PILOT_SYMBOL_INTERVAL
known-QPSK pilot symbols (one per 32 transmitted symbols ≈ 3.1 %
overhead). The pilot’s constellation point is +1 + 0j —
the QPSK symbol mapped from bit pair [0, 0].
§Trait-level placeholder
UVPACKET_SYNC_BLOCKS is kept as a [Costas-4 at symbol 0]
placeholder so that Protocol::SYNC_MODE = SyncMode::Block(...)
has something non-empty to point at and protocol_invariants
tests pass. The uvpacket TX / RX paths are bespoke and do not
consult this constant — they use UVPACKET_PREAMBLE_BPSK_BITS
and PILOT_SYMBOL_INTERVAL directly.
Constants§
- PILOT_
QPSK_ POINT - QPSK pilot constellation point. Chosen as constellation index
0 (= bit pair
[0, 0]) so it maps to+1 + 0j— receiver-side phase reference is straightforward (the pilot’s expected angle is the carrier reference angle). - PILOT_
SYMBOL_ INTERVAL - Pilot interval: every
PILOT_SYMBOL_INTERVALth transmitted symbol after the preamble is a known pilot, the rest are data. 32 means 1 pilot per 31 data → ~3.1 % overhead, comfortable margin against 10 Hz Doppler at 1200 baud (coherence time ≈ 100 ms = 120 symbols, so a pilot every 32 symbols is well inside the coherence interval). - PREAMBLE_
LEN - Length of the m-sequence preamble in BPSK chips (= QPSK transmitted symbols since the preamble is BPSK-mapped onto the QPSK constellation’s I axis).
- UVPACKET_
COSTAS - Decorative 4-FSK Costas pattern kept around so
Protocol:: SYNC_MODE = SyncMode::Block(&UVPACKET_SYNC_BLOCKS)has something to point at andprotocol_invariantschecks pass. Not consulted bycrate::uvpacket::tx::encode/crate::uvpacket::rx::decode_known_layout/crate::uvpacket::rx::decode. - UVPACKET_
PREAMBLE_ BPSK_ BITS - 31-bit maximum-length sequence from a Fibonacci LFSR with
polynomial
x⁵ + x² + 1and initial state[0, 0, 0, 0, 1]. Bits run in TX order. Reproducible: any LFSR walker with the same polynomial / initial state regenerates this exact sequence. - UVPACKET_
SYNC_ BLOCKS Protocol::SYNC_MODEplaceholder. See module docs.