def __init__(self):
		gr.top_block.__init__(self, "FM Receiver")

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 96000
		self.xlate_filter_taps = xlate_filter_taps = firdes.low_pass(1, samp_rate, 48000, 5000, firdes.WIN_HAMMING, 6.76)
		self.sql_lev = sql_lev = -100
		self.rf_gain = rf_gain = 20
		self.freq = freq = 144800000
		self.af_gain = af_gain = 2
		self.sat_file_name = sat_file_name = "Undefined"

		##################################################
		# Blocks
		##################################################
		self.xlating_fir_filter = gr.freq_xlating_fir_filter_ccc(1, (xlate_filter_taps), 0, samp_rate)
		self.nbfm_normal = blks2.nbfm_rx(
			audio_rate=48000,
			quad_rate=96000,
			tau=75e-6,
			max_dev=5e3,
		)
		self.low_pass_filter = gr.fir_filter_ccf(1, firdes.low_pass(
			1, samp_rate, 12500, 1500, firdes.WIN_HAMMING, 6.76))
		self.gr_simple_squelch_cc_0 = gr.simple_squelch_cc(sql_lev, 1)
		self.gr_multiply_const_vxx_1 = gr.multiply_const_vff((af_gain, ))
		self.fcd_source_c_1 = fcd.source_c("hw:1")
		self.fcd_source_c_1.set_freq(freq)
		self.fcd_source_c_1.set_freq_corr(-32)
		    
		self.audio_sink = audio.sink(48000, "", True)
		
		self.wavfile_sink = gr.wavfile_sink(self.sat_file_name, 1, 11025, 16)
		self.blks2_rational_resampler_xxx_0 = blks2.rational_resampler_fff(
			interpolation=11025,
			decimation=48000,
			taps=None,
			fractional_bw=None,
		)
		

		##################################################
		# Connections
		##################################################
		self.connect((self.xlating_fir_filter, 0), (self.low_pass_filter, 0))
		self.connect((self.low_pass_filter, 0), (self.gr_simple_squelch_cc_0, 0))
		self.connect((self.gr_multiply_const_vxx_1, 0), (self.audio_sink, 1))
		self.connect((self.gr_multiply_const_vxx_1, 0), (self.audio_sink, 0))
		self.connect((self.gr_simple_squelch_cc_0, 0), (self.nbfm_normal, 0))
		self.connect((self.nbfm_normal, 0), (self.gr_multiply_const_vxx_1, 0))
		self.connect((self.fcd_source_c_1, 0), (self.xlating_fir_filter, 0))
		self.connect((self.nbfm_normal, 0), (self.blks2_rational_resampler_xxx_0, 0))
		self.connect((self.blks2_rational_resampler_xxx_0, 0), (self.wavfile_sink, 0))
	def __init__(self):
		gr.top_block.__init__(self, "CW/SSB Receiver")

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 96000
		self.xlate_filter_taps = xlate_filter_taps = firdes.low_pass(1, samp_rate, 48000, 5000, firdes.WIN_HAMMING, 6.76)
		self.sql_lev = sql_lev = -100
		self.rf_gain = rf_gain = 20
		self.pass_trans = pass_trans = 600
		self.pass_low = pass_low = 300
		self.pass_high = pass_high = 1200
		self.freq = freq = 144800000
		self.af_gain = af_gain = 5
		self.sat_file_name = sat_file_name = "Undefined"

		##################################################
		# Blocks
		##################################################
		self.xlating_fir_filter = gr.freq_xlating_fir_filter_ccc(1, (xlate_filter_taps), 0, samp_rate)
		self.gr_simple_squelch_cc_0 = gr.simple_squelch_cc(sql_lev, 1)
		self.gr_multiply_const_vxx_0 = gr.multiply_const_vff((af_gain, ))
		self.gr_complex_to_real_0 = gr.complex_to_real(1)
		self.gr_agc2_xx_0 = gr.agc2_cc(1e-1, 20.8e-6, 0.3, 1.0, 0.0)
		self.fcd_source_c_1 = fcd.source_c("hw:1")
		self.fcd_source_c_1.set_freq(freq)
		self.fcd_source_c_1.set_freq_corr(-10)
		    
		self.band_pass_filter_0 = gr.fir_filter_ccf(2, firdes.band_pass(
			1, samp_rate, pass_low, pass_high, pass_trans, firdes.WIN_HAMMING, 6.76))
		self.audio_sink = audio.sink(48000, "", True)

		self.wavfile_sink = gr.wavfile_sink(self.sat_file_name, 1, 11025, 16)
		self.blks2_rational_resampler_xxx_0 = blks2.rational_resampler_fff(
			interpolation=11025,
			decimation=48000,
			taps=None,
			fractional_bw=None,
		)

		##################################################
		# Connections
		##################################################
		self.connect((self.fcd_source_c_1, 0), (self.xlating_fir_filter, 0))
		self.connect((self.xlating_fir_filter, 0), (self.gr_simple_squelch_cc_0, 0))
		self.connect((self.band_pass_filter_0, 0), (self.gr_agc2_xx_0, 0))
		self.connect((self.gr_complex_to_real_0, 0), (self.gr_multiply_const_vxx_0, 0))
		self.connect((self.gr_agc2_xx_0, 0), (self.gr_complex_to_real_0, 0))
		self.connect((self.gr_simple_squelch_cc_0, 0), (self.band_pass_filter_0, 0))
		self.connect((self.gr_multiply_const_vxx_0, 0), (self.audio_sink, 0))
		self.connect((self.gr_multiply_const_vxx_0, 0), (self.audio_sink, 1))
		self.connect((self.gr_complex_to_real_0, 0), (self.blks2_rational_resampler_xxx_0, 0))
		self.connect((self.blks2_rational_resampler_xxx_0, 0), (self.wavfile_sink, 0))
