floripasat / grs

Ground Station Software
GNU General Public License v3.0
20 stars 5 forks source link

Initialization of Reed-Solomon decoder #32

Open daniestevez opened 4 years ago

daniestevez commented 4 years ago

I am looking to add a decoder for FloripaSat-1 to gr-satellites. I am following ngham as a reference to decode the NGHam protocol, but I can't get Reed-Solomon decoding working with some packets transmitted by the satellite.

I have done more investigation and I have seen that in the grs code the Reed-Solomon decoder variables are not initialized properly (see the line below). https://github.com/floripasat/grs/blob/909f7af337c2fce7a3b0f0aa159c1f37ed025acc/libs/ngham/ngham.c#L81

I can't even understand why this isn't segfaulting, since variables such as alpha_to are dereferenced during decode_rs_char().

daniestevez commented 4 years ago

Now I see that since nroots = 0, all the loops in decode_rs_char() are bypassed. This explains why the decoder doesn't segfault.

But my conclusion is that the current decoder is not doing Reed-Solomon decoding.