discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] gr-fec Viterbi example


From: Gisle Vanem
Subject: Re: [Discuss-gnuradio] gr-fec Viterbi example
Date: Fri, 10 Aug 2018 16:10:29 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Jean-Michel FRIEDT wrote:

I am currently investigating LRPT (as used by METEOR-M2) and am
stuck with the Viterbi decoder. While trying to use
https://github.com/gnuradio/gnuradio/blob/master/gr-fec/lib/viterbi/decode.cc
which implements

I tried building this program on Windows and failed. Since it's
missing in viterbi/CmakeLists.txt, I fail to see it's built by
default. How did you compile it? Are you sure it wasn't written
on a big-endian machine?

On Windows at least, the viterbi.h + decode.cc + encode.cc are
not up-to-date. Missing proper dllexport, setmode(fd,O_BINARY)
etc. etc.

Anyway, with some patching I was able to link and run them.
But I have no data to test the Viterbi encoder/decoder with.
Could you please ship some files to me?

I am unable to encode the sync word 0x1ACFFC1D to the expected result
0xfc 0xa2 0xb6 0x3d 0xb0 0x0d 0x97 0x94 as explained at
https://www.teske.net.br/lucas/2016/11/goes-satellite-hunt-part-3-frame-decoder/
I know this encoded sync word is correct because cross-correlating the
METEOR stream (after proper constellation rotation) with this word gives
a correlation peak every 16384 samples (=1024 byte sentence * 8 bits/byte * 2
bits/Viterbi encoder).

I am doing (word.bin was generated with Octave's fwrite function)
$ xxd word.bin
00000000: 1acf fc1d 0000 0000 0000                 ..........
and then
$ cat word.bin | ./viterbi/encode > t.bin
but
$ xxd t.bin
00000000: 0000 0000 0000 0101 0001 0001 0101 0001  ................
00000010: 0001 0000 0100 0001 0101 0000 0000 0100  ................
00000020: 0001 0000 0101 0101 0101 0101 0000 0100  ................
00000030: 0001 0100 0100 0000 0001 0100 0100 0101  ................
00000040: 0000 0001 0001 0101 0001 0101 0000 0000  ................
does not match the expected bit sequence which should be
word=[1 1 1 1 1 1 0 0 ... %  fc
       1 0 1 0 0 0 1 0 ... %  a2
       1 0 1 1 0 1 1 0 ... %  b6
       0 0 1 1 1 1 0 1 ... %  3d
       1 0 1 1 0 0 0 0 ... %  b0
       0 0 0 0 1 1 0 1 ... %  0d
       1 0 0 1 0 1 1 1 ... %  97
       1 0 0 1 0 1 0 0 ... %  94

I had no lock with 'xxd -revert' to check your results here
I used the attached hex2bin.c instead.

And BTW, my patches also attached.

--
--gv


Attachment: hex2bin.c
Description: Text document

Attachment: gr-fec.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]