def set_bphi_4(self, bphi_4): self.bphi_4 = bphi_4 self.band_pass_filter_0_0_0_0_0_0.set_taps(firdes.band_pass(1, self.bpsr, self.bplow_4, self.bphi_4, self.bptrans, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0_0_0_0_0_0.set_taps(firdes.band_pass(1, self.bpsr, self.bplow_4, self.bphi_4, self.bptrans, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0_0_0_0_0_0_0.set_taps(firdes.band_pass(1, self.bpsr, self.bplow_4, self.bphi_4, self.bptrans, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0_0_0_0_0_0_1.set_taps(firdes.band_pass(1, self.bpsr, self.bplow_4, self.bphi_4, self.bptrans, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0_0_0_0_0_0_2.set_taps(firdes.band_pass(1, self.bpsr, self.bplow_4, self.bphi_4, self.bptrans, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 1e5, 1e6, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0.set_taps(firdes.band_pass(1, self.samp_rate, 54e3, 60e3, 3e3, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, 18.5e3, 19.5e3, 3e3, firdes.WIN_HAMMING, 6.76)) self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate) self.wxgui_waterfallsink2_0.set_sample_rate(self.samp_rate) self.rtlsdr_source_1.set_sample_rate(self.samp_rate)
def set_baseband_rate(self, baseband_rate): self.baseband_rate = baseband_rate self.set_rds_samp_rate(self.baseband_rate / self.rds_dec) self.analog_pll_refout_cc_0.set_max_freq(2 * cmath.pi * (19000+200) / self.baseband_rate) self.analog_pll_refout_cc_0.set_min_freq(2 * cmath.pi * (19000-200) / self.baseband_rate) self.band_pass_filter_0.set_taps(firdes.complex_band_pass(1, self.baseband_rate, self.pilot_tone - 0.5e3, self.pilot_tone+0.5e3, 1e3, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0.set_taps(firdes.band_pass(1, self.baseband_rate, 23e3, 53e3, 1e3, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_1.set_taps(firdes.band_pass(1, self.baseband_rate, self.stereo_subcarrier - 0.5e3, self.stereo_subcarrier + 0.5e3, 0.5e3, firdes.WIN_HAMMING, 6.76)) self.freq_xlating_fir_filter_xxx_1.set_taps((firdes.low_pass(2500,self.baseband_rate,self.rds_bandwidth,1e3,firdes.WIN_HAMMING))) self.low_pass_filter_1.set_taps(firdes.low_pass(10, self.baseband_rate, 15e3, 3e3, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_2.set_taps(firdes.low_pass(1, self.baseband_rate, 16e3, 1e3, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_4.set_taps(firdes.low_pass(1, self.baseband_rate, 60e3, 1e3, firdes.WIN_HAMMING, 6.76)) self.qtgui_freq_sink_x_0_0.set_frequency_range(0, self.baseband_rate) self.qtgui_freq_sink_x_0_1_0_0.set_frequency_range(0, self.baseband_rate) self.qtgui_time_sink_x_0.set_samp_rate(self.baseband_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.wxgui_waterfallsink2_0.set_sample_rate(self.samp_rate) self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, 10, 4.5e3, 20, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate)
def set_input_samp_rate(self, input_samp_rate): self.input_samp_rate = input_samp_rate self.band_pass_filter_0_0.set_taps( firdes.band_pass(800, self.input_samp_rate, self.tone_freq - self.tone_bandpass_width, self.tone_freq + self.tone_bandpass_width, self.tone_bandpass_width, firdes.WIN_HAMMING, 6.76)) self.freq_xlating_fir_filter_xxx_0_0.set_taps( (firdes.low_pass(10000, self.input_samp_rate, 500, 500))) self.low_pass_filter_0.set_taps( firdes.low_pass(1, self.input_samp_rate, self.am_demod_lowpass_cutoff, self.am_demod_lowpass_width, firdes.WIN_HAMMING, 6.76)) self.freq_xlating_fir_filter_xxx_0.set_taps( (firdes.low_pass(1000, self.input_samp_rate, self.fm_lowpass_cutoff, self.fm_lowpass_width))) self.blocks_throttle_0.set_sample_rate(self.input_samp_rate) self.analog_pll_carriertracking_cc_0_0.set_max_freq( utility.hz_to_rad_per_sample(self.pll_tracking_range, self.input_samp_rate)) self.analog_pll_carriertracking_cc_0_0.set_min_freq( utility.hz_to_rad_per_sample(-self.pll_tracking_range, self.input_samp_rate)) self.qtgui_waterfall_sink_x_0.set_frequency_range( 0, self.input_samp_rate) self.qtgui_freq_sink_x_0.set_frequency_range(0, self.input_samp_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.carrier.set_sampling_freq(self.samp_rate) self.message.set_sampling_freq(self.samp_rate) self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate) self.wxgui_scopesink2_1.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps(firdes.band_pass(1/self.m, self.samp_rate, 5000, 15000, 100, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate / (80 / 2)) self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate ) self.fft_filter_xxx_0.set_taps((firdes.band_pass(1,self.samp_rate,200,800,100,firdes.WIN_BLACKMAN))) self.blocks_throttle_0.set_sample_rate(self.samp_rate ) self.AFSK_Demod_0.set_in_sps(int(self.samp_rate / self.baud))
def set_trans(self, trans): self.trans = trans self._trans_slider.set_value(self.trans) self._trans_text_box.set_value(self.trans) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.width / 4, self.width / 2, self.trans, firdes.WIN_HAMMING, 6.76) )
def __init__(self): gr.top_block.__init__(self, "Acoust Out") ################################################## # Variables ################################################## self.transistion = transistion = 100 self.sps = sps = 2 self.sideband_rx = sideband_rx = 1000 self.sideband = sideband = 1000 self.samp_rate = samp_rate = 48000 self.payload = payload = 20 self.interpolation = interpolation = 200 self.fd = fd = 0 self.carrier = carrier = 13000 ################################################## # Blocks ################################################## self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( interpolation=interpolation, decimation=1, taps=None, fractional_bw=None, ) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(1, (firdes.band_pass (0.50,samp_rate,carrier-sideband,carrier+sideband,transistion)), -carrier, samp_rate) self.digital_gfsk_mod_0 = digital.gfsk_mod( samples_per_symbol=sps, sensitivity=1.0, bt=0.35, verbose=False, log=False, ) self.blocks_complex_to_real_0 = blocks.complex_to_real(1) self.blks2_tcp_source_0 = grc_blks2.tcp_source( itemsize=gr.sizeof_char*1, addr="127.0.0.1", port=9000, server=True, ) self.blks2_packet_encoder_0 = grc_blks2.packet_mod_b(grc_blks2.packet_encoder( samples_per_symbol=sps, bits_per_symbol=1, preamble="", access_code="", pad_for_usrp=False, ), payload_length=payload, ) self.audio_sink_0 = audio.sink(48000, "", True) ################################################## # Connections ################################################## self.connect((self.blocks_complex_to_real_0, 0), (self.audio_sink_0, 0)) self.connect((self.digital_gfsk_mod_0, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.blks2_packet_encoder_0, 0), (self.digital_gfsk_mod_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blocks_complex_to_real_0, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.blks2_tcp_source_0, 0), (self.blks2_packet_encoder_0, 0))
def set_width(self, width): self.width = width self._width_slider.set_value(self.width) self._width_text_box.set_value(self.width) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.width / 4, self.width / 2, self.trans, firdes.WIN_HAMMING, 6.76) )
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.low_cutoff, self.high_cutoff, self.transition_width, firdes.WIN_HAMMING, 6.76)) self.osmosdr_sink_0.set_sample_rate(self.samp_rate)
def set_m(self, m): self.m = m self._m_slider.set_value(self.m) self._m_text_box.set_value(self.m) self.band_pass_filter_0.set_taps( firdes.band_pass(10 / self.m, self.samp_rate, 20, 15000, 1000, firdes.WIN_HAMMING, 6.76))
def set_ch_rate(self, ch_rate): self.ch_rate = ch_rate self.fft_filter_xxx_1.set_taps( (firdes.band_pass(1, self.ch_rate, 400, 5e3, 400, firdes.WIN_BLACKMAN))) self.analog_quadrature_demod_cf_0.set_gain(self.ch_rate / (2 * math.pi * 12e3 / 8.0)) self.APRS_Rx_0.set_samp_rate(self.ch_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.set_xlate_filter_taps(firdes.low_pass(1, self.samp_rate, 125000, 25000, firdes.WIN_HAMMING, 6.76)) self.fftsink.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.width / 4, self.width / 2, self.trans, firdes.WIN_HAMMING, 6.76) ) self.osmosdr_source_0.set_sample_rate(self.samp_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate) self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate) self.fft_filter_xxx_0.set_taps( (firdes.band_pass(1, self.samp_rate, 1e3, 2.6e3, 100, firdes.WIN_BLACKMAN))) self.APRS_Rx_0.set_samp_rate(self.samp_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.set_decimation(self.samp_rate/self.aud_rate) self.low_pass_filter_0_1.set_taps(firdes.low_pass(30, self.samp_rate, 14000, 1000, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_0_1_0_0_0.set_taps(firdes.low_pass(1, self.samp_rate, 14000, 1000, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0.set_taps(firdes.band_pass(120, self.samp_rate, 24000, 52000, 1000, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) self.analog_sig_source_x_0_0_0.set_sampling_freq(self.samp_rate/self.decimation) self.high_pass_filter_0.set_taps(firdes.high_pass(1, self.samp_rate/self.decimation, self.bw, 10, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_0_0_0.set_taps(firdes.low_pass(1, self.samp_rate/self.decimation, self.bw, 10, firdes.WIN_HAMMING, 6.76)) self.fractional_resampler_xx_0_0.set_resamp_ratio(self.samp_rate/48000.0) self.fractional_resampler_xx_0_0_0.set_resamp_ratio(self.samp_rate/48000.0) self.low_pass_filter_0_2.set_taps(firdes.low_pass(1, self.samp_rate, self.bw*(2+(self.mode==2)+(self.mode==3)), 500, firdes.WIN_HAMMING, 6.76)) self.low_pass_filter_0_0_0_0.set_taps(firdes.low_pass(self.visualsq, self.samp_rate/self.decimation, self.bw, 10, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0_0.set_taps(firdes.band_pass(250, self.samp_rate, 18500, 19500, 500, firdes.WIN_HAMMING, 6.76)) self.fractional_resampler_xx_0.set_resamp_ratio((self.samp_rate/self.decimation)/48000.0) self.rtlsdr_source_0.set_sample_rate(self.samp_rate)
def set_carrier(self, carrier): self.carrier = carrier self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.carrier - (self.filter_width / 2), self.carrier + (self.filter_width / 2), 100, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0.set_frequency(self.carrier)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.set_dec_samp_rate(self.samp_rate / self.dec) self.set_window_len((self.samp_rate / self.bps) * 2) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, 1700 - self.bpf_width, 1700 + self.bpf_width, self.bpf_trans, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.set_filter_taps( firdes.low_pass(1.0, self.samp_rate, self.fsk_deviation_hz, 400)) self.analog_quadrature_demod_cf_0.set_gain( self.samp_rate / (2 * math.pi * self.fsk_deviation_hz / 8.0)) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, self.freq_symbol_0 - 100, self.freq_symbol_0 + 100, 100, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0_0.set_taps( firdes.band_pass(1, self.samp_rate, self.freq_symbol_1 - 100, self.freq_symbol_1 + 100, 100, firdes.WIN_HAMMING, 6.76)) self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate) self.rtlsdr_source_1.set_sample_rate(self.samp_rate) self.logpwrfft_x_0.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, 1000, 10000, 10000, firdes.WIN_HAMMING, 6.76))
def set_lo_freq(self, lo_freq): self.lo_freq = lo_freq self.osmosdr_sink_0.set_center_freq(self.center_freq - self.lo_freq, 0) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.audio_rate, self.lo_freq + 1e3, self.lo_freq + 2e3, 250, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0.set_frequency(self.lo_freq)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate) self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate) self.fft_filter_xxx_0.set_taps( (firdes.band_pass(10, self.samp_rate, 1e3, 2.6e3, 100, firdes.WIN_BLACKMAN))) self.AFSK_Demod_0.set_in_sps(int(self.samp_rate / self.baud))
def set_SampSymb(self, SampSymb): self.SampSymb = SampSymb self.set_rrc_taps_0(firdes.root_raised_cosine(self.nfilts, self.nfilts, 1.0/float(self.SampSymb), 0.35, 45*self.nfilts)) self.set_min_PLL(2*np.pi*(1/float(self.SampSymb)-1/float(self.SampSymb)*self.FDP)) self.set_max_PLL(2*np.pi*(1/float(self.SampSymb)+1/float(self.SampSymb)*self.FDP)) self.band_pass_filter_0_0.set_taps(firdes.band_pass(1, self.samp_rate, (2*self.samp_rate/float(self.SampSymb)-130e3), (2*self.samp_rate/float(self.SampSymb)+100e3), 10e3, firdes.WIN_HAMMING, 6.76)) self.set_LBP_PLL((self.samp_rate/float(self.SampSymb)-self.samp_rate/float(self.SampSymb)*self.FDP*2)) self.set_HBP_PLL((self.samp_rate/float(self.SampSymb)+self.samp_rate/float(self.SampSymb)*self.FDP*2))
def set_af_gain(self, af_gain): self.af_gain = af_gain Qt.QMetaObject.invokeMethod( self._af_gain_line_edit, "setText", Qt.Q_ARG("QString", eng_notation.num_to_str(self.af_gain))) self.band_pass_filter_0.set_taps( firdes.band_pass(10.0**(self.af_gain / 20.0), self.if_rate, 300, 3000, 500, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.band_pass_filter_0.set_taps( firdes.band_pass(self.a, self.samp_rate, 20, 500, self.twidth, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_1.set_taps( firdes.band_pass(self.b, self.samp_rate, 500, 3000, self.twidth, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_1_0_0_0.set_taps( firdes.band_pass(self.e, self.samp_rate, 9000, 15000, self.twidth, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_1_0_0.set_taps( firdes.band_pass(self.d, self.samp_rate, 6000, 9000, self.twidth, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_1_0.set_taps( firdes.band_pass(self.c, self.samp_rate, 3000, 6000, self.twidth, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.analog_sig_source_x_0_0.set_sampling_freq(self.samp_rate) self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, 85000, 115000, 100, firdes.WIN_HAMMING, 6.76)) self.blocks_throttle_0.set_sample_rate(self.samp_rate) self.low_pass_filter_0.set_taps(firdes.low_pass(1, self.samp_rate, 22000, 100, firdes.WIN_HAMMING, 6.76)) self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate) self.qtgui_time_sink_x_0_1.set_samp_rate(self.samp_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.band_pass_filter_0_1.set_taps( firdes.band_pass(1, self.samp_rate, 500, 1500, 10, firdes.WIN_HAMMING, 6.76)) self.qtgui_sink_x_0.set_frequency_range(0, self.samp_rate) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) self.analog_sig_source_x_1.set_sampling_freq(self.samp_rate)
def set_if_rate(self, if_rate): self.if_rate = if_rate self.wxgui_fftsink2_0.set_sample_rate(self.if_rate) self.channels_fading_model_0.set_fDTs(self.dpp / self.if_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(4, self.if_rate, self.fc - 8e3, self.fc + 8e3, 100, firdes.WIN_HAMMING, 6.76)) self.analog_sig_source_x_0_0.set_sampling_freq(self.if_rate)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.uhd_usrp_sink_0.set_samp_rate(self.samp_rate) self.blocks_throttle_0.set_sample_rate(self.samp_rate) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) self.BPF.set_taps( firdes.band_pass(1, self.samp_rate, 80e3, 100e3, 200, firdes.WIN_HAMMING, 6.76))
def set_audio_samp(self, audio_samp): self.audio_samp = audio_samp self.set_samp_rate(self.audio_samp * 22) self.detectMarkSpace_1_0_0.set_samp_rate(self.audio_samp) self.detectMarkSpace_0_0_0.set_samp_rate(self.audio_samp) self.band_pass_filter_0_0_0.set_taps( firdes.band_pass(1, self.audio_samp, 950, 2450, 100, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.rtlsdr_source_0.set_sample_rate(self.samp_rate) self.wxgui_fftsink2_0_2.set_sample_rate(self.samp_rate) self.wxgui_scopesink2_1.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(10 / self.m, self.samp_rate, 20, 15000, 1000, firdes.WIN_HAMMING, 6.76))
def set_bandwidth(self, bandwidth): self.bandwidth = bandwidth self.uhd_usrp_source_0.set_bandwidth(self.bandwidth, 0) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samplingRate, self.centerFrequency - self.bandwidth / 2, self.centerFrequency + self.bandwidth / 2, self.bandwidth / 2 / 6, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.rds_demod_0.set_samp_rate(self.samp_rate) self.fm_audio_demod_0.set_samp_rate(self.samp_rate) self.band_pass_filter_0_1.set_taps(firdes.band_pass(1, self.samp_rate, 19e3-500, 19e3+500, 1e3, firdes.WIN_HAMMING, 6.76)) self.analog_pll_refout_cc_0.set_loop_bandwidth(2 * math.pi * 8 / self.samp_rate) self.analog_pll_refout_cc_0.set_max_freq(2 * math.pi * (19000+4) / self.samp_rate) self.analog_pll_refout_cc_0.set_min_freq(2 * math.pi * (19000-4) / self.samp_rate)
def set_bw(self, bw): self.bw = bw self.band_pass_filter_0.set_taps( firdes.band_pass( 1, self.samp_rate, max(self.bw / 15.0, self.center - self.bw / 2.0), min(self.samp_rate / 2.0 - self.bw / 15.0, self.center + self.bw / 2.0), self.bw / 5.0, firdes.WIN_HANN, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.band_pass_filter_0.set_taps( firdes.band_pass(self.band1, self.samp_rate, 20, 500, 10, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_1.set_taps( firdes.band_pass(self.band5, self.samp_rate, 9000, 15000, 10, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_2.set_taps( firdes.band_pass(self.band4, self.samp_rate, 6000, 9000, 10, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_3.set_taps( firdes.band_pass(self.band3, self.samp_rate, 3000, 6000, 10, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_4.set_taps( firdes.band_pass(self.band2, self.samp_rate, 500, 3000, 10, firdes.WIN_KAISER, 6.76)) self.qtgui_sink_x_0.set_frequency_range(0, self.samp_rate)
def set_baseband_rate(self, baseband_rate): self.baseband_rate = baseband_rate self.fir_filter_xxx_0.set_taps((firdes.low_pass(1.0, self.baseband_rate, 80e3,35e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_1.set_taps((firdes.low_pass(1.0,self.baseband_rate,15e3,1e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_3.set_taps((firdes.band_pass(1.0,self.baseband_rate,38e3-15e3/2,38e3+15e3/2,1e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_4.set_taps((firdes.band_pass(1.0,self.baseband_rate,57e3-3e3,57e3+3e3,3e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_2.set_taps((firdes.band_pass(1.0,self.baseband_rate,19e3-500,19e3+500,1e3,firdes.WIN_HAMMING))) self.wxgui_fftsink2_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0.set_sample_rate(self.baseband_rate) self.fir_filter_xxx_5.set_taps((firdes.low_pass(1.0,self.baseband_rate,15e3,1e3,firdes.WIN_HAMMING))) self.set_audio_decim_rate(self.baseband_rate/self.audio_decim) self.fir_filter_xxx_6.set_taps((firdes.low_pass(1,self.baseband_rate,1.5e3,2e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_7.set_taps((firdes.low_pass(1,self.baseband_rate,1.2e3,1.5e3,firdes.WIN_HAMMING))) self.wxgui_scopesink2_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0_1.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1.set_sample_rate(self.baseband_rate)
def set_samp_rate_rx(self, samp_rate_rx): self.samp_rate_rx = samp_rate_rx self.band_pass_filter_0.set_taps( firdes.band_pass( 6, self.samp_rate_rx / (self.first_stage_decimation * int(self.samp_rate_rx / self.first_stage_decimation / self.initial_bandwidth)) / self.audio_decimation, 500, 4.2e3, 200, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.qtgui_waterfall_sink_x_0.set_frequency_range(0, self.samp_rate) self.low_pass_filter_0_0.set_taps( firdes.low_pass(1, self.samp_rate, 4000, 1, firdes.WIN_HAMMING, 6.76)) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, 2000, 4000, 1, firdes.WIN_HAMMING, 8))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.wxgui_scopesink2_0.set_sample_rate(self.samp_rate) self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate) self.osmosdr_sink_0.set_sample_rate(self.samp_rate) self.blocks_throttle_0.set_sample_rate(self.samp_rate) self.band_pass_filter_0.set_taps( firdes.band_pass(1, self.samp_rate, 100e3, 200e3, 50e3, firdes.WIN_HAMMING, 6.76))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, max(self.bw/15.0,self.center-self.bw/2.0), min(self.samp_rate/2.0-self.bw/15.0,self.center+self.bw/2.0), self.bw/5.0, firdes.WIN_HANN, 6.76)) self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate) self.qtgui_time_sink_x_0.set_samp_rate(self.samp_rate) self.set_sigfreq(self.samp_rate*1.0247385/11.0) self.set_center(self.samp_rate/11.0) self.set_bw(self.samp_rate/2) self.blocks_throttle_0.set_sample_rate(self.samp_rate) self.qtgui_freq_sink_x_0.set_frequency_range(0, self.samp_rate)
def set_baseband_rate(self, baseband_rate): self.baseband_rate = baseband_rate self.set_audio_decim_rate(self.baseband_rate/self.audio_decim) self.wxgui_fftsink2_0.set_sample_rate(self.baseband_rate) self.fir_filter_xxx_5.set_taps((firdes.low_pass(1.0,self.baseband_rate,15e3,1e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_6.set_taps((firdes.low_pass(1,self.baseband_rate,1.5e3,2e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_7.set_taps((firdes.low_pass(1,self.baseband_rate,1.2e3,1.5e3,firdes.WIN_HAMMING))) self.wxgui_scopesink2_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0_1.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1.set_sample_rate(self.baseband_rate) self.fir_filter_xxx_0.set_taps((firdes.low_pass(1.0, self.baseband_rate, 80e3,35e3,firdes.WIN_HAMMING))) self.wxgui_fftsink2_0_0.set_sample_rate(self.baseband_rate) self.fir_filter_xxx_1.set_taps((firdes.low_pass(1.0,self.baseband_rate,15e3,1e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_2.set_taps((firdes.band_pass(1.0,self.baseband_rate,19e3-500,19e3+500,1e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_3.set_taps((firdes.band_pass(1.0,self.baseband_rate,38e3-15e3/2,38e3+15e3/2,1e3,firdes.WIN_HAMMING))) self.analog_pll_freqdet_cf_0.set_loop_bandwidth(1.0*0 + (self.loop_bw*2*math.pi/self.baseband_rate)) self.analog_pll_freqdet_cf_0.set_max_freq(+(2.0 * math.pi * 90e3 / self.baseband_rate)) self.analog_pll_freqdet_cf_0.set_min_freq(-(2.0 * math.pi * 90e3 / self.baseband_rate)) self.fir_filter_xxx_4.set_taps((firdes.band_pass(1.0,self.baseband_rate,57e3-3e3,57e3+3e3,3e3,firdes.WIN_HAMMING)))
def design_lofi_audio_filter(rate, lowpass): """ Audio output filter for speech-type receivers. Original motivation was to remove CTCSS tones. """ upper = min(10000, rate / 2) transition = 1000 if lowpass: return firdes.low_pass(1.0, rate, upper, transition, firdes.WIN_HAMMING) else: return firdes.band_pass(1.0, rate, 500, upper, transition, firdes.WIN_HAMMING)
def __init__(self): grc_wxgui.top_block_gui.__init__(self, title="Top Block") _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png" self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) ################################################## # Variables ################################################## self.samp_rate = samp_rate = 48000 ################################################## # Blocks ################################################## self.rational_resampler_xxx_1 = filter.rational_resampler_fff( interpolation=4160, decimation=4800, taps=None, fractional_bw=None, ) self.rational_resampler_xxx_0 = filter.rational_resampler_fff( interpolation=9600, decimation=samp_rate, taps=None, fractional_bw=None, ) self.blocks_wavfile_source_0 = blocks.wavfile_source(sys.argv[1], False) self.blocks_skiphead_0 = blocks.skiphead(gr.sizeof_float*1, 1) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((255, )) self.blocks_keep_one_in_n_1 = blocks.keep_one_in_n(gr.sizeof_float*1, 2) self.blocks_keep_one_in_n_0 = blocks.keep_one_in_n(gr.sizeof_float*1, 2) self.blocks_float_to_uchar_0 = blocks.float_to_uchar() self.blocks_float_to_complex_0 = blocks.float_to_complex(1) self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_char*1, sys.argv[1]+".gray", False) self.blocks_file_sink_0.set_unbuffered(False) self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1) self.band_pass_filter_0 = filter.fir_filter_fff(1, firdes.band_pass( 1, samp_rate, 500, 4200, 2000, firdes.WIN_HAMMING, 6.76)) ################################################## # Connections ################################################## self.connect((self.blocks_wavfile_source_0, 0), (self.band_pass_filter_0, 0)) self.connect((self.band_pass_filter_0, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_skiphead_0, 0)) self.connect((self.blocks_skiphead_0, 0), (self.blocks_keep_one_in_n_1, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_keep_one_in_n_0, 0)) self.connect((self.blocks_keep_one_in_n_0, 0), (self.blocks_float_to_complex_0, 0)) self.connect((self.blocks_keep_one_in_n_1, 0), (self.blocks_float_to_complex_0, 1)) self.connect((self.blocks_float_to_complex_0, 0), (self.blocks_complex_to_mag_0, 0)) self.connect((self.blocks_complex_to_mag_0, 0), (self.rational_resampler_xxx_1, 0)) self.connect((self.rational_resampler_xxx_1, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.blocks_float_to_uchar_0, 0)) self.connect((self.blocks_float_to_uchar_0, 0), (self.blocks_file_sink_0, 0))
def setup_blocks(self): ################################################## # Blocks ################################################## self.update_input() self.blocks_wavfile_sink_0 = blocks.wavfile_sink("/home/bward/Documents/Labhack 2016/Cleaned Audio/cleaned_audio.wav", 1, self.samp_rate, 16) self.band_pass_filter_0 = filter.fir_filter_fff(1, firdes.band_pass( 1, self.samp_rate, self.low_freq, self.high_freq, 10, firdes.WIN_HAMMING, 6.76)) ################################################## # Connections ################################################## self.connect((self.band_pass_filter_0, 0), (self.blocks_wavfile_sink_0, 0)) self.connect((self.blocks_wavfile_source_0, 0), (self.band_pass_filter_0, 0))
def set_baseband_rate(self, baseband_rate): self.baseband_rate = baseband_rate self.set_audio_decim_rate(self.baseband_rate/self.audio_decim) self.wxgui_fftsink2_0_0_0_1.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0_0_1_0_0.set_sample_rate(self.baseband_rate) self.wxgui_fftsink2_0_0.set_sample_rate(self.baseband_rate) self.fir_filter_xxx_2.set_taps((firdes.complex_band_pass(1.0,self.baseband_rate,19e3-500,19e3+500,1e3,firdes.WIN_HAMMING))) self.wxgui_scopesink2_0.set_sample_rate(self.baseband_rate) self.analog_pll_refout_cc_0.set_max_freq(2 * math.pi * (19000+200) / self.baseband_rate) self.analog_pll_refout_cc_0.set_min_freq(2 * math.pi * (19000-200) / self.baseband_rate) self.fir_filter_xxx_5.set_taps((firdes.low_pass(1.0,self.baseband_rate,20e3,40e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_3.set_taps((firdes.band_pass(1.0,self.baseband_rate,38e3-13e3,38e3+13e3,3e3,firdes.WIN_HAMMING))) self.fir_filter_xxx_1.set_taps((firdes.low_pass(1.0,self.baseband_rate,13e3,3e3,firdes.WIN_HAMMING))) self.wxgui_waterfallsink2_0.set_sample_rate(self.baseband_rate) self.freq_xlating_fir_filter_xxx_1.set_taps((firdes.low_pass(2500.0,self.baseband_rate,2.4e3,2e3,firdes.WIN_HAMMING)))
def make_lofi_audio_filter(rate): ''' Audio output filter for speech-type receivers. Original motivation was to remove CTCSS tones. ''' return grfilter.fir_filter_fff( 1, # decimation firdes.band_pass( 1.0, rate, 500, min(10000, rate / 2), 1000, firdes.WIN_HAMMING))
def __init__(self): gr.top_block.__init__(self, "Gsm Meta Capture") ################################################## # Variables ################################################## self.samp_rate = samp_rate = 1e6 ################################################## # Blocks ################################################## self.uhd_usrp_source_0 = uhd.usrp_source( ",".join(("", "")), uhd.stream_args( cpu_format="fc32", channels=range(1), ), ) self.uhd_usrp_source_0.set_samp_rate(samp_rate) self.uhd_usrp_source_0.set_center_freq(906.2e6, 0) self.uhd_usrp_source_0.set_gain(10, 0) self.single_pole_iir_filter_xx_0 = filter.single_pole_iir_filter_ff(.0001, 1) self.blocks_keep_one_in_n_0 = blocks.keep_one_in_n(gr.sizeof_float*1, 13300) self.blocks_file_meta_sink_0 = blocks.file_meta_sink(gr.sizeof_float*1, "meta_signal.bin", samp_rate, 1, blocks.GR_FILE_FLOAT, False, 10, "", False) self.blocks_file_meta_sink_0.set_unbuffered(False) self.blocks_complex_to_mag_squared_0 = blocks.complex_to_mag_squared(1) self.band_pass_filter_0 = filter.fir_filter_ccf(1, firdes.band_pass( 1, samp_rate, 100e3, 300e3, 200, firdes.WIN_HAMMING, 6.76)) ################################################## # Connections ################################################## self.connect((self.band_pass_filter_0, 0), (self.blocks_complex_to_mag_squared_0, 0)) self.connect((self.blocks_complex_to_mag_squared_0, 0), (self.single_pole_iir_filter_xx_0, 0)) self.connect((self.blocks_keep_one_in_n_0, 0), (self.blocks_file_meta_sink_0, 0)) self.connect((self.single_pole_iir_filter_xx_0, 0), (self.blocks_keep_one_in_n_0, 0)) self.connect((self.uhd_usrp_source_0, 0), (self.band_pass_filter_0, 0))
def __init__(self): grc_wxgui.top_block_gui.__init__(self, title="Ud T") _icon_path = "/usr/share/icons/hicolor/32x32/apps/gnuradio-grc.png" self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY)) ################################################## # Variables ################################################## self.transistion = transistion = 100 self.sps = sps = 9 self.sideband_rx = sideband_rx = 1000 self.sideband = sideband = 1000 self.samp_rate = samp_rate = 48000 self.payload = payload = 5 self.interpolation = interpolation = 500 self.carrier = carrier = 23000 ################################################## # Blocks ################################################## self.wxgui_fftsink2_0_0 = fftsink2.fft_sink_c( self.GetWin(), baseband_freq=0, y_per_div=10, y_divs=10, ref_level=0, ref_scale=2.0, sample_rate=samp_rate, fft_size=1024, fft_rate=15, average=False, avg_alpha=None, title="FFT Plot", peak_hold=False, ) self.Add(self.wxgui_fftsink2_0_0.win) self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( interpolation=500, decimation=1, taps=None, fractional_bw=None, ) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(1, (firdes.band_pass (0.50,samp_rate,carrier-sideband,carrier+sideband,transistion)), -carrier, samp_rate) self.digital_gfsk_mod_0 = digital.gfsk_mod( samples_per_symbol=sps, sensitivity=1.0, bt=0.35, verbose=False, log=False, ) self.blocks_complex_to_real_0 = blocks.complex_to_real(1) self.blks2_tcp_source_0 = grc_blks2.tcp_source( itemsize=gr.sizeof_char*1, addr="127.0.0.1", port=10004, server=True, ) self.blks2_packet_encoder_0 = grc_blks2.packet_mod_b(grc_blks2.packet_encoder( samples_per_symbol=sps, bits_per_symbol=1, preamble="", access_code="", pad_for_usrp=False, ), payload_length=payload, ) self.audio_sink_0 = audio.sink(48000, "", True) ################################################## # Connections ################################################## self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blocks_complex_to_real_0, 0)) self.connect((self.blks2_packet_encoder_0, 0), (self.digital_gfsk_mod_0, 0)) self.connect((self.blks2_tcp_source_0, 0), (self.blks2_packet_encoder_0, 0)) self.connect((self.blocks_complex_to_real_0, 0), (self.audio_sink_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.wxgui_fftsink2_0_0, 0)) self.connect((self.digital_gfsk_mod_0, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
def set_carrier(self, carrier): self.carrier = carrier self.freq_xlating_fir_filter_xxx_0.set_taps((firdes.band_pass (0.50,self.samp_rate,self.carrier-self.sideband,self.carrier+self.sideband,self.transistion))) self.freq_xlating_fir_filter_xxx_0.set_center_freq(-self.carrier)
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.wxgui_fftsink2_0_0.set_sample_rate(self.samp_rate) self.freq_xlating_fir_filter_xxx_0.set_taps((firdes.band_pass (0.50,self.samp_rate,self.carrier-self.sideband,self.carrier+self.sideband,self.transistion)))
def set_sideband(self, sideband): self.sideband = sideband self.freq_xlating_fir_filter_xxx_0.set_taps((firdes.band_pass (0.50,self.samp_rate,self.carrier-self.sideband,self.carrier+self.sideband,self.transistion)))
def set_samp_rate(self, samp_rate): self.samp_rate = samp_rate self.uhd_usrp_source_0.set_samp_rate(self.samp_rate) self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, -300e3, -100e3, 200, firdes.WIN_HAMMING, 6.76))
def __init__(self): gr.top_block.__init__(self, "FM radio FFT example") Qt.QWidget.__init__(self) self.setWindowTitle("FM radio FFT example") 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", "Exp1") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.variable_sample_rate_0 = variable_sample_rate_0 = 1e6 self.samp_rate = samp_rate = 44100 self.xlatecenter_4 = xlatecenter_4 = 0 self.xlatecenter_3 = xlatecenter_3 = 0 self.xlatecenter_2 = xlatecenter_2 = 0 self.xlatecenter = xlatecenter = 0 self.xlate_filter2 = xlate_filter2 = firdes.low_pass(1, samp_rate, 4000, 1000, firdes.WIN_HAMMING, 6.76) self.xlate_filter = xlate_filter = firdes.low_pass(1, variable_sample_rate_0, 125000, 25000, firdes.WIN_HAMMING, 6.76) self.variable_1 = variable_1 = 0 self.transition = transition = 1e6 self.rri = rri = 441 self.rrd = rrd = 500 self.quadrature = quadrature = 500000 self.pscf4 = pscf4 = 0 self.pscf3 = pscf3 = 0 self.pscf2 = pscf2 = 0 self.pscf1 = pscf1 = 0 self.cutoff = cutoff = 1e5 self.bptrans = bptrans = 100 self.bpsr = bpsr = 200000 self.bplow_4 = bplow_4 = 100 self.bplow_3 = bplow_3 = 100 self.bplow_2 = bplow_2 = 100 self.bplow_1 = bplow_1 = 100 self.bphi_4 = bphi_4 = 2.8e3 self.bphi_3 = bphi_3 = 2.8e3 self.bphi_2 = bphi_2 = 2.8e3 self.bphi_1 = bphi_1 = 2.8e3 self.audio_interp = audio_interp = 4 self.amp_4 = amp_4 = 0 self.amp_3 = amp_3 = 0 self.amp_2 = amp_2 = 0 self.amp_1 = amp_1 = 1 self.RF_Gain = RF_Gain = 35 self.CF = CF = 88.5e6 ################################################## # Blocks ################################################## self._pscf1_range = Range(-10000, 10000, 50, 0, 200) self._pscf1_win = RangeWidget(self._pscf1_range, self.set_pscf1, "pscf1", "counter_slider", float) self.top_layout.addWidget(self._pscf1_win) self._amp_1_range = Range(0, 1, 0.01, 1, 200) self._amp_1_win = RangeWidget(self._amp_1_range, self.set_amp_1, "Amp", "counter_slider", float) self.top_layout.addWidget(self._amp_1_win) self.rational_resampler_xxx_1_0_0 = filter.rational_resampler_ccc( interpolation=rri, decimation=rrd, taps=None, fractional_bw=None, ) self.rational_resampler_xxx_1_0 = filter.rational_resampler_fff( interpolation=rri, decimation=rrd, taps=None, fractional_bw=None, ) self.freq_xlating_fir_filter_xxx_1_0 = filter.freq_xlating_fir_filter_fcc(1, (1, ), pscf1, samp_rate) self.freq_xlating_fir_filter_xxx_1 = filter.freq_xlating_fir_filter_ccc(1, (1, ), pscf1, samp_rate) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(5, (xlate_filter), xlatecenter, variable_sample_rate_0) self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff((amp_1, )) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((amp_1, )) self.blocks_complex_to_float_1 = blocks.complex_to_float(1) self.blocks_complex_to_float_0 = blocks.complex_to_float(1) self.band_pass_filter_0_0_0_0 = filter.fir_filter_ccf(4, firdes.band_pass( 1, bpsr, bplow_1, bphi_1, bptrans, firdes.WIN_HAMMING, 6.76)) self.audio_sink_1 = audio.sink(48000, "Radio:NFM1", True) self.analog_nbfm_rx_0_0 = analog.nbfm_rx( audio_rate=50000, quad_rate=int(variable_sample_rate_0/5), tau=75e-6, max_dev=12500, ) self.RTL820T = osmosdr.source( args="numchan=" + str(1) + " " + "" ) self.RTL820T.set_sample_rate(variable_sample_rate_0) self.RTL820T.set_center_freq(CF, 0) self.RTL820T.set_freq_corr(0, 0) self.RTL820T.set_dc_offset_mode(2, 0) self.RTL820T.set_iq_balance_mode(0, 0) self.RTL820T.set_gain_mode(False, 0) self.RTL820T.set_gain(RF_Gain, 0) self.RTL820T.set_if_gain(20, 0) self.RTL820T.set_bb_gain(20, 0) self.RTL820T.set_antenna("", 0) self.RTL820T.set_bandwidth(1e6, 0) ################################################## # Connections ################################################## self.connect((self.RTL820T, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.analog_nbfm_rx_0_0, 0), (self.rational_resampler_xxx_1_0, 0)) self.connect((self.band_pass_filter_0_0_0_0, 0), (self.rational_resampler_xxx_1_0_0, 0)) self.connect((self.blocks_complex_to_float_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_complex_to_float_1, 0), (self.blocks_multiply_const_vxx_0_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.audio_sink_1, 0)) self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.audio_sink_1, 1)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_nbfm_rx_0_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.band_pass_filter_0_0_0_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_1, 0), (self.blocks_complex_to_float_1, 0)) self.connect((self.freq_xlating_fir_filter_xxx_1_0, 0), (self.blocks_complex_to_float_0, 0)) self.connect((self.rational_resampler_xxx_1_0, 0), (self.freq_xlating_fir_filter_xxx_1_0, 0)) self.connect((self.rational_resampler_xxx_1_0_0, 0), (self.freq_xlating_fir_filter_xxx_1, 0))
def raw_bandpassfilter(self, const, samp_rate, lowpass, highpass, transition): return firdes.band_pass (const, samp_rate,lowpass, highpass, transition)
def set_smux_filt_samprate(self, smux_filt_samprate): self.smux_filt_samprate = smux_filt_samprate self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.smux_filt_samprate, self.bpf_base, self.bpf_base+30e3, 500, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_0_0_0.set_taps(firdes.complex_band_pass(1, self.smux_filt_samprate, 18000, 20000, 1000, firdes.WIN_KAISER, 1)) self.baseband_LPF.set_taps(firdes.low_pass(1, self.smux_filt_samprate, 15e3, 500, firdes.WIN_KAISER, 6.76)) self.low_pass_filter_1_0.set_taps(firdes.low_pass(1, self.smux_filt_samprate, 15e3, 500, firdes.WIN_HAMMING, 1))
def __init__(self): grc_wxgui.top_block_gui.__init__(self, title="FM Stereo Receiver") ################################################## # Variables ################################################## self.smux_filt_samprate = smux_filt_samprate = 256e3 self.smux_decim = smux_decim = 8 self.samp_rate = samp_rate = 2.048e6 self.right_gain = right_gain = 3 self.left_gain = left_gain = 3 self.bpf_base = bpf_base = 23e3 self.RF_Gain = RF_Gain = 45 self.CF = CF = 99.3e6 ################################################## # Blocks ################################################## self._samp_rate_text_box = forms.text_box( parent=self.GetWin(), value=self.samp_rate, callback=self.set_samp_rate, label="Sample Rate: 1.024M, 1.4M, 1.8M, 1.92M, 2.048M, 2.4M & 2. 56M", converter=forms.float_converter(), ) self.GridAdd(self._samp_rate_text_box, 1, 0, 1, 1) _right_gain_sizer = wx.BoxSizer(wx.VERTICAL) self._right_gain_text_box = forms.text_box( parent=self.GetWin(), sizer=_right_gain_sizer, value=self.right_gain, callback=self.set_right_gain, label="R Audio Gain", converter=forms.float_converter(), proportion=0, ) self._right_gain_slider = forms.slider( parent=self.GetWin(), sizer=_right_gain_sizer, value=self.right_gain, callback=self.set_right_gain, minimum=0, maximum=5, num_steps=100, style=wx.SL_HORIZONTAL, cast=float, proportion=1, ) self.GridAdd(_right_gain_sizer, 0, 1, 1, 1) self.notebook_0 = self.notebook_0 = wx.Notebook(self.GetWin(), style=wx.NB_TOP) self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), "BB Spectrum") self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), "Demod Spectrum") self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), "Stereo Spectrum") self.notebook_0.AddPage(grc_wxgui.Panel(self.notebook_0), "Stereo Signal") self.GridAdd(self.notebook_0, 2, 0, 1, 2) _left_gain_sizer = wx.BoxSizer(wx.VERTICAL) self._left_gain_text_box = forms.text_box( parent=self.GetWin(), sizer=_left_gain_sizer, value=self.left_gain, callback=self.set_left_gain, label="L Audio Gain", converter=forms.float_converter(), proportion=0, ) self._left_gain_slider = forms.slider( parent=self.GetWin(), sizer=_left_gain_sizer, value=self.left_gain, callback=self.set_left_gain, minimum=0, maximum=5, num_steps=100, style=wx.SL_HORIZONTAL, cast=float, proportion=1, ) self.GridAdd(_left_gain_sizer, 0, 0, 1, 1) _RF_Gain_sizer = wx.BoxSizer(wx.VERTICAL) self._RF_Gain_text_box = forms.text_box( parent=self.GetWin(), sizer=_RF_Gain_sizer, value=self.RF_Gain, callback=self.set_RF_Gain, label="RF Gain", converter=forms.float_converter(), proportion=0, ) self._RF_Gain_slider = forms.slider( parent=self.GetWin(), sizer=_RF_Gain_sizer, value=self.RF_Gain, callback=self.set_RF_Gain, minimum=0, maximum=100, num_steps=45, style=wx.SL_HORIZONTAL, cast=float, proportion=1, ) self.GridAdd(_RF_Gain_sizer, 1, 1, 1, 1) self.wxgui_waterfallsink2_0 = waterfallsink2.waterfall_sink_c( self.notebook_0.GetPage(0).GetWin(), baseband_freq=0, dynamic_range=100, ref_level=0, ref_scale=2.0, sample_rate=samp_rate, fft_size=512, fft_rate=15, average=False, avg_alpha=None, title="Baseband Waterfall", size=(800,100), ) self.notebook_0.GetPage(0).GridAdd(self.wxgui_waterfallsink2_0.win, 3, 0, 1, 2) self.wxgui_scopesink2_0 = scopesink2.scope_sink_f( self.notebook_0.GetPage(3).GetWin(), title="Scope Plot", sample_rate=32e3, v_scale=0, v_offset=0, t_scale=0, ac_couple=False, xy_mode=False, num_inputs=2, trig_mode=wxgui.TRIG_MODE_AUTO, y_axis_label="Counts", size=(800,500), ) self.notebook_0.GetPage(3).Add(self.wxgui_scopesink2_0.win) self.wxgui_fftsink2_0_1 = fftsink2.fft_sink_f( self.notebook_0.GetPage(2).GetWin(), baseband_freq=0, y_per_div=10, y_divs=10, ref_level=0, ref_scale=2.0, sample_rate=32e3, fft_size=1024, fft_rate=15, average=False, avg_alpha=None, title="Difference FFT ", peak_hold=False, ) self.notebook_0.GetPage(2).Add(self.wxgui_fftsink2_0_1.win) self.wxgui_fftsink2_0_0_0 = fftsink2.fft_sink_f( self.notebook_0.GetPage(1).GetWin(), baseband_freq=0, y_per_div=10, y_divs=10, ref_level=0, ref_scale=2.0, sample_rate=samp_rate/8, fft_size=1024, fft_rate=15, average=False, avg_alpha=None, title="Demodulated FFT", peak_hold=False, size=(800,800), ) self.notebook_0.GetPage(1).Add(self.wxgui_fftsink2_0_0_0.win) self.wxgui_fftsink2_0_0 = fftsink2.fft_sink_c( self.notebook_0.GetPage(0).GetWin(), baseband_freq=0, y_per_div=10, y_divs=10, ref_level=0, ref_scale=2.0, sample_rate=samp_rate, fft_size=1024, fft_rate=15, average=False, avg_alpha=None, title="Baseband FFT", peak_hold=False, size=(800,100), ) self.notebook_0.GetPage(0).GridAdd(self.wxgui_fftsink2_0_0.win, 2, 0, 1, 2) self.wxgui_fftsink2_0 = fftsink2.fft_sink_f( self.notebook_0.GetPage(2).GetWin(), baseband_freq=0, y_per_div=10, y_divs=10, ref_level=0, ref_scale=2.0, sample_rate=32e3, fft_size=1024, fft_rate=15, average=False, avg_alpha=None, title="Sum FFT", peak_hold=False, ) self.notebook_0.GetPage(2).Add(self.wxgui_fftsink2_0.win) self.rfgain = blocks.multiply_const_vcc((RF_Gain, )) self.low_pass_filter_1_0 = filter.fir_filter_fff(smux_decim, firdes.low_pass( 1, smux_filt_samprate, 15e3, 500, firdes.WIN_HAMMING, 1)) self.low_pass_filter_0 = filter.fir_filter_ccf(2, firdes.low_pass( 2, samp_rate/4, 100e3, 500, firdes.WIN_KAISER, 6.76)) self.iir_filter_xxx_0 = filter.iir_filter_ccf((-0.00266, 0.00504, -0.00309, -0.00136, 0.00663, -0.01052, 0.01103, -0.00731, 0.00016, 0.00800, -0.01396, 0.01490, -0.00971, -0.00035, 0.01173, -0.01979, 0.02054, -0.01240, -0.00273, 0.01960, -0.03122, 0.03124, -0.01669, -0.01017, 0.04137, -0.06448, 0.06476, -0.02634, -0.07449, 0.33571, -0.00000, -0.33571, 0.07449, 0.02634, -0.06476, 0.06448, -0.04137, 0.01017, 0.01669, -0.03124, 0.03122, -0.01960, 0.00273, 0.01240, -0.02054, 0.01979, -0.01173, 0.00035, 0.00971, -0.01490, 0.01396, -0.00800, -0.00016, 0.00731, -0.01103, 0.01052, -0.00663, 0.00136, 0.00309, -0.00504, 0.00266 ), (1 , ), False) self.fir_filter_xxx_0_0 = filter.fir_filter_ccf(4, (1,1,1,1)) self.fir_filter_xxx_0_0.declare_sample_delay(0) self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True) self.blocks_sub_xx_0 = blocks.sub_ff(1) self.blocks_multiply_xx_1_0 = blocks.multiply_vcc(1) self.blocks_multiply_xx_0 = blocks.multiply_vff(1) self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff((right_gain, )) self.blocks_multiply_const_vxx_0 = blocks.multiply_const_vff((left_gain, )) self.blocks_multiply_conjugate_cc_0 = blocks.multiply_conjugate_cc(1) self.blocks_float_to_complex_0 = blocks.float_to_complex(1) self.blocks_file_source_0_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/Users/bretttt/iCloud_drive/16S/engs110/project/radio_dat/IQ_Data_STEREO1", True) self.blocks_divide_xx_1 = blocks.divide_cc(1) self.blocks_delay_2 = blocks.delay(gr.sizeof_gr_complex*1, 30) self.blocks_complex_to_real_0 = blocks.complex_to_real(1) self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1) self.blocks_complex_to_imag_0 = blocks.complex_to_imag(1) self.blocks_add_xx_0 = blocks.add_vff(1) self.blocks_add_const_vxx_0 = blocks.add_const_vcc((0.1, )) self.baseband_LPF = filter.fir_filter_fff(smux_decim, firdes.low_pass( 1, smux_filt_samprate, 15e3, 500, firdes.WIN_KAISER, 6.76)) self.band_pass_filter_0_0_0 = filter.fir_filter_fcc(1, firdes.complex_band_pass( 1, smux_filt_samprate, 18000, 20000, 1000, firdes.WIN_KAISER, 1)) self.band_pass_filter_0 = filter.fir_filter_fff(1, firdes.band_pass( 1, smux_filt_samprate, bpf_base, bpf_base+30e3, 500, firdes.WIN_KAISER, 6.76)) self.audio_sink_0_0_0_0 = audio.sink(32000, "", True) self.analog_pll_refout_cc_0_0 = analog.pll_refout_cc(3.14/100, 0.152*3.14, 0.144*3.14) self.analog_fm_deemph_0_0 = analog.fm_deemph(fs=samp_rate/8, tau=75e-6) self.analog_fm_deemph_0 = analog.fm_deemph(fs=samp_rate/8, tau=75e-6) self.analog_const_source_x_0 = analog.sig_source_f(0, analog.GR_CONST_WAVE, 0, 0, 0) _CF_sizer = wx.BoxSizer(wx.VERTICAL) self._CF_text_box = forms.text_box( parent=self.GetWin(), sizer=_CF_sizer, value=self.CF, callback=self.set_CF, label="Center Frequency", converter=forms.float_converter(), proportion=0, ) self._CF_slider = forms.slider( parent=self.GetWin(), sizer=_CF_sizer, value=self.CF, callback=self.set_CF, minimum=80e6, maximum=108e6, num_steps=280, style=wx.SL_HORIZONTAL, cast=float, proportion=1, ) self.GridAdd(_CF_sizer, 3, 0, 1, 2) ################################################## # Connections ################################################## self.connect((self.analog_const_source_x_0, 0), (self.blocks_float_to_complex_0, 1)) self.connect((self.analog_fm_deemph_0, 0), (self.audio_sink_0_0_0_0, 0)) self.connect((self.analog_fm_deemph_0_0, 0), (self.audio_sink_0_0_0_0, 1)) self.connect((self.analog_pll_refout_cc_0_0, 0), (self.blocks_multiply_xx_1_0, 0)) self.connect((self.analog_pll_refout_cc_0_0, 0), (self.blocks_multiply_xx_1_0, 1)) self.connect((self.band_pass_filter_0, 0), (self.blocks_multiply_xx_0, 0)) self.connect((self.band_pass_filter_0_0_0, 0), (self.analog_pll_refout_cc_0_0, 0)) self.connect((self.baseband_LPF, 0), (self.blocks_add_xx_0, 0)) self.connect((self.baseband_LPF, 0), (self.blocks_sub_xx_0, 0)) self.connect((self.blocks_add_const_vxx_0, 0), (self.blocks_divide_xx_1, 1)) self.connect((self.blocks_add_xx_0, 0), (self.blocks_multiply_const_vxx_0, 0)) self.connect((self.blocks_complex_to_imag_0, 0), (self.band_pass_filter_0, 0)) self.connect((self.blocks_complex_to_imag_0, 0), (self.band_pass_filter_0_0_0, 0)) self.connect((self.blocks_complex_to_imag_0, 0), (self.baseband_LPF, 0)) self.connect((self.blocks_complex_to_imag_0, 0), (self.wxgui_fftsink2_0_0_0, 0)) self.connect((self.blocks_complex_to_mag_0, 0), (self.blocks_float_to_complex_0, 0)) self.connect((self.blocks_complex_to_real_0, 0), (self.blocks_multiply_xx_0, 1)) self.connect((self.blocks_delay_2, 0), (self.blocks_multiply_conjugate_cc_0, 1)) self.connect((self.blocks_divide_xx_1, 0), (self.blocks_delay_2, 0)) self.connect((self.blocks_divide_xx_1, 0), (self.iir_filter_xxx_0, 0)) self.connect((self.blocks_file_source_0_0, 0), (self.rfgain, 0)) self.connect((self.blocks_float_to_complex_0, 0), (self.blocks_add_const_vxx_0, 0)) self.connect((self.blocks_multiply_conjugate_cc_0, 0), (self.blocks_complex_to_imag_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.analog_fm_deemph_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.wxgui_fftsink2_0, 0)) self.connect((self.blocks_multiply_const_vxx_0, 0), (self.wxgui_scopesink2_0, 0)) self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.analog_fm_deemph_0_0, 0)) self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.wxgui_fftsink2_0_1, 0)) self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.wxgui_scopesink2_0, 1)) self.connect((self.blocks_multiply_xx_0, 0), (self.low_pass_filter_1_0, 0)) self.connect((self.blocks_multiply_xx_1_0, 0), (self.blocks_complex_to_real_0, 0)) self.connect((self.blocks_sub_xx_0, 0), (self.blocks_multiply_const_vxx_0_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.fir_filter_xxx_0_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.wxgui_fftsink2_0_0, 0)) self.connect((self.blocks_throttle_0, 0), (self.wxgui_waterfallsink2_0, 0)) self.connect((self.fir_filter_xxx_0_0, 0), (self.low_pass_filter_0, 0)) self.connect((self.iir_filter_xxx_0, 0), (self.blocks_multiply_conjugate_cc_0, 0)) self.connect((self.low_pass_filter_0, 0), (self.blocks_complex_to_mag_0, 0)) self.connect((self.low_pass_filter_0, 0), (self.blocks_divide_xx_1, 0)) self.connect((self.low_pass_filter_1_0, 0), (self.blocks_add_xx_0, 1)) self.connect((self.low_pass_filter_1_0, 0), (self.blocks_sub_xx_0, 1)) self.connect((self.rfgain, 0), (self.blocks_throttle_0, 0))
def __init__(self, inc_samp_rate): gr.hier_block2.__init__(self, "fsk_demod", gr.io_signature(1, 1, gr.sizeof_float), # Input signature gr.io_signature(1, 1, gr.sizeof_char) # Output signature ) self.inc_samp_rate = inc_samp_rate self.sps = sps = 4 self.baud_rate = baud_rate = 1200 self.samp_rate = samp_rate = sps * baud_rate * 4 self.mark = mark = 2200 self.space = space = 1200 self.center = center = int((mark + space) / 2) ################################################## # Blocks ################################################## # Stage 1: Force resampling to 19.2ksps self.rational_resampler_xxx_0 = filter.rational_resampler_fff( interpolation=samp_rate, decimation=self.inc_samp_rate, taps=None, fractional_bw=None, ) # Stage 2: Bandpass Filter self.bpf_width = bpf_width = 800 self.bpf_trans = bpf_trans = 200 self.band_pass_filter_0 = filter.fir_filter_fff(1, firdes.band_pass( 1, samp_rate, 1700-bpf_width, 1700+bpf_width, bpf_trans, firdes.WIN_RECTANGULAR, 6.76)) # Stage 3: Tone Detection self.window_len = window_len = self.samp_rate/self.baud_rate*2 self.window = window = signal.windows.cosine(window_len) self.freq_xlating_fir_filter_xxx_0_0 = filter.freq_xlating_fir_filter_fcf(4, (window), mark, samp_rate) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_fcf(4, (window), space, samp_rate) self.blocks_complex_to_mag_0_0 = blocks.complex_to_mag(1) self.blocks_complex_to_mag_0 = blocks.complex_to_mag(1) # Stage 4: AGC self.decay = decay = 0.00022 self.attack = attack = 0.8 self.bruninga_direwolf_agc_0_0 = bruninga.direwolf_agc(attack, decay) self.bruninga_direwolf_agc_0 = bruninga.direwolf_agc(attack, decay) self.blocks_sub_xx_1 = blocks.sub_ff(1) # Stage 5: Clock Recovery self.gain_mu = gain_mu = 0.45 self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(self.sps*(1+0.0), 0.25*gain_mu*gain_mu, 0.5, gain_mu, 0.05) # Stage 6: Differential Decoding self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2) self.blocks_not_xx_0 = blocks.not_bb() self.blocks_and_const_xx_0 = blocks.and_const_bb(1) # Stage 7: Output self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb() ################################################## # Connections ################################################## self.connect((self, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.band_pass_filter_0, 0)) self.connect((self.band_pass_filter_0, 0), (self.freq_xlating_fir_filter_xxx_0_0, 0)) self.connect((self.band_pass_filter_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blocks_complex_to_mag_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0_0, 0), (self.blocks_complex_to_mag_0_0, 0)) self.connect((self.blocks_complex_to_mag_0, 0), (self.bruninga_direwolf_agc_0, 0)) self.connect((self.blocks_complex_to_mag_0_0, 0), (self.bruninga_direwolf_agc_0_0, 0)) self.connect((self.bruninga_direwolf_agc_0_0, 0), (self.blocks_sub_xx_1, 1)) self.connect((self.bruninga_direwolf_agc_0, 0), (self.blocks_sub_xx_1, 0)) self.connect((self.blocks_sub_xx_1, 0), (self.digital_clock_recovery_mm_xx_0, 0)) self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0)) self.connect((self.digital_diff_decoder_bb_0, 0), (self.blocks_not_xx_0, 0)) self.connect((self.blocks_not_xx_0, 0), (self.blocks_and_const_xx_0, 0)) self.connect((self.blocks_and_const_xx_0, 0), (self, 0)) self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_diff_decoder_bb_0, 0))
def __init__( self, carrier, sideband, transition, sps, interpolation, looutdev): gr.top_block.__init__(self, "Transmit block") ################################################## # Variables ################################################## self.samp_rate = SAMPLE_RATE self.carrier = carrier self.sideband = sideband self.transition = transition self.sps = sps self.interpolation = interpolation ################################################## # Blocks ################################################## self.rational_resampler_xxx_0 = filter.rational_resampler_ccc( interpolation=interpolation, decimation=1, taps=None, fractional_bw=None, ) self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(1, (firdes.band_pass (0.50,SAMPLE_RATE,carrier-sideband,carrier+sideband,transition)), -carrier, SAMPLE_RATE) self.digital_gfsk_mod_0 = digital.gfsk_mod( samples_per_symbol=sps, sensitivity=1.0, bt=0.35, verbose=False, log=False, ) self.blocks_complex_to_real_0 = blocks.complex_to_real(1) self.blks2_packet_encoder_0 = grc_blks2.packet_mod_b(grc_blks2.packet_encoder( samples_per_symbol=sps, bits_per_symbol=1, preamble="", access_code="", pad_for_usrp=False, ), payload_length=PAYLOAD_LEN, ) self.audio_sink_0 = audio.sink(SAMPLE_RATE, looutdev, True) self.source_queue = gr.msg_queue() self.msg_source = blocks.message_source(gr.sizeof_char, self.source_queue) ################################################## # Connections ################################################## self.connect((self.msg_source, 0), (self.blks2_packet_encoder_0, 0)) self.connect((self.blks2_packet_encoder_0, 0), (self.digital_gfsk_mod_0, 0)) self.connect((self.digital_gfsk_mod_0, 0), (self.rational_resampler_xxx_0, 0)) self.connect((self.rational_resampler_xxx_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.blocks_complex_to_real_0, 0)) self.connect((self.blocks_complex_to_real_0, 0), (self.audio_sink_0, 0))
def update_filter(self): self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.samp_rate, self.low_freq, self.high_freq, 10, firdes.WIN_HAMMING, 6.76))
def set_bpf_base(self, bpf_base): self.bpf_base = bpf_base self.band_pass_filter_0.set_taps(firdes.band_pass(1, self.smux_filt_samprate, self.bpf_base, self.bpf_base+30e3, 500, firdes.WIN_KAISER, 6.76))