Skip to content

Protocol Constants

All protocol parameters are defined in protocol.py. Every module imports from this single source of truth.

Carrier

ConstantValueDescription
SAMPLE_RATE44100 HzCD quality
CARRIER_FREQ3000 HzStereo quadrature carrier
AMPLITUDE0.85-1.4 dBFS peak

Velocity Subcarrier

ConstantValueDescription
VELOCITY_SUBCARRIER_FREQ500 HzAM-modulated onto carrier
VELOCITY_MODULATION_DEPTH0.15Max 15% amplitude modulation

Frame Format

ConstantValueDescription
BARKER_13[1,1,1,1,1,0,0,1,1,0,1,0,1]Sync word
POSITION_BITS24Max 167772 seconds
CRC_BYTES2CRC-16 fast-reject
RS_PARITY_BYTES4Reed-Solomon parity
TOTAL_FRAME_BITS85Complete frame
CYCLES_PER_FRAME4250At 50 cycles/bit
SECONDS_PER_FRAME1.417 sNormal rate

Multi-Rate

ConstantValueDescription
MULTI_RATE_THRESHOLD_SEC300 sSwitch to dense mode
MULTI_RATE_DENSE_FACTOR2Double frame rate

Decoder

ConstantValueDescription
PLL_BANDWIDTH_PCT0.088% of carrier
PLL_Q2.5Bandpass quality factor
PLL_LOCK_TAU0.05 sLock detector time constant
PLL_AMPLITUDE_GATE0.005Coast threshold
PLL_INTEGRAL_DRAIN0.98Decay rate when unlocked
MASS_SPRING_INERTIA0.95Platter inertia
MASS_SPRING_DEAD_ZONE0.02Snap-to-zero threshold

Released under the MIT License.