drmpeg / gr-dvbs2

A DVB-S2 and DVB-S2X transmitter for GNU Radio
GNU General Public License v3.0
128 stars 37 forks source link

Modulator doesn't work in some cases #4

Closed Belkachait08 closed 5 years ago

Belkachait08 commented 5 years ago

Hi, I've encountered some issues with the dvbs2 modulator tool. I'm sending a string in it "to be, or not to be" (by packs of 4 bits or 3 depending on the modulation). So I have: 0101 0100 (T) 0110 1111 (o).... sent into the modulator. For the 16apsk modulator I get (0,0j) mapped for the '1111' pack. Maybe it's some kind of rounding issue. For the 8psk it never gives '1j' or '1' but '1j+XXe-16' or '1+XXje-16'.

I'm probably gonna use a constellation mapper and tell you if the problem comes from my code or if the modulator is faulty.

drmpeg commented 5 years ago

For 16APSK, you have to chose a valid code rate. The default 1/4 is not valid. Try 2/3 instead.

For 8PSK (and most of the other constellations), the constellation points are calculated with sin() and cos(). For the 100b point, the I value is calculated from cos(2 * M_PI / 4.0) which results in a very small floating point number that's effectively equal to zero.

BTW, these blocks are all built-in to GNU Radio now.

Belkachait08 commented 5 years ago

Yep the code rate was it. Thanks! For the 8psk I didn't really mind the e-16 component but I though that may be it was due to a rounding error in my code. Thanks again !