diff options
Diffstat (limited to '')
-rwxr-xr-x | simulation/QAM_Fading/qam_fading_block.py | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/simulation/QAM_Fading/qam_fading_block.py b/simulation/QAM_Fading/qam_fading_block.py index 5622e69..89c4a32 100755 --- a/simulation/QAM_Fading/qam_fading_block.py +++ b/simulation/QAM_Fading/qam_fading_block.py @@ -87,7 +87,7 @@ class qam_fading_block(gr.top_block, Qt.QWidget): self.phase_bw = phase_bw = 2 * 3.141592653589793 / 100 self.noise_volt = noise_volt = 0.0001 self.freq_offset = freq_offset = 0 - self.fading_1 = fading_1 = 2 + self.fading_1 = fading_1 = sps self.eq_ntaps = eq_ntaps = 15 self.eq_mod = eq_mod = 1 self.eq_gain = eq_gain = .01 @@ -168,6 +168,13 @@ class qam_fading_block(gr.top_block, Qt.QWidget): self.params_grid_layout_0.setRowStretch(r, 1) for c in range(0, 1): self.params_grid_layout_0.setColumnStretch(c, 1) + self._fading_1_range = Range(1, 30, 0.0001, sps, 200) + self._fading_1_win = RangeWidget(self._fading_1_range, self.set_fading_1, 'Fading', "counter_slider", float) + self.params_grid_layout_2.addWidget(self._fading_1_win, 1, 0, 1, 1) + for r in range(1, 2): + self.params_grid_layout_2.setRowStretch(r, 1) + for c in range(0, 1): + self.params_grid_layout_2.setColumnStretch(c, 1) self._eq_gain_range = Range(0, .1, .001, .01, 200) self._eq_gain_win = RangeWidget(self._eq_gain_range, self.set_eq_gain, 'Equalizer Rate', "counter_slider", float) self.params_grid_layout_1.addWidget(self._eq_gain_win, 0, 0, 1, 1) @@ -175,6 +182,13 @@ class qam_fading_block(gr.top_block, Qt.QWidget): self.params_grid_layout_1.setRowStretch(r, 1) for c in range(0, 1): self.params_grid_layout_1.setColumnStretch(c, 1) + self._amp_1_range = Range(0, 5, 0.1, 0.2, 200) + self._amp_1_win = RangeWidget(self._amp_1_range, self.set_amp_1, 'Ampliude', "counter_slider", float) + self.params_grid_layout_2.addWidget(self._amp_1_win, 1, 1, 1, 1) + for r in range(1, 2): + self.params_grid_layout_2.setRowStretch(r, 1) + for c in range(1, 2): + self.params_grid_layout_2.setColumnStretch(c, 1) self.qtgui_time_sink_x_0 = qtgui.time_sink_f( 1024, #size samp_rate, #samp_rate @@ -491,14 +505,7 @@ class qam_fading_block(gr.top_block, Qt.QWidget): self.plots_grid_layout_0.setRowStretch(r, 1) for c in range(0, 1): self.plots_grid_layout_0.setColumnStretch(c, 1) - self.fadingui_multipath_fading_0 = fadingui.multipath_fading(amplitudes=[0.2, 0.2], delays=[4,4]) - self._fading_1_range = Range(1, 30, 1, 2, 200) - self._fading_1_win = RangeWidget(self._fading_1_range, self.set_fading_1, 'Fading', "counter_slider", int) - self.params_grid_layout_2.addWidget(self._fading_1_win, 1, 0, 1, 1) - for r in range(1, 2): - self.params_grid_layout_2.setRowStretch(r, 1) - for c in range(0, 1): - self.params_grid_layout_2.setColumnStretch(c, 1) + self.fadingui_multipath_fading_0 = fadingui.multipath_fading(amplitudes=[amp_1], delays=[fading_1], los =False) self.digital_pfb_clock_sync_xxx_0_0 = digital.pfb_clock_sync_ccf(sps , timing_loop_bw, rrc_taps, nfilts, nfilts/2, 1.5, 1) self.digital_pfb_clock_sync_xxx_0 = digital.pfb_clock_sync_ccf(sps, timing_loop_bw, rrc_taps, nfilts, nfilts/2, 1.5, 1) self.digital_map_bb_0_0 = digital.map_bb([0, 1, 3, 2]) @@ -535,13 +542,6 @@ class qam_fading_block(gr.top_block, Qt.QWidget): self.blocks_char_to_float_0_0 = blocks.char_to_float(1, 1) self.blocks_char_to_float_0 = blocks.char_to_float(1, 1) self.analog_random_source_x_0 = blocks.vector_source_b(list(map(int, numpy.random.randint(0, 256, 1000))), True) - self._amp_1_range = Range(0, 5, 0.1, 0.2, 200) - self._amp_1_win = RangeWidget(self._amp_1_range, self.set_amp_1, 'Ampliude', "counter_slider", float) - self.params_grid_layout_2.addWidget(self._amp_1_win, 1, 1, 1, 1) - for r in range(1, 2): - self.params_grid_layout_2.setRowStretch(r, 1) - for c in range(1, 2): - self.params_grid_layout_2.setColumnStretch(c, 1) self._LOS_NLOS_range = Range(0, 1, 1, 1, 200) self._LOS_NLOS_win = RangeWidget(self._LOS_NLOS_range, self.set_LOS_NLOS, 'LOS_NLOS', "counter_slider", int) self.params_grid_layout_2.addWidget(self._LOS_NLOS_win, 0, 0, 1, 1) @@ -605,6 +605,7 @@ class qam_fading_block(gr.top_block, Qt.QWidget): def set_sps(self, sps): self.sps = sps + self.set_fading_1(self.sps) self.set_rrc_taps(firdes.root_raised_cosine(self.nfilts, self.nfilts, 1.0/float(self.sps), self.excess_bw, 45*self.nfilts)) def get_nfilts(self): |