summaryrefslogtreecommitdiff
path: root/gr-digital/python/qa_mpsk_receiver.py
diff options
context:
space:
mode:
authorJosh Blum2011-09-05 22:35:52 -0700
committerJosh Blum2011-09-05 22:35:52 -0700
commit7628cff158a4bddaef5f38dc649ea9047008ed48 (patch)
tree18d32766d5dc97be3f24a5cedf38d018194d1f1c /gr-digital/python/qa_mpsk_receiver.py
parentf535cd0f1fbc7cfc753f5abbe99251a50cd32acb (diff)
parent65fbbb8f752ebf522ac2628f850445e66a278e2f (diff)
downloadgnuradio-7628cff158a4bddaef5f38dc649ea9047008ed48.tar.gz
gnuradio-7628cff158a4bddaef5f38dc649ea9047008ed48.tar.bz2
gnuradio-7628cff158a4bddaef5f38dc649ea9047008ed48.zip
Merge branch 'digital' of https://github.com/trondeau/gnuradio into digital
Conflicts: gnuradio-core/src/lib/general/gr_pll_carriertracking_cc.h gnuradio-core/src/lib/general/gr_pll_freqdet_cf.h gr-digital/lib/digital_constellation.h gr-digital/lib/digital_constellation_receiver_cb.h gr-digital/lib/digital_fll_band_edge_cc.h gr-digital/lib/digital_mpsk_receiver_cc.h
Diffstat (limited to 'gr-digital/python/qa_mpsk_receiver.py')
-rwxr-xr-x[-rw-r--r--]gr-digital/python/qa_mpsk_receiver.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/gr-digital/python/qa_mpsk_receiver.py b/gr-digital/python/qa_mpsk_receiver.py
index 7e9a76e1f..6531e59f7 100644..100755
--- a/gr-digital/python/qa_mpsk_receiver.py
+++ b/gr-digital/python/qa_mpsk_receiver.py
@@ -36,8 +36,7 @@ class test_mpsk_receiver(gr_unittest.TestCase):
# Test BPSK sync
M = 2
theta = 0
- alpha = 0.1
- beta = 0.25*alpha*alpha
+ loop_bw = cmath.pi/100.0
fmin = -0.5
fmax = 0.5
mu = 0.25
@@ -46,7 +45,7 @@ class test_mpsk_receiver(gr_unittest.TestCase):
gain_omega = 0.001
omega_rel = 0.001
- self.test = digital_swig.mpsk_receiver_cc(M, theta, alpha, beta,
+ self.test = digital_swig.mpsk_receiver_cc(M, theta, loop_bw,
fmin, fmax, mu, gain_mu,
omega, gain_omega,
omega_rel)
@@ -68,8 +67,8 @@ class test_mpsk_receiver(gr_unittest.TestCase):
expected_result = expected_result[len_e - Ncmp:]
dst_data = dst_data[len_d - Ncmp:]
- #print expected_result
- #print dst_data
+ #for e,d in zip(expected_result, dst_data):
+ # print e, d
self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 1)
@@ -78,8 +77,7 @@ class test_mpsk_receiver(gr_unittest.TestCase):
# Test QPSK sync
M = 4
theta = 0
- alpha = 0.1
- beta = 0.25*alpha*alpha
+ loop_bw = 2*cmath.pi/100.0
fmin = -0.5
fmax = 0.5
mu = 0.25
@@ -88,11 +86,11 @@ class test_mpsk_receiver(gr_unittest.TestCase):
gain_omega = 0.001
omega_rel = 0.001
- self.test = digital_swig.mpsk_receiver_cc(M, theta, alpha, beta,
+ self.test = digital_swig.mpsk_receiver_cc(M, theta, loop_bw,
fmin, fmax, mu, gain_mu,
omega, gain_omega,
omega_rel)
-
+
data = 1000*[complex( 0.707, 0.707), complex( 0.707, 0.707),
complex(-0.707, 0.707), complex(-0.707, 0.707),
complex(-0.707, -0.707), complex(-0.707, -0.707),
@@ -103,8 +101,8 @@ class test_mpsk_receiver(gr_unittest.TestCase):
self.tb.connect(self.src, self.test, self.snk)
self.tb.run()
- expected_result = 1000*[complex(1.2, 0), complex(0, 1.2),
- complex(-1.2, 0), complex(0, -1.2)]
+ expected_result = 1000*[complex(0, -1.0), complex(1.0, 0),
+ complex(0, 1.0), complex(-1.0, 0)]
dst_data = self.snk.data()
# Only compare last Ncmp samples
@@ -114,9 +112,9 @@ class test_mpsk_receiver(gr_unittest.TestCase):
expected_result = expected_result[len_e - Ncmp:]
dst_data = dst_data[len_d - Ncmp:]
- #print expected_result
- #print dst_data
-
+ #for e,d in zip(expected_result, dst_data):
+ # print e, d
+
self.assertComplexTuplesAlmostEqual (expected_result, dst_data, 1)
if __name__ == '__main__':