[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Re: Best PC Soundcard Telemetry decoder?



>The sound card in my windoze 98 laptop allows feedback
>from output to input.  I can run a generator program or
>simply play back a .wav file and the output can go directly
>into the sound card input which is being used by the
>demod program.  This works nicely with the IZ8BLY demod

What a kludge! :-)

The demodulator package I'm working on for Linux has several modular
components. Each reads from standard input and writes to standard output.

p3mod: Standard input is an arbitrary stream of user data. Segments the
data into 512-byte blocks, adds the P3 sync vector and frame CRC,
performs differential encoding, manchester encoding and BPSK modulation
at 400 bps on a specified audio carrier frequency. The resulting digital
audio signal goes to standard output.

awgn: Standard input is a 16-bit PCM digital audio stream. Measures
the input signal power and generates and adds the appropriate amount
of additive white gaussian noise to yield a specified Eb/No at the
output. The noisy signal is fed to standard output.

p3demod: Standard input is a 16-bit PCM digital audio stream
containing a modulated P3 format telemetry signal. Acquires and tracks
carrier phase, carrier frequency and subcarrier (bit) timing. Emits
BPSK-demodulated symbols on standard output.

p3sync: Standard input is the symbol stream from p3demod. Slices and
differentially decodes the symbols stream, searches for the P3 sync
vector, builds frames and verifies CRC. Frames that pass are emitted
on standard output in binary.

So to test this stuff during development, I usually run a command like

$ p3mod < /dev/urandom | awgn -e 10 | p3demod | p3sync > /dev/null

This takes random data (produced by the Linux kernel and made
available through the /dev/urandom pseudo-device), encodes it as a
P3-format signal, adds white noise to produce a 10dB Eb/No ratio,
demodulates it, retrieves frames and checks CRCs. The output is then
discarded, as in this case I'm only interested in the debugging
information about the performance of the various components
(especially p3demod) that is written to standard error.  That goes to
the screen.

To encode the file "foo" in P3 telemetry format and send it to
the speaker, I could say

$ p3mod < foo | bplay -s 8000 -b 16

(The "bplay" command is a standard utility with Linux that plays files
to the sound card. The arguments tell it that the input is 16-bit PCM
sampled at 8 KHz.)

Or to demonstrate what a 400bps BPSK signal at an Eb/No of 10 dB sounds like:

$ p3mod < foo | awgn -e 10 | bplay -s 8000 -b 16

To actually demodulate real telemetry from a sound card once I'm
finished with the code, I'll say something like

$ brec -s 8000 -b 16 | p3demod | p3sync | your_favorite_analysis_program_here

And if I want to save both the raw audio and the decoded frames to
disk while I also monitor them in real time, I could say

$ brec -s 8000 -b 16 | tee audio.raw | p3demod | p3sync | tee decoded | your_favorite_analysis_program_here

("Tee" is a standard program that copies standard input to standard output
and also to the specified file.)

Naturally, I won't have to actually type all this every time I want
to do it. I can just create a shell script with a simple name that does
it for me.

This ability to arbitrarily pipe separate programs into each other on
the command line almost like tinker toys was one of the most
distinguishing features of UNIX. It is still one of its most powerful
and useful features. Sometimes it *does* make a difference which OS
you choose.

Phil

----
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home