diff options
Diffstat (limited to 'gr-digital/python/dbpsk.py')
-rw-r--r-- | gr-digital/python/dbpsk.py | 20 |
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) |