Phil Karn has changed his code and split dpsk_demod into two parts, dpsk_demod and fec_decode, and provided in addition p3_convert for converting the 256 byte blocks from fec_decode into the usual 512 byte blocks. The following refers to ao40prototype-5.01 (July 2003).
In order to use fec_decode and p3_decode with the same data stream, two pipes have been installed (as hidden files: .telem.1 and .telem.2). And for merging the decoded blocks in proper sequence, "fflush(stdout)" instructions have been added in p3_convert and p3_decode after fwrite(...,stdout). Otherwise the output comes in 4096 byte junks (8 telemetry blocks).
Four processes are started. The first one reads from the sound card and starts dpsk_demod, feeding the two pipes. The next two processes invoke the two decoders.The fourth process deletes with a filter (tlmuniq) duplicate A blocks, in cases were the same block is received in uncoded and FEcoded form, and feeds a display program (phase3d) in parallel to the output file.
rec -c 1 -r 9600 -s w -f s -t raw - | dpsk_demod --verbose | tee .telem.1 .telem.2 > /dev/null
cat .telem.1 | p3_decode --verbose >> Tyymmdd.raw
cat .telem.2 | fec_decode --verbose | p3_convert >> Tyymmdd.raw
tail -c 512 -f Tyymmdd.raw | tlmuniq | tee -a Tyymmdd.tlm | phase3d
Test setup: 1.2m dish, G3RUH patch, preamp MKU232,IC-970/UX-98 Hardware modems: DSP-12, G3RUH digital (outputs merged) Sound card with KA9Q's dpsk_demod (ao40prototype-1.2.1)
phase3 /dev/ttyC0 2>logDSP12.1194 | etmfilter 0x80 0x00 >> k030607.raw
phase3 /dev/ttyC4 2>logG3RUH.1194 | etmfilter 0x80 0x00 >> k030607.raw
rec -c 1 -r 9600 -s w -f s -t raw - | dpsk_demod --verbose >> demodout.1194 2> logFEC.1194
tail -c 512 -f k030607.raw | tlmuniq | tee -a k030607.tlm | phase3d
tail -c 256 -f demodout.1194 | fecfilter blockAhead | tee -a f030607.a | phase3d
tail -f logDSP12.1194
tail -f logG3RUH.1194
tail -f logFEC.1194
cat k030607.tlm | tlmfilter 0xff 0x41 >> k030607.a
Not necessary, since A blocks only have been transmitted.
You find in
logFEC.1194, the dpsk_demod output (256 byte blocks) as
the output converted to normal A-block format (512 byte blocks) in
the A blocks merged from DSP-12 and G3RUH demod (for MA 113 to 243) in
summary.1194 file is provided, which shows a prediction listing by MA with squint angle,
number of CRC=OK blocks received by the two hardware demods, the number of FEC encoded blocks received by Phil Karn's
dpsk_demod, and some error information, extracted -- not quite correctly -- from the
k030607.fec can be viewed for example
ao40tlmview -f f030607.tlm.
To understand the following comments you should get the
summary.1194 file in front of you.
Phil's demod program assumes currently a continuous stream of FEC encoded blocks, while the test transmission from AO-40 mixes normal blocks (512 bytes plain binary code with 2 bytes CRC) with the FEC encoded blocks. To get a feeling for the problems with synchronisation, we might look at the undisturbed transmission from MA 136 (squint 28 deg) to MA 183 (squint 39 deg). A total of (183-136+1)*5 = 240 blocks have been transmitted, and all uncoded blocks have been received with CRC=OK. The demod was able to synchronize properly for 52 FEC-blocks (650 bytes). This ratio of 52/240 = 21.7 % has been observed already at a transmission on orbit 1187 (June 01). When we look now at a period of disturbed to marginal transmission, MA 184 (squint 40 deg) to MA 230 (squint 63 deg), AO-40 has transmitted (230-184+1)*5 = 235 blocks, of which only 113 plain blocks have been received with CRC=OK. The efficiency for plain blocks is 113/235 = 48 %. In the same period 45 FEC blocks have been properly received, yielding 45/235 = 19.1 %. If we extrapolate the problems with the synchronisation from the previous period, we get 19.1/21.7 = 88 % efficiency for the FEC. This first experiment shows for disturbed transmission nearly a doubling of efficiency by the FEC transmission.
When inspecting the log of dpsk_demod (
logFEC.1194) you should search for "LOCK" to see the
successfully decoded frames, including information on possible error corrections.
The MA ranges of the table have been selected according to the yield of CRCok blocks within one MA interval: 0-1, 2-4, and 5.
Orbit 1199 Jun 11, 2003