Exemple #3
0
	def __init__(self):
		gr.top_block.__init__(self, "FM Receiver")

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 96000
		self.xlate_filter_taps = xlate_filter_taps = firdes.low_pass(1, samp_rate, 48000, 5000, firdes.WIN_HAMMING, 6.76)
		self.sql_lev = sql_lev = -100
		self.rf_gain = rf_gain = 20
		self.freq = freq = 144800000
		self.af_gain = af_gain = 2

		##################################################
		# Blocks
		##################################################
		self.xlating_fir_filter = gr.freq_xlating_fir_filter_ccc(1, (xlate_filter_taps), 0, samp_rate)
		self.nbfm_normal = blks2.nbfm_rx(
			audio_rate=48000,
			quad_rate=96000,
			tau=75e-6,
			max_dev=5e3,
		)
		self.low_pass_filter = gr.fir_filter_ccf(1, firdes.low_pass(
			1, samp_rate, 12500, 1500, firdes.WIN_HAMMING, 6.76))
		self.gr_simple_squelch_cc_0 = gr.simple_squelch_cc(sql_lev, 1)
		self.gr_multiply_const_vxx_1 = gr.multiply_const_vff((af_gain, ))
		self.fcd_source_c_1 = fcd.source_c("hw:1")
		self.fcd_source_c_1.set_freq(freq)
		self.fcd_source_c_1.set_freq_corr(-32)
		    
		self.audio_sink = audio.sink(48000, "", True)

		##################################################
		# Connections
		##################################################
		self.connect((self.xlating_fir_filter, 0), (self.low_pass_filter, 0))
		self.connect((self.low_pass_filter, 0), (self.gr_simple_squelch_cc_0, 0))
		self.connect((self.gr_multiply_const_vxx_1, 0), (self.audio_sink, 1))
		self.connect((self.gr_multiply_const_vxx_1, 0), (self.audio_sink, 0))
		self.connect((self.gr_simple_squelch_cc_0, 0), (self.nbfm_normal, 0))
		self.connect((self.nbfm_normal, 0), (self.gr_multiply_const_vxx_1, 0))
		self.connect((self.fcd_source_c_1, 0), (self.xlating_fir_filter, 0))
Exemple #4
0
	def __init__(self):
		gr.top_block.__init__(self, "CW/SSB Receiver")

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 96000
		self.xlate_filter_taps = xlate_filter_taps = firdes.low_pass(1, samp_rate, 48000, 5000, firdes.WIN_HAMMING, 6.76)
		self.sql_lev = sql_lev = -100
		self.rf_gain = rf_gain = 20
		self.pass_trans = pass_trans = 600
		self.pass_low = pass_low = 300
		self.pass_high = pass_high = 1200
		self.freq = freq = 144800000
		self.af_gain = af_gain = 5

		##################################################
		# Blocks
		##################################################
		self.xlating_fir_filter = gr.freq_xlating_fir_filter_ccc(1, (xlate_filter_taps), 0, samp_rate)
		self.gr_simple_squelch_cc_0 = gr.simple_squelch_cc(sql_lev, 1)
		self.gr_multiply_const_vxx_0 = gr.multiply_const_vff((af_gain, ))
		self.gr_complex_to_real_0 = gr.complex_to_real(1)
		self.gr_agc2_xx_0 = gr.agc2_cc(1e-1, 20.8e-6, 0.3, 1.0, 0.0)
		self.fcd_source_c_1 = fcd.source_c("hw:1")
		self.fcd_source_c_1.set_freq(freq)
		self.fcd_source_c_1.set_freq_corr(-10)
		    
		self.band_pass_filter_0 = gr.fir_filter_ccf(2, firdes.band_pass(
			1, samp_rate, pass_low, pass_high, pass_trans, firdes.WIN_HAMMING, 6.76))
		self.audio_sink = audio.sink(48000, "", True)

		##################################################
		# Connections
		##################################################
		self.connect((self.fcd_source_c_1, 0), (self.xlating_fir_filter, 0))
		self.connect((self.xlating_fir_filter, 0), (self.gr_simple_squelch_cc_0, 0))
		self.connect((self.band_pass_filter_0, 0), (self.gr_agc2_xx_0, 0))
		self.connect((self.gr_complex_to_real_0, 0), (self.gr_multiply_const_vxx_0, 0))
		self.connect((self.gr_agc2_xx_0, 0), (self.gr_complex_to_real_0, 0))
		self.connect((self.gr_simple_squelch_cc_0, 0), (self.band_pass_filter_0, 0))
		self.connect((self.gr_multiply_const_vxx_0, 0), (self.audio_sink, 0))
		self.connect((self.gr_multiply_const_vxx_0, 0), (self.audio_sink, 1))