diff options
author | Marcus Müller <marcus@hostalia.de> | 2018-08-31 23:02:22 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-31 23:02:22 +0200 |
commit | 254fe5e89403d4de1fa6663d09efdf946996aff3 (patch) | |
tree | 62877d7ac7fdedf6c397c51e22ac6f97eba97ddf /gr-analog/python/analog/qa_frequency_modulator.py | |
parent | 896d1c9da31963ecf5b0d90942c2af51ca998a69 (diff) | |
parent | 5ad935c3a3dd46ce2860b13e2b774e4841784616 (diff) |
Merge remote-tracking branch 'origin/next' into merge_next
Diffstat (limited to 'gr-analog/python/analog/qa_frequency_modulator.py')
-rw-r--r--[-rwxr-xr-x] | gr-analog/python/analog/qa_frequency_modulator.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gr-analog/python/analog/qa_frequency_modulator.py b/gr-analog/python/analog/qa_frequency_modulator.py index 0f5c45b11a..29282b0ea6 100755..100644 --- a/gr-analog/python/analog/qa_frequency_modulator.py +++ b/gr-analog/python/analog/qa_frequency_modulator.py @@ -20,6 +20,8 @@ # Boston, MA 02110-1301, USA. # +from __future__ import division + import math from gnuradio import gr, gr_unittest, analog, blocks @@ -38,9 +40,9 @@ class test_frequency_modulator(gr_unittest.TestCase): def test_fm_001(self): pi = math.pi - sensitivity = pi/4 - src_data = (1.0/4, 1.0/2, 1.0/4, -1.0/4, -1.0/2, -1/4.0) - running_sum = (pi/16, 3*pi/16, pi/4, 3*pi/16, pi/16, 0) + sensitivity = pi / 4 + src_data = (1.0 / 4, 1.0 / 2, 1.0 / 4, -1.0 / 4, -1.0 / 2, -1 / 4.0) + running_sum = (pi / 16, 3*pi/16, pi / 4, 3*pi/16, pi / 16, 0) expected_result = tuple([sincos(x) for x in running_sum]) src = blocks.vector_source_f(src_data) op = analog.frequency_modulator_fc(sensitivity) |