summaryrefslogtreecommitdiff
path: root/gr-digital/python/dbpsk.py
diff options
context:
space:
mode:
authorJosh Blum2011-07-28 17:02:58 -0700
committerJosh Blum2011-07-28 17:02:58 -0700
commit8bc1c4dc5a8d31594e8768a10e05b4b0172e733e (patch)
treefcb957028a108ca719a6cb879e7d62713b35ba1c /gr-digital/python/dbpsk.py
parent8c824bf2e3e6758aff05ee4b5f4d3f106a13c672 (diff)
parent8b3c4ccf922c602ae77dad7f3911b16bdd0112d3 (diff)
downloadgnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.tar.gz
gnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.tar.bz2
gnuradio-8bc1c4dc5a8d31594e8768a10e05b4b0172e733e.zip
Merge branch 'digital' of https://github.com/trondeau/gnuradio into digital
Conflicts: gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h gnuradio-core/src/lib/general/gr_constellation_decoder_cb.h gnuradio-core/src/lib/general/gr_costas_loop_cc.h gnuradio-core/src/lib/general/gr_lms_dfe_cc.h gnuradio-core/src/lib/general/gr_lms_dfe_ff.h gr-digital/lib/Makefile.am gr-digital/lib/digital_binary_slicer_fb.h gr-digital/lib/digital_clock_recovery_mm_cc.h gr-digital/lib/digital_clock_recovery_mm_ff.h gr-digital/lib/digital_correlate_access_code_bb.h gr-digital/lib/digital_crc32.h gr-digital/lib/digital_mpsk_receiver_cc.h gr-digital/python/Makefile.am gr-digital/python/__init__.py gr-digital/python/generic_mod_demod.py gr-digital/python/pkt.py gr-digital/python/psk2.py gr-digital/python/qam.py
Diffstat (limited to 'gr-digital/python/dbpsk.py')
-rw-r--r--gr-digital/python/dbpsk.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/gr-digital/python/dbpsk.py b/gr-digital/python/dbpsk.py
index 2e9b756e6..9e065263f 100644
--- a/gr-digital/python/dbpsk.py
+++ b/gr-digital/python/dbpsk.py
@@ -100,6 +100,7 @@ class dbpsk_mod(gr.hier_block2):
self.diffenc = gr.diff_encoder_bb(arity)
+
self.chunks2symbols = gr.chunks_to_symbols_bc(psk.constellation[arity])
# pulse shaping filter
@@ -272,9 +273,8 @@ class dbpsk_demod(gr.hier_block2):
self.diffdec = gr.diff_phasor_cc()
# find closest constellation point
- rot = 1
- rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
- self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
+ const = digital_swig.constellation_bpsk()
+ self.slicer = digital_swig.constellation_decoder_cb(const.base())
if self._gray_code:
self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
@@ -312,8 +312,8 @@ class dbpsk_demod(gr.hier_block2):
print "Timing alpha gain: %.2e" % self._timing_alpha
print "Timing beta gain: %.2e" % self._timing_beta
print "Timing max dev: %.2f" % self._timing_max_dev
- print "Phase track alpha: %.2e" % self._phase_alpha
- print "Phase track beta: %.2e" % self._phase_beta
+ print "Phase damping fact: %.2e" % self._phase_damping
+ print "Phase natural freq: %.2e" % self._phase_natfreq
def _setup_logging(self):
print "Modulation logging turned on."
@@ -345,8 +345,10 @@ class dbpsk_demod(gr.hier_block2):
help="disable gray coding on modulated bits (PSK)")
parser.add_option("", "--freq-alpha", type="float", default=_def_freq_alpha,
help="set frequency lock loop alpha gain value [default=%default] (PSK)")
- parser.add_option("", "--phase-alpha", type="float", default=_def_phase_alpha,
- help="set phase tracking loop alpha value [default=%default] (PSK)")
+ parser.add_option("", "--phase-natfreq", type="float", default=_def_phase_natfreq,
+ help="set natural frequency of phase tracking loop [default=%default] (PSK)")
+ parser.add_option("", "--phase-damping", type="float", default=_def_phase_damping,
+ help="set damping factor of phase tracking loop [default=%default] (PSK)")
parser.add_option("", "--timing-alpha", type="float", default=_def_timing_alpha,
help="set timing symbol sync loop gain alpha value [default=%default] (GMSK/PSK)")
parser.add_option("", "--timing-beta", type="float", default=_def_timing_beta,
@@ -366,5 +368,5 @@ class dbpsk_demod(gr.hier_block2):
#
# Add these to the mod/demod registry
#
-modulation_utils2.add_type_1_mod('dbpsk3', dbpsk_mod)
-modulation_utils2.add_type_1_demod('dbpsk3', dbpsk_demod)
+modulation_utils2.add_type_1_mod('dbpsk', dbpsk_mod)
+modulation_utils2.add_type_1_demod('dbpsk', dbpsk_demod)