Demod2
Some random notes about the reference BPSK-1000 reference modem for ARISSat-1 by Phil Karn, KA9Q.
Overview
The package contains a DSP lilbrary libdspfec.a and various utility programs for testing and demonstration purposes. The included Makefile will build the library and all executables.
Operational constraints
- The reference implementation uses 48 ksps. For other sample rates the filter coefficients in nyquist.c must be reworked[1]. It is therefore easier to resample to 48 ksps.
- The sample type is 16 bit linear PCM little-endian with range ±32767
DSP library
libdspfec.a and dsfec.h
Top level applications
mod
Complete encoder and modulator.
Takes arbitrary data stream as input (LSB first according to HDLC standard), applies CRC and FEC, and outputs modulated baseband.
- Input: 500 bps arbitrary data; becomes 1000 symbols/sec with FEC (Since it is R=1/2 FEC, the HDLC framing code and CRC are part of the 500bps, i.e. 6 bytes / packet)
- Output: 48 kHz 16-bit linear PCM little-endian
demod
Complete demodulator and decoder.
- Input: 48 kHz 16-bit linear PCM little-endian
- Output: 500 bps data stream
Examples
The following will take the data from input.dat, and output 48 ksps baseband that can be sent to audio:
cat input.dat | ./mod > baseband.raw
The following will take the baseband data, demodulate and decode it:
can baseband.raw | ./demod > output.dat
We can also combine it into one command:
cat input.dat | ./mod | ./demod > output.dat
input.dat and output.dat should be identical.
Utilities
addcw
Generates morse code signal and adds it to the input signal. See manual page for details.
addnoise
Generates Gaussian noise and adds it to the input signal. See manual page for details.
async_hdlc_decode
bplay
byteorder
dist
gentestdata
meter
Test programs
dotprod_test
pack_unpack_test
parity_test
peak_test
rand_test
sq_test
sub_test
viterbi27_streamtest
viterbi27_test
References
- ↑ dpsk.h line 58-61