Bug in DBPSK blocks

Hi all,

There’s a bug in the block for the DBPSK modulator. The “differential”
param isn’t set to True in dbpsk_mod; it’s just left to default, and
differential defaults to False in the bpsk_mod block. So it really acts
like a BPSK modulator. QPSK was the same. Here’s a patch.

diff --git a/gr-digital/python/digital/bpsk.py
b/gr-digital/python/digital/bpsk.py
index 57cf253…92f3254 100644
— a/gr-digital/python/digital/bpsk.py
+++ b/gr-digital/python/digital/bpsk.py
@@ -117,7 +117,7 @@ class dbpsk_mod(bpsk_mod):

 def __init__(self, mod_code=None, *args, **kwargs):
  •    super(dbpsk_mod, self).__init__(*args, **kwargs)
    
  •    super(dbpsk_mod, self).__init__(differential=True, *args, 
    

**kwargs)

/////////////////////////////////////////////////////////////////////////////

DBPSK demodulator

@@ -139,7 +139,7 @@ class dbpsk_demod(bpsk_demod):

 def __init__(self, mod_code=None, *args, **kwargs):
  •    super(dbpsk_demod, self).__init__(*args, **kwargs)
    
  •    super(dbpsk_demod, self).__init__(differential=True, *args,
    

**kwargs)

Add these to the mod/demod registry

diff --git a/gr-digital/python/digital/qpsk.py
b/gr-digital/python/digital/qpsk.py
index 859d981…1ed3357 100644
— a/gr-digital/python/digital/qpsk.py
+++ b/gr-digital/python/digital/qpsk.py
@@ -149,7 +149,7 @@ class dqpsk_mod(qpsk_mod):
doc += shared_mod_args

 def __init__(self, mod_code=_def_mod_code, *args, **kwargs):
  •    super(dqpsk_mod, self).__init__(mod_code,
    
  •    super(dqpsk_mod, self).__init__(mod_code, True,
                                       *args, **kwargs)
    

/////////////////////////////////////////////////////////////////////////////
@@ -171,7 +171,7 @@ class dqpsk_demod(qpsk_demod):
doc += shared_demod_args

 def __init__(self, mod_code=_def_mod_code, *args, **kwargs):
  •    super(dqpsk_demod, self).__init__(mod_code,
    
  •    super(dqpsk_demod, self).__init__(mod_code, True,
                                         *args, **kwargs)
    

Incidentally, I question the need for the DBPSK mod GRC block now that
we
have the generic PSK mod GRC block. Might make sense to deprecate it.

–n

On Tue, Dec 3, 2013 at 1:52 PM, Nick F. [email protected]
wrote:

Hi all,

There’s a bug in the block for the DBPSK modulator. The “differential” param
isn’t set to True in dbpsk_mod; it’s just left to default, and differential
defaults to False in the bpsk_mod block. So it really acts like a BPSK
modulator. QPSK was the same. Here’s a patch.

Thanks for the report and patch, Nick. I should get to it today, but
in the meantime, I opened ticket #624 in case it slips my timeline
today. In the future, best to put these things up on the Issues
tracker.

  •    super(dbpsk_mod, self).__init__(differential=True, *args, **kwargs)
    

**kwargs)

 def __init__(self, mod_code=_def_mod_code, *args, **kwargs):
  •    super(dqpsk_demod, self).__init__(mod_code,
    
  •    super(dqpsk_demod, self).__init__(mod_code, True,
                                         *args, **kwargs)
    

Incidentally, I question the need for the DBPSK mod GRC block now that we
have the generic PSK mod GRC block. Might make sense to deprecate it.

–n

I quite agree. I have a note to myself to clean this up with 3.8.

Tom

Thanks - I reported this as a bug months ago and nobody took any notice

  • so I assumed it was me.

Mike

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs