mcdiarmid / ldpc-g-matricies

Scripts for creating LDPC generator matricies and corresponding alist files for GNURadio. Contains IRIG106 generators.
4 stars 0 forks source link

Issue using alist in GNU Radio #1

Open Josvth opened 3 months ago

Josvth commented 3 months ago

Hi! I'm running GNU radio 3.10.1.1 and trying to use the alists you generated.

I'm getting the following error: gsl: ../gsl/gsl_matrix_double.h:302: ERROR: first index out of range Default GSL error handler invoked.

when using the following FEC/LDPC blocks:

Screenshot and .grc file attached. Any idea where my setup is wrong?

image fecapi_ldpc_encoders.zip

mcdiarmid commented 3 months ago

Hi there, I'll get back to you on this once I've updated my GNURadio build.

I'll quickly mention though that if you have any intention of doing LDPC decoding in GNURadio, the decoder was not working up until 3.10.8, where they fixed functionality https://github.com/gnuradio/gnuradio/releases/tag/v3.10.8.0 (mentioned under gr-digital).

Josvth commented 3 months ago

Hey @mcdiarmid I may have found the issue. It seems like GNU Radio expects the alist's to start with 1 as a starting index, not zero.

Here's one of GNU Radio's example generator alist:

100 58
29 26
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13 27 21 17 19 25 19 27 15 25 23 15 25 23 29 15 27 21 19 7 25 19 27 25 23 17 21 21 25 23 19 13 7 23 25 23 19 17 25 21 19 23 
22 24 23 26 24 21 20 20 14 21 20 15 26 26 22 19 17 20 15 22 15 25 14 5 19 23 8 19 5 5 11 19 17 20 22 20 19 23 8 5 16 22 18 8 20 16 12 5 8 5 5 5 5 5 17 5 21 18 
1 
2 
3 
4 

versus in this repo:

2048 1024 
537 543 
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 508 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 514 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 528 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 520 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 501 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 537 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 519 
543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 543 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 487 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 531 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 507 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 522 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 524 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 516 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 542 
0 
1 
2 
3 

I'm still familiarizing with the alist format, so not sure what those indexes mean, and if they should be 0 or 1 starting-indexed.

But running your code when adding +1 to the index seems to make GNU Radio run. Let me know if you think it should start at 0 or 1 and I can perhaps make a pull request to change it.

Thanks for the heads up on LDPC, I'll keep a look-out for that.

mcdiarmid commented 3 months ago

Hey @Josvth,

You've pointed me in the right direction, all numbers from lines 5 onwards in each of the files indexes from 0, whereas the alist file format does appear to index from 1. Pretty big oversight on my part, but super quick and easy to fix.

I've also found that a missing python dependency jpype1 from requirements.txt (this should've been in Tabula's requirements but my fault for assuming such), and I accidentally broke a regex pattern during a tidy-up commit a while back that causes the generator script to fail.

I'll address these changes shortly and get back to you once merged.

Cheers

Edit: the r=2/3, k=1024 alist file also generated incorrectly due to an issue with parsing the PDF file. I'll also address this.

mcdiarmid commented 3 months ago

Latest commit addresses all of the issues mentioned in my previous comment.

I haven't gotten around to setting up a GNURadio build on my current device so I can't say I've tested these files. Please let me know how you get on if you get to testing this before me.

Off topic - I noticed you had a flowgraph open for SOQPSK-TG. If it's of any help, I've been sporadically working on done some pure-python simulations of the IRIG waveforms in another repo https://github.com/mcdiarmid/waveforms/. I've got a fairly accurate modulator implementation in place for SOQPSK-TG, and am occasionally working on a demodulator implementation based on some academic literature.

Josvth commented 3 months ago

Hey @mcdiarmid, that is great news! I've tried out your new alists in GNURadio and they run fine, but I'll only know for sure once I test with a compatible receive or implement the decoding in GNURadio too.

And indeed, I'm working on some SOQPSK-TG modulator implementations, thanks for sending me your other repo. I do actually see some useful things I would like to discuss with you. Would you mind me opening a issue on that repo so we can compare notes in the open?

mcdiarmid commented 3 months ago

Yeah feel free to open an issue there so we can discuss