id: apollo_ranging_mod label: Apollo Ranging Modulator category: '[Apollo USB]' flags: [python] parameters: - id: chip_rate label: Chip Rate (Hz) dtype: int default: '993963' - id: sample_rate label: Sample Rate (Hz) dtype: real default: '5120000' inputs: - label: in domain: stream dtype: byte outputs: - label: out domain: stream dtype: float templates: imports: from apollo.ranging_mod import ranging_mod make: apollo.ranging_mod.ranging_mod(chip_rate=${chip_rate}, sample_rate=${sample_rate}) documentation: |- Apollo Ranging Modulator NRZ-encodes PRN ranging chips (byte 0/1) to float (+1/-1) at the specified sample rate. Output is suitable for summing with other subcarriers before PM carrier modulation. At the default 5.12 MHz sample rate, each chip occupies ~5 samples. This is the same NRZ transform as the PCM NRZ Encoder but configured for the ranging chip rate (~994 kchip/s) instead of the PCM bit rate. Parameters: chip_rate: PRN chip rate (default 993,963 Hz) sample_rate: Output sample rate (default 5.12 MHz) file_format: 1