def test_symbol_demapper_qpsk(self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 4 segments_B = 11 constellation_size_B = 4 segments_C = 1 constellation_size_C = 4 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) #src_data = (0.5 + 0.5j, 0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j, # 0.8 + 1.0j, -0.5 + 0.1j, 0.5 - 1.2j, -0.2 - 1.0j) * 48 src_syms = [ 1 + 1j, 1 - 1j, -1 - 1j, -1 + 1j, 1 + 1j, -1 + 1j, 1 - 1j, -1 - 1j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data = src_syms_noisy * 48 * 13 # normalización sqrt(2) ? expected_result_A = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_A expected_result_B = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_B expected_result_C = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_C src = blocks.vector_source_c(src_data * 3, False, 384 * 13) dst_A = blocks.vector_sink_b(384 * segments_A) dst_B = blocks.vector_sink_b(384 * segments_B) dst_C = blocks.vector_sink_b(384 * segments_C) self.tb.connect(src, demapper) self.tb.connect((demapper, 0), dst_A) self.tb.connect((demapper, 1), dst_B) self.tb.connect((demapper, 2), dst_C) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() actual_result_C = dst_C.data() #print "actual result", actual_result #print "expected result", expected_result self.assertFloatTuplesAlmostEqual(expected_result_A * 3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B * 3, actual_result_B) self.assertFloatTuplesAlmostEqual(expected_result_C * 3, actual_result_C)
def test_symbol_demapper_qpsk (self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 4 segments_B = 11 constellation_size_B = 4 segments_C = 1 constellation_size_C = 4 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) #src_data = (0.5 + 0.5j, 0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j, # 0.8 + 1.0j, -0.5 + 0.1j, 0.5 - 1.2j, -0.2 - 1.0j) * 48 src_syms = [ 1 + 1j, 1 - 1j, -1 - 1j, -1 + 1j, 1 + 1j, -1 + 1j, 1 - 1j, -1 - 1j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data = src_syms_noisy*48*13 # normalización sqrt(2) ? expected_result_A = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_A expected_result_B = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_B expected_result_C = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_C src = blocks.vector_source_c(src_data*3, False, 384*13) dst_A = blocks.vector_sink_b(384*segments_A) dst_B = blocks.vector_sink_b(384*segments_B) dst_C = blocks.vector_sink_b(384*segments_C) self.tb.connect(src,demapper) self.tb.connect((demapper,0),dst_A) self.tb.connect((demapper,1),dst_B) self.tb.connect((demapper,2),dst_C) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() actual_result_C = dst_C.data() #print "actual result", actual_result #print "expected result", expected_result self.assertFloatTuplesAlmostEqual(expected_result_A*3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B*3, actual_result_B) self.assertFloatTuplesAlmostEqual(expected_result_C*3, actual_result_C)
def test_symbol_demapper_qpsk_64qam(self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 4 segments_B = 12 constellation_size_B = 64 segments_C = 0 constellation_size_C = 64 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) #src_data = (0.5 + 0.5j, 0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j, # 0.8 + 1.0j, -0.5 + 0.1j, 0.5 - 1.2j, -0.2 - 1.0j) * 48 src_syms = [ 1 + 1j, 1 - 1j, -1 - 1j, -1 + 1j, 1 + 1j, -1 + 1j, 1 - 1j, -1 - 1j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data_A = src_syms_noisy * 48 * segments_A expected_result_A = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_A """ src_data = (-7.5 + 7.5j, -5.7 + 7.2j, -3.8 + 6.1j, -0.45 + 6.8j, -7.8 + 5.0j, -4.9 + 4.1j, -2.5 + 4.2j, -0.22 + 5.0j, -7.1 + 3.5j, -4.5 + 2.2j, -2.8 + 2.1j, -1.45 + 3.8j, -6.8 + 1.1j, -5.5 + 0.1j, -2.5 + 1.2j, -1.32 + 1.0j, 7.5 + 7.5j, 5.7 + 7.2j, 3.8 + 6.1j, 0.45 + 6.8j, 7.8 + 5.0j, 4.9 + 4.1j, 2.5 + 4.2j, 0.22 + 5.0j, 7.1 + 3.5j, 4.5 + 2.2j, 2.8 + 2.1j, 1.45 + 3.8j, 6.8 + 1.1j, 5.5 + 0.1j, 2.5 + 1.2j, 1.32 + 1.0j, -7.5 - 7.5j, -5.7 - 7.2j, -3.8 - 6.1j, -0.45 - 6.8j, -7.8 - 5.0j, -4.9 - 4.1j, -2.5 - 4.2j, -0.22 - 5.0j, -7.1 - 3.5j, -4.5 - 2.2j, -2.8 - 2.1j, -1.45 - 3.8j, -6.8 - 1.1j, -5.5 - 0.1j, -2.5 - 1.2j, -1.32 - 1.0j, 7.5 - 7.5j, 5.7 - 7.2j, 3.8 - 6.1j, 0.45 - 6.8j, 7.8 - 5.0j, 4.9 - 4.1j, 2.5 - 4.2j, 0.22 - 5.0j, 7.1 - 3.5j, 4.5 - 2.2j, 2.8 - 2.1j, 1.45 - 3.8j, 6.8 - 1.1j, 5.5 - 0.1j, 2.5 - 1.2j, 1.32 - 1.0j)*6 """ src_syms = ( \ -7 + 7j, -5 + 7j, -3 + 7j, -1 + 7j, -7 + 5j, -5 + 5j, -3 + 5j, -1 + 5j, -7 + 3j, -5 + 3j, -3 + 3j, -1 + 3j, -7 + 1j, -5 + 1j, -3 + 1j, -1 + 1j, +7 + 7j, +5 + 7j, +3 + 7j, +1 + 7j, +7 + 5j, +5 + 5j, +3 + 5j, +1 + 5j, +7 + 3j, +5 + 3j, +3 + 3j, +1 + 3j, +7 + 1j, +5 + 1j, +3 + 1j, +1 + 1j, -7 - 7j, -5 - 7j, -3 - 7j, -1 - 7j, -7 - 5j, -5 - 5j, -3 - 5j, -1 - 5j, -7 - 3j, -5 - 3j, -3 - 3j, -1 - 3j, -7 - 1j, -5 - 1j, -3 - 1j, -1 - 1j, +7 - 7j, +5 - 7j, +3 - 7j, +1 - 7j, +7 - 5j, +5 - 5j, +3 - 5j, +1 - 5j, +7 - 3j, +5 - 3j, +3 - 3j, +1 - 3j, +7 - 1j, +5 - 1j, +3 - 1j, +1 - 1j) src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data_B = src_syms_noisy * 6 * segments_B src_data_B = [x / math.sqrt(42.0) for x in src_data_B] src_data = src_data_A + src_data_B expected_result_B = ( \ 32, 34, 42, 40, 33, 35, 43, 41, 37, 39, 47, 45, 36, 38, 46, 44, 0, 2, 10, 8, 1, 3, 11, 9, 5, 7, 15, 13, 4, 6, 14, 12, 48, 50, 58, 56, 49, 51, 59, 57, 53, 55, 63, 61, 52, 54, 62, 60, 16, 18, 26, 24, 17, 19, 27, 25, 21, 23, 31, 29, 20, 22, 30, 28) * 6*segments_B src = blocks.vector_source_c(src_data * 3, False, 384 * 13) dst_A = blocks.vector_sink_b(384 * segments_A) dst_B = blocks.vector_sink_b(384 * segments_B) self.tb.connect(src, demapper) self.tb.connect((demapper, 0), dst_A) self.tb.connect((demapper, 1), dst_B) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() #print "actual result_A", actual_result_A #print "expected result_A", expected_result_A #print "actual result_B", actual_result_B #print "expected result_B", expected_result_B self.assertFloatTuplesAlmostEqual(expected_result_A * 3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B * 3, actual_result_B)
def test_symbol_demapper_16qam(self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 16 segments_B = 11 constellation_size_B = 16 segments_C = 1 constellation_size_C = 16 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) """src_data = ( \ -3.5 + 2.5j, -0.7 + 3.2j, 1.8 + 3.1j, 3.45 + 2.8j, -3.8 + 1.0j, -0.9 + 0.1j, 0.5 + 1.2j, 2.22 + 1.0j, -3.1 - 0.5j, -0.5 - 1.2j, 0.8 - 0.1j, 2.45 - 0.8j, -2.8 - 3.1j, -1.5 - 2.1j, 1.5 - 2.2j, 3.32 - 3.0j) * 24 """ src_syms = [ -3 + 3j, -1 + 3j, +1 + 3j, +3 + 3j, -3 + 1j, -1 + 1j, +1 + 1j, +3 + 1j, -3 - 1j, -1 - 1j, +1 - 1j, +3 - 1j, -3 - 3j, -1 - 3j, +1 - 3j, +3 - 3j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data = src_syms_noisy * 24 * 13 src_data = [x / math.sqrt(10.0) for x in src_data] expected_result_A = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_A expected_result_B = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_B expected_result_C = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_C src = blocks.vector_source_c(src_data * 3, False, 384 * 13) dst_A = blocks.vector_sink_b(384 * segments_A) dst_B = blocks.vector_sink_b(384 * segments_B) dst_C = blocks.vector_sink_b(384 * segments_C) self.tb.connect(src, demapper) self.tb.connect((demapper, 0), dst_A) self.tb.connect((demapper, 1), dst_B) self.tb.connect((demapper, 2), dst_C) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() actual_result_C = dst_C.data() #print "actual result_A", actual_result_A #print "expected result_A", expected_result_A self.assertFloatTuplesAlmostEqual(expected_result_A * 3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B * 3, actual_result_B) self.assertFloatTuplesAlmostEqual(expected_result_C * 3, actual_result_C)
def __init__(self): gr.top_block.__init__(self, "Receptor_FullSeg") Qt.QWidget.__init__(self) self.setWindowTitle("Receptor_FullSeg") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "fullseg") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.mode = mode = 3 self.total_carriers = total_carriers = 2**(10 + mode) self.samp_usrp = samp_usrp = 7.69231e6 self.samp_rate = samp_rate = 8e6 * 64 / 63 self.inter = inter = 1664 self.guard = guard = 1 / 16.0 self.decim = decim = 1575 self.data_carriers = data_carriers = 13 * 96 * 2**(mode - 1) self.center_freq = center_freq = 575.143e6 self.active_carriers = active_carriers = 13 * 108 * 2**(mode - 1) + 1 self.C = C = 0 self.B = B = 12 self.A = A = 1 ################################################## # Blocks ################################################## self._mode_options = ( 3, 2, 1, ) self._mode_labels = ( '3 (8k)', '2 (4k)', '1 (2k)', ) self._mode_tool_bar = Qt.QToolBar(self) self._mode_tool_bar.addWidget(Qt.QLabel('Mode' + ": ")) self._mode_combo_box = Qt.QComboBox() self._mode_tool_bar.addWidget(self._mode_combo_box) for label in self._mode_labels: self._mode_combo_box.addItem(label) self._mode_callback = lambda i: Qt.QMetaObject.invokeMethod( self._mode_combo_box, "setCurrentIndex", Qt.Q_ARG("int", self._mode_options.index(i))) self._mode_callback(self.mode) self._mode_combo_box.currentIndexChanged.connect( lambda i: self.set_mode(self._mode_options[i])) self.top_layout.addWidget(self._mode_tool_bar) self._guard_options = ( 1 / 4.0, 1 / 8.0, 1 / 16.0, 1 / 32.0, ) self._guard_labels = ( '1/4', '1/8', '1/16', '1/32', ) self._guard_tool_bar = Qt.QToolBar(self) self._guard_tool_bar.addWidget(Qt.QLabel('Guard Interval' + ": ")) self._guard_combo_box = Qt.QComboBox() self._guard_tool_bar.addWidget(self._guard_combo_box) for label in self._guard_labels: self._guard_combo_box.addItem(label) self._guard_callback = lambda i: Qt.QMetaObject.invokeMethod( self._guard_combo_box, "setCurrentIndex", Qt.Q_ARG("int", self._guard_options.index(i))) self._guard_callback(self.guard) self._guard_combo_box.currentIndexChanged.connect( lambda i: self.set_guard(self._guard_options[i])) self.top_layout.addWidget(self._guard_tool_bar) self._center_freq_tool_bar = Qt.QToolBar(self) self._center_freq_tool_bar.addWidget(Qt.QLabel('Frecuency' + ": ")) self._center_freq_line_edit = Qt.QLineEdit(str(self.center_freq)) self._center_freq_tool_bar.addWidget(self._center_freq_line_edit) self._center_freq_line_edit.returnPressed.connect( lambda: self.set_center_freq( eng_notation.str_to_num( str(self._center_freq_line_edit.text().toAscii())))) self.top_layout.addWidget(self._center_freq_tool_bar) self.Tabber = Qt.QTabWidget() self.Tabber_widget_0 = Qt.QWidget() self.Tabber_layout_0 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.Tabber_widget_0) self.Tabber_grid_layout_0 = Qt.QGridLayout() self.Tabber_layout_0.addLayout(self.Tabber_grid_layout_0) self.Tabber.addTab(self.Tabber_widget_0, 'Spectrum') self.Tabber_widget_1 = Qt.QWidget() self.Tabber_layout_1 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.Tabber_widget_1) self.Tabber_grid_layout_1 = Qt.QGridLayout() self.Tabber_layout_1.addLayout(self.Tabber_grid_layout_1) self.Tabber.addTab(self.Tabber_widget_1, 'Constellation') self.Tabber_widget_2 = Qt.QWidget() self.Tabber_layout_2 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.Tabber_widget_2) self.Tabber_grid_layout_2 = Qt.QGridLayout() self.Tabber_layout_2.addLayout(self.Tabber_grid_layout_2) self.Tabber.addTab(self.Tabber_widget_2, 'Van de Beek') self.Tabber_widget_3 = Qt.QWidget() self.Tabber_layout_3 = Qt.QBoxLayout(Qt.QBoxLayout.TopToBottom, self.Tabber_widget_3) self.Tabber_grid_layout_3 = Qt.QGridLayout() self.Tabber_layout_3.addLayout(self.Tabber_grid_layout_3) self.Tabber.addTab(self.Tabber_widget_3, 'Measurements') self.top_grid_layout.addWidget(self.Tabber, 0, 0, 0, 0) self.qtgui_time_sink_x_0 = qtgui.time_sink_f( (int(total_carriers * (1 + guard))), #size samp_rate, #samp_rate 'ML OFDM Synchronization', #name 1 #number of inputs ) self.qtgui_time_sink_x_0.set_update_time(0.10) self.qtgui_time_sink_x_0.set_y_axis(-0.02, 0.0015) self.qtgui_time_sink_x_0.set_y_label('Amplitude', '') self.qtgui_time_sink_x_0.enable_tags(-1, True) self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_0.enable_autoscale(True) self.qtgui_time_sink_x_0.enable_grid(False) self.qtgui_time_sink_x_0.enable_axis_labels(True) self.qtgui_time_sink_x_0.enable_control_panel(False) if not True: self.qtgui_time_sink_x_0.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue" ] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_time_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_0.set_line_label(i, labels[i]) self.qtgui_time_sink_x_0.set_line_width(i, widths[i]) self.qtgui_time_sink_x_0.set_line_color(i, colors[i]) self.qtgui_time_sink_x_0.set_line_style(i, styles[i]) self.qtgui_time_sink_x_0.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_0_win = sip.wrapinstance( self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_2.addWidget(self._qtgui_time_sink_x_0_win, 0, 1, 1, 1) self.qtgui_number_sink_0_1 = qtgui.number_sink(gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0_1.set_update_time(0.10) self.qtgui_number_sink_0_1.set_title("Modulation Error Rate B") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0_1.set_min(i, 0) self.qtgui_number_sink_0_1.set_max(i, 50) self.qtgui_number_sink_0_1.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0_1.set_label(i, "Data {0}".format(i)) else: self.qtgui_number_sink_0_1.set_label(i, labels[i]) self.qtgui_number_sink_0_1.set_unit(i, units[i]) self.qtgui_number_sink_0_1.set_factor(i, factor[i]) self.qtgui_number_sink_0_1.enable_autoscale(False) self._qtgui_number_sink_0_1_win = sip.wrapinstance( self.qtgui_number_sink_0_1.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget(self._qtgui_number_sink_0_1_win, 1, 1, 1, 1) self.qtgui_number_sink_0_0_1_0 = qtgui.number_sink( gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0_0_1_0.set_update_time(0.10) self.qtgui_number_sink_0_0_1_0.set_title("BER Viterbi") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0_0_1_0.set_min(i, 0) self.qtgui_number_sink_0_0_1_0.set_max(i, 1) self.qtgui_number_sink_0_0_1_0.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0_0_1_0.set_label( i, "Data {0}".format(i)) else: self.qtgui_number_sink_0_0_1_0.set_label(i, labels[i]) self.qtgui_number_sink_0_0_1_0.set_unit(i, units[i]) self.qtgui_number_sink_0_0_1_0.set_factor(i, factor[i]) self.qtgui_number_sink_0_0_1_0.enable_autoscale(False) self._qtgui_number_sink_0_0_1_0_win = sip.wrapinstance( self.qtgui_number_sink_0_0_1_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget( self._qtgui_number_sink_0_0_1_0_win, 0, 2, 1, 1) self.qtgui_number_sink_0_0_1 = qtgui.number_sink( gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0_0_1.set_update_time(0.10) self.qtgui_number_sink_0_0_1.set_title("BER Viterbi") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0_0_1.set_min(i, 0) self.qtgui_number_sink_0_0_1.set_max(i, 1) self.qtgui_number_sink_0_0_1.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0_0_1.set_label(i, "Data {0}".format(i)) else: self.qtgui_number_sink_0_0_1.set_label(i, labels[i]) self.qtgui_number_sink_0_0_1.set_unit(i, units[i]) self.qtgui_number_sink_0_0_1.set_factor(i, factor[i]) self.qtgui_number_sink_0_0_1.enable_autoscale(False) self._qtgui_number_sink_0_0_1_win = sip.wrapinstance( self.qtgui_number_sink_0_0_1.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget(self._qtgui_number_sink_0_0_1_win, 1, 2, 1, 1) self.qtgui_number_sink_0_0_0_0_0 = qtgui.number_sink( gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0_0_0_0_0.set_update_time(0.10) self.qtgui_number_sink_0_0_0_0_0.set_title("BER Reed Solomon") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0_0_0_0_0.set_min(i, 0) self.qtgui_number_sink_0_0_0_0_0.set_max(i, 1) self.qtgui_number_sink_0_0_0_0_0.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0_0_0_0_0.set_label( i, "Data {0}".format(i)) else: self.qtgui_number_sink_0_0_0_0_0.set_label(i, labels[i]) self.qtgui_number_sink_0_0_0_0_0.set_unit(i, units[i]) self.qtgui_number_sink_0_0_0_0_0.set_factor(i, factor[i]) self.qtgui_number_sink_0_0_0_0_0.enable_autoscale(False) self._qtgui_number_sink_0_0_0_0_0_win = sip.wrapinstance( self.qtgui_number_sink_0_0_0_0_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget( self._qtgui_number_sink_0_0_0_0_0_win, 0, 3, 1, 1) self.qtgui_number_sink_0_0_0_0 = qtgui.number_sink( gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0_0_0_0.set_update_time(0.10) self.qtgui_number_sink_0_0_0_0.set_title("BER Reed Solomon") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0_0_0_0.set_min(i, 0) self.qtgui_number_sink_0_0_0_0.set_max(i, 1) self.qtgui_number_sink_0_0_0_0.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0_0_0_0.set_label( i, "Data {0}".format(i)) else: self.qtgui_number_sink_0_0_0_0.set_label(i, labels[i]) self.qtgui_number_sink_0_0_0_0.set_unit(i, units[i]) self.qtgui_number_sink_0_0_0_0.set_factor(i, factor[i]) self.qtgui_number_sink_0_0_0_0.enable_autoscale(False) self._qtgui_number_sink_0_0_0_0_win = sip.wrapinstance( self.qtgui_number_sink_0_0_0_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget( self._qtgui_number_sink_0_0_0_0_win, 1, 3, 1, 1) self.qtgui_number_sink_0 = qtgui.number_sink(gr.sizeof_float, 0, qtgui.NUM_GRAPH_VERT, 1) self.qtgui_number_sink_0.set_update_time(0.10) self.qtgui_number_sink_0.set_title("Modulation Error Rate A") labels = ['', '', '', '', '', '', '', '', '', ''] units = ['', '', '', '', '', '', '', '', '', ''] colors = [("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black"), ("black", "black")] factor = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] for i in xrange(1): self.qtgui_number_sink_0.set_min(i, 0) self.qtgui_number_sink_0.set_max(i, 50) self.qtgui_number_sink_0.set_color(i, colors[i][0], colors[i][1]) if len(labels[i]) == 0: self.qtgui_number_sink_0.set_label(i, "Data {0}".format(i)) else: self.qtgui_number_sink_0.set_label(i, labels[i]) self.qtgui_number_sink_0.set_unit(i, units[i]) self.qtgui_number_sink_0.set_factor(i, factor[i]) self.qtgui_number_sink_0.enable_autoscale(False) self._qtgui_number_sink_0_win = sip.wrapinstance( self.qtgui_number_sink_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_3.addWidget(self._qtgui_number_sink_0_win, 0, 1, 1, 1) self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c( 1024, #size firdes.WIN_RECTANGULAR, #wintype center_freq, #fc samp_rate, #bw "Incoming spectrum", #name 1 #number of inputs ) self.qtgui_freq_sink_x_0.set_update_time(0.10) self.qtgui_freq_sink_x_0.set_y_axis(10, -140) self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB') self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "") self.qtgui_freq_sink_x_0.enable_autoscale(True) self.qtgui_freq_sink_x_0.enable_grid(False) self.qtgui_freq_sink_x_0.set_fft_average(0.2) self.qtgui_freq_sink_x_0.enable_axis_labels(True) self.qtgui_freq_sink_x_0.enable_control_panel(False) if not True: self.qtgui_freq_sink_x_0.disable_legend() if "complex" == "float" or "complex" == "msg_float": self.qtgui_freq_sink_x_0.set_plot_pos_half(not True) labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "dark blue" ] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_freq_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_freq_sink_x_0.set_line_label(i, labels[i]) self.qtgui_freq_sink_x_0.set_line_width(i, widths[i]) self.qtgui_freq_sink_x_0.set_line_color(i, colors[i]) self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_freq_sink_x_0_win = sip.wrapinstance( self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_0.addWidget(self._qtgui_freq_sink_x_0_win, 0, 0, 1, 1) self.qtgui_const_sink_x_0_1_0 = qtgui.const_sink_c( 0 * 96 * 2**(mode - 1), #size 'Constellation', #name 1 #number of inputs ) self.qtgui_const_sink_x_0_1_0.set_update_time(0.10) self.qtgui_const_sink_x_0_1_0.set_y_axis(-2, 2) self.qtgui_const_sink_x_0_1_0.set_x_axis(-2, 2) self.qtgui_const_sink_x_0_1_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0_1_0.enable_autoscale(False) self.qtgui_const_sink_x_0_1_0.enable_grid(False) self.qtgui_const_sink_x_0_1_0.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0_1_0.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0_1_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0_1_0.set_line_label(i, labels[i]) self.qtgui_const_sink_x_0_1_0.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0_1_0.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0_1_0.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0_1_0.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0_1_0.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_1_0_win = sip.wrapinstance( self.qtgui_const_sink_x_0_1_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_1.addWidget(self._qtgui_const_sink_x_0_1_0_win, 2, 0, 2, 2) self.qtgui_const_sink_x_0_1 = qtgui.const_sink_c( 12 * 96 * 2**(mode - 1), #size 'Constellation_Layer_B', #name 1 #number of inputs ) self.qtgui_const_sink_x_0_1.set_update_time(0.10) self.qtgui_const_sink_x_0_1.set_y_axis(-2, 2) self.qtgui_const_sink_x_0_1.set_x_axis(-2, 2) self.qtgui_const_sink_x_0_1.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0_1.enable_autoscale(False) self.qtgui_const_sink_x_0_1.enable_grid(False) self.qtgui_const_sink_x_0_1.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0_1.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0_1.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0_1.set_line_label(i, labels[i]) self.qtgui_const_sink_x_0_1.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0_1.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0_1.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0_1.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0_1.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_1_win = sip.wrapinstance( self.qtgui_const_sink_x_0_1.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_1.addWidget(self._qtgui_const_sink_x_0_1_win, 0, 2, 1, 1) self.qtgui_const_sink_x_0_0 = qtgui.const_sink_c( data_carriers, #size 'Constellation_Layer_All', #name 1 #number of inputs ) self.qtgui_const_sink_x_0_0.set_update_time(0.10) self.qtgui_const_sink_x_0_0.set_y_axis(-2, 2) self.qtgui_const_sink_x_0_0.set_x_axis(-2, 2) self.qtgui_const_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0_0.enable_autoscale(False) self.qtgui_const_sink_x_0_0.enable_grid(False) self.qtgui_const_sink_x_0_0.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0_0.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0_0.set_line_label(i, labels[i]) self.qtgui_const_sink_x_0_0.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0_0.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0_0.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0_0.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0_0.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_0_win = sip.wrapinstance( self.qtgui_const_sink_x_0_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_1.addWidget(self._qtgui_const_sink_x_0_0_win, 2, 2, 1, 1) self.qtgui_const_sink_x_0 = qtgui.const_sink_c( 1 * 96 * 2**(mode - 1), #size 'Constellation_Layer_A', #name 1 #number of inputs ) self.qtgui_const_sink_x_0.set_update_time(0.10) self.qtgui_const_sink_x_0.set_y_axis(-2, 2) self.qtgui_const_sink_x_0.set_x_axis(-2, 2) self.qtgui_const_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0.enable_autoscale(False) self.qtgui_const_sink_x_0.enable_grid(False) self.qtgui_const_sink_x_0.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0.set_line_label(i, labels[i]) self.qtgui_const_sink_x_0.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_win = sip.wrapinstance( self.qtgui_const_sink_x_0.pyqwidget(), Qt.QWidget) self.Tabber_grid_layout_1.addWidget(self._qtgui_const_sink_x_0_win, 0, 0, 1, 1) self.low_pass_filter_0_0 = filter.fir_filter_ccf( 1, firdes.low_pass(1, samp_rate, 6e6 / 2.0, 0.5e6, firdes.WIN_HAMMING, 6.76)) self.isdbt_tmcc_decoder_0 = isdbt.tmcc_decoder(3, True) self.isdbt_time_deinterleaver_0 = isdbt.time_deinterleaver( 3, 1, 4, 12, 2, 0, 0) self.isdbt_sync_and_channel_estimation_0 = isdbt.sync_and_channel_estimation( 8192, 5617, 200) self.isdbt_symbol_demapper_0 = isdbt.symbol_demapper( 3, 1, 4, 12, 64, 0, 64) self.isdbt_subset_of_carriers_0_0_0 = isdbt.subset_of_carriers( data_carriers, 0, 0) self.isdbt_subset_of_carriers_0_0 = isdbt.subset_of_carriers( data_carriers, 0, A * 96 * 2**(mode - 1) - 1) self.isdbt_subset_of_carriers_0 = isdbt.subset_of_carriers( data_carriers, 384, 4991) self.isdbt_ofdm_sym_acquisition_0 = isdbt.ofdm_sym_acquisition( total_carriers, int(guard * total_carriers), 10) self.isdbt_frequency_deinterleaver_0 = isdbt.frequency_deinterleaver( True, 3) self.isdbt_channel_decoding_0_0 = isdbt.isdbt_channel_decoding( layer_segments=1, mode=3, constellation_size=4, rate=1, ) self.isdbt_channel_decoding_0 = isdbt.isdbt_channel_decoding( layer_segments=12, mode=3, constellation_size=64, rate=2, ) self.fft_vxx_0 = fft.fft_vcc(total_carriers, True, (window.rectangular(total_carriers)), True, 1) self.blocks_vector_to_stream_0_2_1_0 = blocks.vector_to_stream( gr.sizeof_gr_complex * 1, C * 96 * 2**(mode - 1) + 1) self.blocks_vector_to_stream_0_2_1 = blocks.vector_to_stream( gr.sizeof_gr_complex * 1, 4608) self.blocks_vector_to_stream_0_2_0 = blocks.vector_to_stream( gr.sizeof_gr_complex * 1, data_carriers) self.blocks_vector_to_stream_0_2 = blocks.vector_to_stream( gr.sizeof_gr_complex * 1, A * 96 * 2**(mode - 1)) self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex * 1, samp_rate, True) self.blocks_stream_to_vector_0_0_0 = blocks.stream_to_vector( gr.sizeof_char * 1, 188) self.blocks_stream_to_vector_0_0 = blocks.stream_to_vector( gr.sizeof_char * 1, 188) self.blocks_null_sink_0_0_0_0 = blocks.null_sink(gr.sizeof_char * 188) self.blocks_null_sink_0_0_0 = blocks.null_sink(gr.sizeof_char * 188) self.blocks_null_sink_0 = blocks.null_sink(gr.sizeof_char * 384) self.blocks_file_source_1_0 = blocks.file_source( gr.sizeof_gr_complex * 1, '/home/jordy/Descargas/569MHz_recording/569MHz_recording.dat', True) self.SYNC_0 = SYNC( guarda=guard, mode=mode, ) self.MER_FULL_SEG_0 = MER_FULL_SEG( Modulation_Scheme_A=(1 + 1j, 1 - 1j, -1 + 1j, -1 - 1j) / np.sqrt(2), Modulation_Scheme_B=( 7 + 7j, 7 + 5j, 5 + 7j, 5 + 5j, 7 + 1j, 7 + 3j, 5 + 1j, 5 + 3j, 1 + 7j, 1 + 5j, 3 + 7j, 3 + 5j, 1 + 1j, 1 + 3j, 3 + 1j, 3 + 3j, 7 - 7j, 7 - 5j, 5 - 7j, 5 - 5j, 7 - 1j, 7 - 3j, 5 - 1j, 5 - 3j, 1 - 7j, 1 - 5j, 3 - 7j, 3 - 5j, 1 - 1j, 1 - 3j, 3 - 1j, 3 - 3j, -7 + 7j, -7 + 5j, -5 + 7j, -5 + 5j, -7 + 1j, -7 + 3j, -5 + 1j, -5 + 3j, -1 + 7j, -1 + 5j, -3 + 7j, -3 + 5j, -1 + 1j, -1 + 3j, -3 + 1j, -3 + 3j, -7 - 7j, -7 - 5j, -5 - 7j, -5 - 5j, -7 - 1j, -7 - 3j, -5 - 1j, -5 - 3j, -1 - 7j, -1 - 5j, -3 - 7j, -3 - 5j, -1 - 1j, -1 - 3j, -3 - 1j, -3 - 3j) / np.sqrt(42), Modulation_Scheme_C=(3 + 3j, 3 + 1j, 1 + 3j, 1 + 1j, 3 - 3j, 3 - 1j, 1 - 3j, 1 - 1j, -3 + 3j, -3 + 1j, -1 + 3j, -1 + 1j, -3 - 3j, -3 - 1j, -1 - 3j, -1 - 1j) / np.sqrt(10), alpha=0.05, ) ################################################## # Connections ################################################## self.connect((self.MER_FULL_SEG_0, 0), (self.qtgui_number_sink_0, 0)) self.connect((self.MER_FULL_SEG_0, 1), (self.qtgui_number_sink_0_1, 0)) self.connect((self.SYNC_0, 0), (self.qtgui_time_sink_x_0, 0)) self.connect((self.blocks_file_source_1_0, 0), (self.blocks_throttle_0, 0)) self.connect((self.blocks_stream_to_vector_0_0, 0), (self.blocks_null_sink_0_0_0, 0)) self.connect((self.blocks_stream_to_vector_0_0_0, 0), (self.blocks_null_sink_0_0_0_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.low_pass_filter_0_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.qtgui_freq_sink_x_0, 0)) self.connect((self.blocks_vector_to_stream_0_2, 0), (self.MER_FULL_SEG_0, 0)) self.connect((self.blocks_vector_to_stream_0_2, 0), (self.qtgui_const_sink_x_0, 0)) self.connect((self.blocks_vector_to_stream_0_2_0, 0), (self.qtgui_const_sink_x_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_2_1, 0), (self.MER_FULL_SEG_0, 1)) self.connect((self.blocks_vector_to_stream_0_2_1, 0), (self.qtgui_const_sink_x_0_1, 0)) self.connect((self.blocks_vector_to_stream_0_2_1_0, 0), (self.MER_FULL_SEG_0, 2)) self.connect((self.blocks_vector_to_stream_0_2_1_0, 0), (self.qtgui_const_sink_x_0_1_0, 0)) self.connect((self.fft_vxx_0, 0), (self.isdbt_sync_and_channel_estimation_0, 0)) self.connect((self.isdbt_channel_decoding_0, 0), (self.blocks_stream_to_vector_0_0, 0)) self.connect((self.isdbt_channel_decoding_0, 1), (self.qtgui_number_sink_0_0_0_0, 0)) self.connect((self.isdbt_channel_decoding_0, 2), (self.qtgui_number_sink_0_0_1, 0)) self.connect((self.isdbt_channel_decoding_0_0, 0), (self.blocks_stream_to_vector_0_0_0, 0)) self.connect((self.isdbt_channel_decoding_0_0, 1), (self.qtgui_number_sink_0_0_0_0_0, 0)) self.connect((self.isdbt_channel_decoding_0_0, 2), (self.qtgui_number_sink_0_0_1_0, 0)) self.connect((self.isdbt_frequency_deinterleaver_0, 0), (self.isdbt_time_deinterleaver_0, 0)) self.connect((self.isdbt_ofdm_sym_acquisition_0, 0), (self.fft_vxx_0, 0)) self.connect((self.isdbt_subset_of_carriers_0, 0), (self.blocks_vector_to_stream_0_2_1, 0)) self.connect((self.isdbt_subset_of_carriers_0_0, 0), (self.blocks_vector_to_stream_0_2, 0)) self.connect((self.isdbt_subset_of_carriers_0_0_0, 0), (self.blocks_vector_to_stream_0_2_1_0, 0)) self.connect((self.isdbt_symbol_demapper_0, 0), (self.blocks_null_sink_0, 0)) self.connect((self.isdbt_symbol_demapper_0, 1), (self.isdbt_channel_decoding_0, 0)) self.connect((self.isdbt_symbol_demapper_0, 0), (self.isdbt_channel_decoding_0_0, 0)) self.connect((self.isdbt_sync_and_channel_estimation_0, 0), (self.isdbt_tmcc_decoder_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.blocks_vector_to_stream_0_2_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.isdbt_subset_of_carriers_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.isdbt_subset_of_carriers_0_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.isdbt_subset_of_carriers_0_0_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.isdbt_symbol_demapper_0, 0)) self.connect((self.isdbt_tmcc_decoder_0, 0), (self.isdbt_frequency_deinterleaver_0, 0)) self.connect((self.low_pass_filter_0_0, 0), (self.SYNC_0, 0)) self.connect((self.low_pass_filter_0_0, 0), (self.isdbt_ofdm_sym_acquisition_0, 0))
def test_symbol_demapper_qpsk_64qam (self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 4 segments_B = 12 constellation_size_B = 64 segments_C = 0 constellation_size_C = 64 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) #src_data = (0.5 + 0.5j, 0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j, # 0.8 + 1.0j, -0.5 + 0.1j, 0.5 - 1.2j, -0.2 - 1.0j) * 48 src_syms = [ 1 + 1j, 1 - 1j, -1 - 1j, -1 + 1j, 1 + 1j, -1 + 1j, 1 - 1j, -1 - 1j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data_A = src_syms_noisy * 48*segments_A expected_result_A = \ ( 0, 1, 3, 2, 0, 2, 1, 3) * 48*segments_A """ src_data = (-7.5 + 7.5j, -5.7 + 7.2j, -3.8 + 6.1j, -0.45 + 6.8j, -7.8 + 5.0j, -4.9 + 4.1j, -2.5 + 4.2j, -0.22 + 5.0j, -7.1 + 3.5j, -4.5 + 2.2j, -2.8 + 2.1j, -1.45 + 3.8j, -6.8 + 1.1j, -5.5 + 0.1j, -2.5 + 1.2j, -1.32 + 1.0j, 7.5 + 7.5j, 5.7 + 7.2j, 3.8 + 6.1j, 0.45 + 6.8j, 7.8 + 5.0j, 4.9 + 4.1j, 2.5 + 4.2j, 0.22 + 5.0j, 7.1 + 3.5j, 4.5 + 2.2j, 2.8 + 2.1j, 1.45 + 3.8j, 6.8 + 1.1j, 5.5 + 0.1j, 2.5 + 1.2j, 1.32 + 1.0j, -7.5 - 7.5j, -5.7 - 7.2j, -3.8 - 6.1j, -0.45 - 6.8j, -7.8 - 5.0j, -4.9 - 4.1j, -2.5 - 4.2j, -0.22 - 5.0j, -7.1 - 3.5j, -4.5 - 2.2j, -2.8 - 2.1j, -1.45 - 3.8j, -6.8 - 1.1j, -5.5 - 0.1j, -2.5 - 1.2j, -1.32 - 1.0j, 7.5 - 7.5j, 5.7 - 7.2j, 3.8 - 6.1j, 0.45 - 6.8j, 7.8 - 5.0j, 4.9 - 4.1j, 2.5 - 4.2j, 0.22 - 5.0j, 7.1 - 3.5j, 4.5 - 2.2j, 2.8 - 2.1j, 1.45 - 3.8j, 6.8 - 1.1j, 5.5 - 0.1j, 2.5 - 1.2j, 1.32 - 1.0j)*6 """ src_syms = ( \ -7 + 7j, -5 + 7j, -3 + 7j, -1 + 7j, -7 + 5j, -5 + 5j, -3 + 5j, -1 + 5j, -7 + 3j, -5 + 3j, -3 + 3j, -1 + 3j, -7 + 1j, -5 + 1j, -3 + 1j, -1 + 1j, +7 + 7j, +5 + 7j, +3 + 7j, +1 + 7j, +7 + 5j, +5 + 5j, +3 + 5j, +1 + 5j, +7 + 3j, +5 + 3j, +3 + 3j, +1 + 3j, +7 + 1j, +5 + 1j, +3 + 1j, +1 + 1j, -7 - 7j, -5 - 7j, -3 - 7j, -1 - 7j, -7 - 5j, -5 - 5j, -3 - 5j, -1 - 5j, -7 - 3j, -5 - 3j, -3 - 3j, -1 - 3j, -7 - 1j, -5 - 1j, -3 - 1j, -1 - 1j, +7 - 7j, +5 - 7j, +3 - 7j, +1 - 7j, +7 - 5j, +5 - 5j, +3 - 5j, +1 - 5j, +7 - 3j, +5 - 3j, +3 - 3j, +1 - 3j, +7 - 1j, +5 - 1j, +3 - 1j, +1 - 1j) src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data_B = src_syms_noisy*6*segments_B src_data_B = [x / math.sqrt(42.0) for x in src_data_B] src_data = src_data_A + src_data_B expected_result_B = ( \ 32, 34, 42, 40, 33, 35, 43, 41, 37, 39, 47, 45, 36, 38, 46, 44, 0, 2, 10, 8, 1, 3, 11, 9, 5, 7, 15, 13, 4, 6, 14, 12, 48, 50, 58, 56, 49, 51, 59, 57, 53, 55, 63, 61, 52, 54, 62, 60, 16, 18, 26, 24, 17, 19, 27, 25, 21, 23, 31, 29, 20, 22, 30, 28) * 6*segments_B src = blocks.vector_source_c(src_data*3, False, 384*13) dst_A = blocks.vector_sink_b(384*segments_A) dst_B = blocks.vector_sink_b(384*segments_B) self.tb.connect(src,demapper) self.tb.connect((demapper,0),dst_A) self.tb.connect((demapper,1),dst_B) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() #print "actual result_A", actual_result_A #print "expected result_A", expected_result_A #print "actual result_B", actual_result_B #print "expected result_B", expected_result_B self.assertFloatTuplesAlmostEqual(expected_result_A*3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B*3, actual_result_B)
def test_symbol_demapper_16qam (self): # set up fg mode = 3 segments_A = 1 constellation_size_A = 16 segments_B = 11 constellation_size_B = 16 segments_C = 1 constellation_size_C = 16 demapper = isdbt.symbol_demapper(mode, segments_A, constellation_size_A, segments_B, constellation_size_B, segments_C, constellation_size_C) """src_data = ( \ -3.5 + 2.5j, -0.7 + 3.2j, 1.8 + 3.1j, 3.45 + 2.8j, -3.8 + 1.0j, -0.9 + 0.1j, 0.5 + 1.2j, 2.22 + 1.0j, -3.1 - 0.5j, -0.5 - 1.2j, 0.8 - 0.1j, 2.45 - 0.8j, -2.8 - 3.1j, -1.5 - 2.1j, 1.5 - 2.2j, 3.32 - 3.0j) * 24 """ src_syms = [ -3+3j, -1+3j, +1+3j, +3+3j, -3+1j, -1+1j, +1+1j, +3+1j, -3-1j, -1-1j, +1-1j, +3-1j, -3-3j, -1-3j, +1-3j, +3-3j ] src_syms_noisy = [self.add_noise(z) for z in src_syms] src_data = src_syms_noisy*24*13 src_data = [x / math.sqrt(10.0) for x in src_data] expected_result_A = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_A expected_result_B = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_B expected_result_C = ( \ 8, 10, 2, 0, 9, 11, 3, 1, 13, 15, 7, 5, 12, 14, 6, 4) * 24*segments_C src = blocks.vector_source_c(src_data*3, False, 384*13) dst_A = blocks.vector_sink_b(384*segments_A) dst_B = blocks.vector_sink_b(384*segments_B) dst_C = blocks.vector_sink_b(384*segments_C) self.tb.connect(src,demapper) self.tb.connect((demapper,0),dst_A) self.tb.connect((demapper,1),dst_B) self.tb.connect((demapper,2),dst_C) self.tb.run() # check data actual_result_A = dst_A.data() actual_result_B = dst_B.data() actual_result_C = dst_C.data() #print "actual result_A", actual_result_A #print "expected result_A", expected_result_A self.assertFloatTuplesAlmostEqual(expected_result_A*3, actual_result_A) self.assertFloatTuplesAlmostEqual(expected_result_B*3, actual_result_B) self.assertFloatTuplesAlmostEqual(expected_result_C*3, actual_result_C)
def __init__(self, fft_size=4096): gr.top_block.__init__(self, "Top Block") Qt.QWidget.__init__(self) self.setWindowTitle("Top Block") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "top_block") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Parameters ################################################## self.fft_size = fft_size ################################################## # Variables ################################################## self.mode = mode = 2 self.freq = freq = 551e6 ################################################## # Blocks ################################################## self.qtgui_const_sink_x_0_1_0_0_0_1 = qtgui.const_sink_c( 4096, #size "Time Denint OUT", #name 1 #number of inputs ) self.qtgui_const_sink_x_0_1_0_0_0_1.set_update_time(0.1) self.qtgui_const_sink_x_0_1_0_0_0_1.set_y_axis(-2, 2) self.qtgui_const_sink_x_0_1_0_0_0_1.set_x_axis(-2, 2) self.qtgui_const_sink_x_0_1_0_0_0_1.set_trigger_mode( qtgui.TRIG_MODE_FREE, qtgui.TRIG_SLOPE_POS, 0.0, 0, "") self.qtgui_const_sink_x_0_1_0_0_0_1.enable_autoscale(False) self.qtgui_const_sink_x_0_1_0_0_0_1.enable_grid(True) self.qtgui_const_sink_x_0_1_0_0_0_1.enable_axis_labels(True) if not True: self.qtgui_const_sink_x_0_1_0_0_0_1.disable_legend() labels = ['', '', '', '', '', '', '', '', '', ''] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "red", "red", "red", "red", "red", "red", "red", "red" ] styles = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] markers = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(1): if len(labels[i]) == 0: self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_label( i, labels[i]) self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_width(i, widths[i]) self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_color(i, colors[i]) self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_style(i, styles[i]) self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_marker(i, markers[i]) self.qtgui_const_sink_x_0_1_0_0_0_1.set_line_alpha(i, alphas[i]) self._qtgui_const_sink_x_0_1_0_0_0_1_win = sip.wrapinstance( self.qtgui_const_sink_x_0_1_0_0_0_1.pyqwidget(), Qt.QWidget) self.top_layout.addWidget(self._qtgui_const_sink_x_0_1_0_0_0_1_win) self.isdbt_viterbi_decoder_0_1 = isdbt.viterbi_decoder(64, 0) self.isdbt_viterbi_decoder_0_0 = isdbt.viterbi_decoder(64, 0) self.isdbt_viterbi_decoder_0 = isdbt.viterbi_decoder(64, 0) self.isdbt_tsp_resize_0_0_0 = isdbt.tsp_resize() self.isdbt_tsp_resize_0_0 = isdbt.tsp_resize() self.isdbt_tsp_resize_0 = isdbt.tsp_resize() self.isdbt_tmcc_decoder_0 = isdbt.tmcc_decoder(2, False) self.isdbt_time_interleaver_0 = isdbt.time_interleaver(2, 8, True) self.isdbt_time_deinterleaver_0 = isdbt.time_deinterleaver( 2, 1, 8, 6, 8, 6, 8) self.isdbt_symbol_demapper_0 = isdbt.symbol_demapper( 2, 1, 64, 6, 64, 6, 64) self.isdbt_reed_solomon_dec_isdbt_0_1 = isdbt.reed_solomon_dec_isdbt() self.isdbt_reed_solomon_dec_isdbt_0_0 = isdbt.reed_solomon_dec_isdbt() self.isdbt_reed_solomon_dec_isdbt_0 = isdbt.reed_solomon_dec_isdbt() self.isdbt_ofdm_synchronization_0 = isdbt.ofdm_synchronization( 2, 0.125, False) self.isdbt_ofdm_frame_structure_0 = isdbt.ofdm_frame_structure( 2, True, 3, 3, 3, 0, 0, 0, 8, 8, 8, 1, 6, 6) self.isdbt_mapper_0_0_0 = isdbt.mapper(2, 6, 6) self.isdbt_mapper_0_0 = isdbt.mapper(2, 6, 6) self.isdbt_mapper_0 = isdbt.mapper(2, 6, 1) self.isdbt_hierarchical_divisor_0 = isdbt.hierarchical_divisor() self.isdbt_hierarchical_combination_0 = isdbt.hierarchical_combination( 2, 1, 6, 6) self.isdbt_frequency_deinterleaver_0 = isdbt.frequency_deinterleaver( False, 2) self.isdbt_frec_interleaver_0 = isdbt.frec_interleaver(2, True) self.isdbt_energy_dispersal_0_0_0 = isdbt.energy_dispersal() self.isdbt_energy_dispersal_0_0 = isdbt.energy_dispersal() self.isdbt_energy_dispersal_0 = isdbt.energy_dispersal() self.isdbt_energy_descrambler_0_1 = isdbt.energy_descrambler() self.isdbt_energy_descrambler_0_0 = isdbt.energy_descrambler() self.isdbt_energy_descrambler_0 = isdbt.energy_descrambler() self.isdbt_byte_interleaver_0_0_0 = isdbt.byte_interleaver(2, 0, 6, 6) self.isdbt_byte_interleaver_0_0 = isdbt.byte_interleaver(2, 0, 6, 6) self.isdbt_byte_interleaver_0 = isdbt.byte_interleaver(2, 0, 6, 1) self.isdbt_byte_deinterleaver_0_1 = isdbt.byte_deinterleaver() self.isdbt_byte_deinterleaver_0_0 = isdbt.byte_deinterleaver() self.isdbt_byte_deinterleaver_0 = isdbt.byte_deinterleaver() self.isdbt_bit_deinterleaver_0_1 = isdbt.bit_deinterleaver(2, 6, 64) self.isdbt_bit_deinterleaver_0_0 = isdbt.bit_deinterleaver(2, 6, 64) self.isdbt_bit_deinterleaver_0 = isdbt.bit_deinterleaver(2, 1, 64) self.fft_vxx_0 = fft.fft_vcc(fft_size, False, (window.blackmanharris(fft_size)), True, 1) self.dtv_dvbt_reed_solomon_enc_0_0_0 = dtv.dvbt_reed_solomon_enc( 2, 8, 0x11d, 255, 239, 8, 51, 1) self.dtv_dvbt_reed_solomon_enc_0_0 = dtv.dvbt_reed_solomon_enc( 2, 8, 0x11d, 255, 239, 8, 51, 1) self.dtv_dvbt_reed_solomon_enc_0 = dtv.dvbt_reed_solomon_enc( 2, 8, 0x11d, 255, 239, 8, 51, 1) self.dtv_dvbt_inner_coder_0_0_0 = dtv.dvbt_inner_coder( 1, 1512, dtv.MOD_64QAM, dtv.ALPHA2, dtv.C1_2) self.dtv_dvbt_inner_coder_0_0 = dtv.dvbt_inner_coder( 1, 1512, dtv.MOD_64QAM, dtv.ALPHA2, dtv.C1_2) self.dtv_dvbt_inner_coder_0 = dtv.dvbt_inner_coder( 1, 1512, dtv.MOD_64QAM, dtv.ALPHA2, dtv.C1_2) self.digital_ofdm_cyclic_prefixer_0 = digital.ofdm_cyclic_prefixer( 4096, 4096 + 512, 0, "") self.blocks_vector_to_stream_1_2_0_0_0_0_0 = blocks.vector_to_stream( gr.sizeof_gr_complex * 1, 192 * 13) self.blocks_vector_to_stream_0_1_0_1_1 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_vector_to_stream_0_1_0_1_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_vector_to_stream_0_1_0_1 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_vector_to_stream_0_1_0_0 = blocks.vector_to_stream( gr.sizeof_char * 204, 756) self.blocks_vector_to_stream_0_1_0 = blocks.vector_to_stream( gr.sizeof_char * 204, 756) self.blocks_vector_to_stream_0_1 = blocks.vector_to_stream( gr.sizeof_char * 204, 126) self.blocks_vector_to_stream_0_0_1_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_vector_to_stream_0_0_1 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_vector_to_stream_0_0_0_0_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 1512) self.blocks_vector_to_stream_0_0_0_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 1512) self.blocks_vector_to_stream_0_0_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 1512) self.blocks_vector_to_stream_0_0 = blocks.vector_to_stream( gr.sizeof_char * 1, 204) self.blocks_unpacked_to_packed_xx_0_1 = blocks.unpacked_to_packed_bb( 6, gr.GR_LSB_FIRST) self.blocks_unpacked_to_packed_xx_0_0 = blocks.unpacked_to_packed_bb( 6, gr.GR_LSB_FIRST) self.blocks_unpacked_to_packed_xx_0 = blocks.unpacked_to_packed_bb( 6, gr.GR_LSB_FIRST) self.blocks_throttle_0_0 = blocks.throttle(gr.sizeof_gr_complex * 1, 512 / 63e-6, True) self.blocks_tag_debug_0 = blocks.tag_debug(gr.sizeof_char * 204, 'LayA', "frame_begin") self.blocks_tag_debug_0.set_display(True) self.blocks_stream_to_vector_0_1 = blocks.stream_to_vector( gr.sizeof_gr_complex * 1, 192 * 6) self.blocks_stream_to_vector_0_0 = blocks.stream_to_vector( gr.sizeof_gr_complex * 1, 192 * 6) self.blocks_stream_to_vector_0 = blocks.stream_to_vector( gr.sizeof_gr_complex * 1, 192 * 1) self.blocks_packed_to_unpacked_xx_0_0_0 = blocks.packed_to_unpacked_bb( 6, gr.GR_LSB_FIRST) self.blocks_packed_to_unpacked_xx_0_0 = blocks.packed_to_unpacked_bb( 6, gr.GR_LSB_FIRST) self.blocks_packed_to_unpacked_xx_0 = blocks.packed_to_unpacked_bb( 6, gr.GR_LSB_FIRST) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vcc((0.01, )) self.blocks_file_source_0 = blocks.file_source( gr.sizeof_char * 204 * 2304, '/home/habbo/Documents/BTS_Validos/BTS_ISDB_T_3_CAPAS.ts', False) self.blocks_file_sink_0_1 = blocks.file_sink( gr.sizeof_char * 188, '/home/habbo/Documents/PruebasISDBT/Salidas/Layer_C.ts', False) self.blocks_file_sink_0_1.set_unbuffered(False) self.blocks_file_sink_0_0_0_2 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__VDin_layA.ts', False) self.blocks_file_sink_0_0_0_2.set_unbuffered(False) self.blocks_file_sink_0_0_0_1_0 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__VDin_layC.ts', False) self.blocks_file_sink_0_0_0_1_0.set_unbuffered(False) self.blocks_file_sink_0_0_0_1 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__RSin_layC.ts', False) self.blocks_file_sink_0_0_0_1.set_unbuffered(False) self.blocks_file_sink_0_0_0_0_0 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__VDin_layB.ts', False) self.blocks_file_sink_0_0_0_0_0.set_unbuffered(False) self.blocks_file_sink_0_0_0_0 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__RSin_layB.ts', False) self.blocks_file_sink_0_0_0_0.set_unbuffered(False) self.blocks_file_sink_0_0_0 = blocks.file_sink( gr.sizeof_char * 1, '/home/habbo/Documents/PruebasISDBT/Salidas/fs__RSin_layA.ts', False) self.blocks_file_sink_0_0_0.set_unbuffered(False) self.blocks_file_sink_0_0 = blocks.file_sink( gr.sizeof_char * 188, '/home/habbo/Documents/PruebasISDBT/Salidas/Layer_B.ts', False) self.blocks_file_sink_0_0.set_unbuffered(False) self.blocks_file_sink_0 = blocks.file_sink( gr.sizeof_char * 188, '/home/habbo/Documents/PruebasISDBT/Salidas/Layer_A.ts', False) self.blocks_file_sink_0.set_unbuffered(False) ################################################## # Connections ################################################## self.connect((self.blocks_file_source_0, 0), (self.isdbt_hierarchical_divisor_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_throttle_0_0, 0)) self.connect((self.blocks_packed_to_unpacked_xx_0, 0), (self.isdbt_mapper_0, 0)) self.connect((self.blocks_packed_to_unpacked_xx_0_0, 0), (self.isdbt_mapper_0_0, 0)) self.connect((self.blocks_packed_to_unpacked_xx_0_0_0, 0), (self.isdbt_mapper_0_0_0, 0)) self.connect((self.blocks_stream_to_vector_0, 0), (self.isdbt_hierarchical_combination_0, 0)) self.connect((self.blocks_stream_to_vector_0_0, 0), (self.isdbt_hierarchical_combination_0, 1)) self.connect((self.blocks_stream_to_vector_0_1, 0), (self.isdbt_hierarchical_combination_0, 2)) self.connect((self.blocks_throttle_0_0, 0), (self.isdbt_ofdm_synchronization_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0, 0), (self.blocks_file_sink_0_0_0_2, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0, 0), (self.isdbt_viterbi_decoder_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0_0, 0), (self.blocks_file_sink_0_0_0_0_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0_0, 0), (self.isdbt_viterbi_decoder_0_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0_1, 0), (self.blocks_file_sink_0_0_0_1_0, 0)) self.connect((self.blocks_unpacked_to_packed_xx_0_1, 0), (self.isdbt_viterbi_decoder_0_1, 0)) self.connect((self.blocks_vector_to_stream_0_0, 0), (self.dtv_dvbt_inner_coder_0, 0)) self.connect((self.blocks_vector_to_stream_0_0_0, 0), (self.blocks_packed_to_unpacked_xx_0, 0)) self.connect((self.blocks_vector_to_stream_0_0_0_0, 0), (self.blocks_packed_to_unpacked_xx_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_0_0_0_0, 0), (self.blocks_packed_to_unpacked_xx_0_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_0_1, 0), (self.dtv_dvbt_inner_coder_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_0_1_0, 0), (self.dtv_dvbt_inner_coder_0_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_1, 0), (self.isdbt_tsp_resize_0, 0)) self.connect((self.blocks_vector_to_stream_0_1_0, 0), (self.isdbt_tsp_resize_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_1_0_0, 0), (self.isdbt_tsp_resize_0_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_1_0_1, 0), (self.blocks_file_sink_0_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_1_0_1_0, 0), (self.blocks_file_sink_0_0_0_0, 0)) self.connect((self.blocks_vector_to_stream_0_1_0_1_1, 0), (self.blocks_file_sink_0_0_0_1, 0)) self.connect((self.blocks_vector_to_stream_1_2_0_0_0_0_0, 0), (self.qtgui_const_sink_x_0_1_0_0_0_1, 0)) self.connect((self.digital_ofdm_cyclic_prefixer_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.dtv_dvbt_inner_coder_0, 0), (self.blocks_vector_to_stream_0_0_0, 0)) self.connect((self.dtv_dvbt_inner_coder_0_0, 0), (self.blocks_vector_to_stream_0_0_0_0, 0)) self.connect((self.dtv_dvbt_inner_coder_0_0_0, 0), (self.blocks_vector_to_stream_0_0_0_0_0, 0)) self.connect((self.dtv_dvbt_reed_solomon_enc_0, 0), (self.isdbt_energy_dispersal_0, 0)) self.connect((self.dtv_dvbt_reed_solomon_enc_0_0, 0), (self.isdbt_energy_dispersal_0_0, 0)) self.connect((self.dtv_dvbt_reed_solomon_enc_0_0_0, 0), (self.isdbt_energy_dispersal_0_0_0, 0)) self.connect((self.fft_vxx_0, 0), (self.digital_ofdm_cyclic_prefixer_0, 0)) self.connect((self.isdbt_bit_deinterleaver_0, 0), (self.blocks_unpacked_to_packed_xx_0, 0)) self.connect((self.isdbt_bit_deinterleaver_0_0, 0), (self.blocks_unpacked_to_packed_xx_0_0, 0)) self.connect((self.isdbt_bit_deinterleaver_0_1, 0), (self.blocks_unpacked_to_packed_xx_0_1, 0)) self.connect((self.isdbt_byte_deinterleaver_0, 0), (self.blocks_tag_debug_0, 0)) self.connect((self.isdbt_byte_deinterleaver_0, 0), (self.isdbt_energy_descrambler_0, 0)) self.connect((self.isdbt_byte_deinterleaver_0_0, 0), (self.isdbt_energy_descrambler_0_0, 0)) self.connect((self.isdbt_byte_deinterleaver_0_1, 0), (self.isdbt_energy_descrambler_0_1, 0)) self.connect((self.isdbt_byte_interleaver_0, 0), (self.blocks_vector_to_stream_0_0, 0)) self.connect((self.isdbt_byte_interleaver_0_0, 0), (self.blocks_vector_to_stream_0_0_1, 0)) self.connect((self.isdbt_byte_interleaver_0_0_0, 0), (self.blocks_vector_to_stream_0_0_1_0, 0)) self.connect((self.isdbt_energy_descrambler_0, 0), (self.blocks_vector_to_stream_0_1_0_1, 0)) self.connect((self.isdbt_energy_descrambler_0, 0), (self.isdbt_reed_solomon_dec_isdbt_0, 0)) self.connect((self.isdbt_energy_descrambler_0_0, 0), (self.blocks_vector_to_stream_0_1_0_1_0, 0)) self.connect((self.isdbt_energy_descrambler_0_0, 0), (self.isdbt_reed_solomon_dec_isdbt_0_0, 0)) self.connect((self.isdbt_energy_descrambler_0_1, 0), (self.blocks_vector_to_stream_0_1_0_1_1, 0)) self.connect((self.isdbt_energy_descrambler_0_1, 0), (self.isdbt_reed_solomon_dec_isdbt_0_1, 0)) self.connect((self.isdbt_energy_dispersal_0, 0), (self.isdbt_byte_interleaver_0, 0)) self.connect((self.isdbt_energy_dispersal_0_0, 0), (self.isdbt_byte_interleaver_0_0, 0)) self.connect((self.isdbt_energy_dispersal_0_0_0, 0), (self.isdbt_byte_interleaver_0_0_0, 0)) self.connect((self.isdbt_frec_interleaver_0, 0), (self.isdbt_ofdm_frame_structure_0, 0)) self.connect((self.isdbt_frequency_deinterleaver_0, 0), (self.isdbt_time_deinterleaver_0, 0)) self.connect((self.isdbt_hierarchical_combination_0, 0), (self.isdbt_time_interleaver_0, 0)) self.connect((self.isdbt_hierarchical_divisor_0, 0), (self.blocks_vector_to_stream_0_1, 0)) self.connect((self.isdbt_hierarchical_divisor_0, 1), (self.blocks_vector_to_stream_0_1_0, 0)) self.connect((self.isdbt_hierarchical_divisor_0, 2), (self.blocks_vector_to_stream_0_1_0_0, 0)) self.connect((self.isdbt_mapper_0, 0), (self.blocks_stream_to_vector_0, 0)) self.connect((self.isdbt_mapper_0_0, 0), (self.blocks_stream_to_vector_0_0, 0)) self.connect((self.isdbt_mapper_0_0_0, 0), (self.blocks_stream_to_vector_0_1, 0)) self.connect((self.isdbt_ofdm_frame_structure_0, 0), (self.fft_vxx_0, 0)) self.connect((self.isdbt_ofdm_synchronization_0, 0), (self.isdbt_tmcc_decoder_0, 0)) self.connect((self.isdbt_reed_solomon_dec_isdbt_0, 0), (self.blocks_file_sink_0, 0)) self.connect((self.isdbt_reed_solomon_dec_isdbt_0_0, 0), (self.blocks_file_sink_0_0, 0)) self.connect((self.isdbt_reed_solomon_dec_isdbt_0_1, 0), (self.blocks_file_sink_0_1, 0)) self.connect((self.isdbt_symbol_demapper_0, 0), (self.isdbt_bit_deinterleaver_0, 0)) self.connect((self.isdbt_symbol_demapper_0, 1), (self.isdbt_bit_deinterleaver_0_0, 0)) self.connect((self.isdbt_symbol_demapper_0, 2), (self.isdbt_bit_deinterleaver_0_1, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.blocks_vector_to_stream_1_2_0_0_0_0_0, 0)) self.connect((self.isdbt_time_deinterleaver_0, 0), (self.isdbt_symbol_demapper_0, 0)) self.connect((self.isdbt_time_interleaver_0, 0), (self.isdbt_frec_interleaver_0, 0)) self.connect((self.isdbt_tmcc_decoder_0, 0), (self.isdbt_frequency_deinterleaver_0, 0)) self.connect((self.isdbt_tsp_resize_0, 0), (self.dtv_dvbt_reed_solomon_enc_0, 0)) self.connect((self.isdbt_tsp_resize_0_0, 0), (self.dtv_dvbt_reed_solomon_enc_0_0, 0)) self.connect((self.isdbt_tsp_resize_0_0_0, 0), (self.dtv_dvbt_reed_solomon_enc_0_0_0, 0)) self.connect((self.isdbt_viterbi_decoder_0, 0), (self.isdbt_byte_deinterleaver_0, 0)) self.connect((self.isdbt_viterbi_decoder_0_0, 0), (self.isdbt_byte_deinterleaver_0_0, 0)) self.connect((self.isdbt_viterbi_decoder_0_1, 0), (self.isdbt_byte_deinterleaver_0_1, 0))