Modifying C++ Files

Hello,

I am attempting to modify the bpsk.py file in order to obtain OOK
modulation. I would like to change my constellation points to 1+0i and
0+0i.
I understand that the digital_costellation.cc file is being used to set
these parameters. I have tried to modify the digitial_constellation.cc
file
in the gr-digital folder, but I am not able to see any changes. I have
made
sure that I make and make install every time I change the file. I was
hoping
someone could tell me what I am doing wrong. I would greatly appreciate
any
help or advice that anyone could give me. Thank you for your time and
help.

Sam


View this message in context:
http://old.nabble.com/Modifying-C%2B%2B-Files-tp33663518p33663518.html
Sent from the GnuRadio mailing list archive at Nabble.com.

Hi Sam,

In bpsk.py you’ll see the line

constellation = digital_swig.constellation_bpsk()

If you change this to:

constellation = digital.constellation_calcdist((1+0i, 0+0i), [], 1, 1)

, you should get the change in modulation you want.

You only need to mess with the digital_constellation.cc file if you
want to implement an efficient non-generic
decision maker for this modulation.

To know why what you’re doing isn’t working, I’d need to know what
modifications you’re making to the .cc file. It sounds like you’re
doing everything right.

Cheers,
Ben

Hello Ben,

Thank you for your help. I was able to get the result I wanted with
the line of code you suggested. I was changing d_constellation[0] =
gr_complex(-1,0) to d_constellation[0]= gr_complex(0,0). In order to
demodulate my signal, I should be able to make the same change in the
demodulator part of the code, correct? Thank you very much for your help
and time.

Thanks
Sam

On Wed, Apr 11, 2012 at 3:29 PM, Samuel I. [email protected] wrote:

Hello Ben,

Thank you for your help. I was able to get the result I wantedwith theline
of code you suggested. I was changing d_constellation[0] = gr_complex(-1,0)
to d_constellation[0]= gr_complex(0,0). In order to demodulate my signal,I
should be able to make the same change in the demodulator part of the code,
correct?

Yes.

On the off chance that you decide you want to edit the
digital_constellation.cc file (rather than using the generic
constellation_calcdist) make sure that you also edit the
decision_maker method.