当前位置: 首页>>代码示例>>Python>>正文


Python digital.clock_recovery_mm_ff方法代码示例

本文整理汇总了Python中gnuradio.digital.clock_recovery_mm_ff方法的典型用法代码示例。如果您正苦于以下问题:Python digital.clock_recovery_mm_ff方法的具体用法?Python digital.clock_recovery_mm_ff怎么用?Python digital.clock_recovery_mm_ff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gnuradio.digital的用法示例。


在下文中一共展示了digital.clock_recovery_mm_ff方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from gnuradio import digital [as 别名]
# 或者: from gnuradio.digital import clock_recovery_mm_ff [as 别名]
def __init__(self, dc_block_len=1000, samp_per_sym=10, rx_bit_inv=1):
		gr.hier_block2.__init__(
			self, "GMSK Demodulator",
			gr.io_signature(1, 1, gr.sizeof_float*1),
			gr.io_signature(1, 1, gr.sizeof_char*1),
		)

		##################################################
		# Parameters
		##################################################
		self.dc_block_len = dc_block_len
		self.samp_per_sym = samp_per_sym
		self.rx_bit_inv = rx_bit_inv

		##################################################
		# Variables
		##################################################
		self.samp_rate = samp_rate = 48000

		##################################################
		# Blocks
		##################################################
		self.digital_clock_recovery_mm_xx_0_0 = digital.clock_recovery_mm_ff(samp_per_sym*(1+0.0), 0.25*0.175*0.175, 0.5, 0.175, 0.005)
		self.digital_binary_slicer_fb_0_0 = digital.binary_slicer_fb()
		self.dc_blocker_xx_0 = filter.dc_blocker_ff(dc_block_len, False)
		self.blocks_multiply_const_vxx_0_0 = blocks.multiply_const_vff((rx_bit_inv, ))

		##################################################
		# Connections
		##################################################
		self.connect((self.dc_blocker_xx_0, 0), (self.blocks_multiply_const_vxx_0_0, 0))
		self.connect((self.digital_clock_recovery_mm_xx_0_0, 0), (self.digital_binary_slicer_fb_0_0, 0))
		self.connect((self.blocks_multiply_const_vxx_0_0, 0), (self.digital_clock_recovery_mm_xx_0_0, 0))
		self.connect((self.digital_binary_slicer_fb_0_0, 0), (self, 0))
		self.connect((self, 0), (self.dc_blocker_xx_0, 0))


# QT sink close method reimplementation 
开发者ID:kappiman,项目名称:beesat-sdr,代码行数:40,代码来源:signal_demodulator.py

示例2: __init__

# 需要导入模块: from gnuradio import digital [as 别名]
# 或者: from gnuradio.digital import clock_recovery_mm_ff [as 别名]
def __init__(self):
        gr.top_block.__init__(self)

        ##################################################
        # Variables
        ##################################################
        self.throttle_rate = throttle_rate = 4000000
        self.samp_rate = samp_rate = 400000
        self.samp_per_sym = samp_per_sym = samp_rate/9910.0
        self.fsk_deviation_hz = fsk_deviation_hz = 41000

        ##################################################
        # Blocks
        ##################################################
        if usefile:
            self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, 'driverecording400kHz.cfile', False)
            # Adjust offset depending on where carrier is
            self.freqadj=10000
            self.decim=1
            throttle_rate=400000
        else:
            self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + '' )
            self.osmosdr_source_0.set_sample_rate(throttle_rate)
            self.osmosdr_source_0.set_center_freq(316e6, 0)
            self.osmosdr_source_0.set_freq_corr(4, 0)
            self.osmosdr_source_0.set_dc_offset_mode(0, 0)
            self.osmosdr_source_0.set_iq_balance_mode(0, 0)
            self.osmosdr_source_0.set_gain_mode(False, 0)
            self.osmosdr_source_0.set_gain(14, 0)
            self.osmosdr_source_0.set_if_gain(30, 0)
            self.osmosdr_source_0.set_bb_gain(20, 0)
            self.osmosdr_source_0.set_antenna('', 0)
            self.osmosdr_source_0.set_bandwidth(0, 0)
            self.freqadj=-1.015e6
            self.decim=10

        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(self.decim, (firdes.low_pass(1, throttle_rate, 180000, 20000, firdes.WIN_HAMMING, 6.76)), self.freqadj, throttle_rate)

        self.low_pass_filter_0 = filter.fir_filter_fff(1, firdes.low_pass(1, samp_rate, 8000, 5000, firdes.WIN_HAMMING, 6.76))
        self.digital_correlate_access_code_bb_0 = digital.correlate_access_code_bb('000111111001', 0)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(samp_per_sym*(1+0.0), 0.25*0.175*0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_tpmsrx_sink_0 = tpmsrx()
        self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(samp_rate/(2*math.pi*fsk_deviation_hz/8.0))

        ##################################################
        # Connections
        ##################################################
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_quadrature_demod_cf_0, 0))
        if usefile:
                self.connect((self.blocks_file_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))    
        else:
                self.connect((self.osmosdr_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))
        self.connect((self.analog_quadrature_demod_cf_0, 0), (self.low_pass_filter_0, 0))    
        self.connect((self.low_pass_filter_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))    
        self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_correlate_access_code_bb_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))    
        self.connect((self.digital_correlate_access_code_bb_0, 0), (self.blocks_tpmsrx_sink_0, 0)) 
开发者ID:xnk,项目名称:pacific-tpms,代码行数:60,代码来源:tpmsrecv.py

示例3: __init__

# 需要导入模块: from gnuradio import digital [as 别名]
# 或者: from gnuradio.digital import clock_recovery_mm_ff [as 别名]
def __init__(self):
        gr.top_block.__init__(self, "Top Block")

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 4000
        self.lpf = lpf = firdes.low_pass_2(1, 4000, 30, 10, 40)
        self.baud_rate = baud_rate = 31.25
        self.tune_freq = tune_freq = 2003
        self.sps = sps = int(samp_rate / 4 / baud_rate)
        self.lpf_len = lpf_len = len(lpf)
        self.audio_samp_rate = audio_samp_rate = 44100

        ##################################################
        # Blocks
        ##################################################
        self.rational_resampler_xxx_2 = filter.rational_resampler_ccc(
                interpolation=4000,
                decimation=44100,
                taps=None,
                fractional_bw=None,
        )
        self.psk31_varicode_dec_b_0 = psk31.varicode_dec_b()
        self.hilbert_fc_1 = filter.hilbert_fc(65, firdes.WIN_HAMMING, 6.76)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(4, (lpf), tune_freq-2000, samp_rate)
        self.fir_filter_xxx_0 = filter.fir_filter_ccc(sps/4, ([math.sin(math.pi*t/sps) / 50 / math.pi for t in xrange(sps)]))
        self.fir_filter_xxx_0.declare_sample_delay(0)
        self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
        self.digital_costas_loop_cc_1 = digital.costas_loop_cc(2*math.pi/2/100, 2, False)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(4*(1+0.0), 0.25*0.175*0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_float*1, audio_samp_rate*10,True)
        self.blocks_rotator_cc_0 = blocks.rotator_cc(2*math.pi*-2000/audio_samp_rate)
        self.blocks_not_xx_0 = blocks.not_bb()
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.blocks_and_const_xx_0 = blocks.and_const_bb(1)
        self.audio_source_0 = audio.source(audio_samp_rate, "", True)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.audio_source_0, 0), (self.blocks_throttle_0, 0))    
        self.connect((self.blocks_and_const_xx_0, 0), (self.psk31_varicode_dec_b_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))    
        self.connect((self.blocks_not_xx_0, 0), (self.blocks_and_const_xx_0, 0))    
        self.connect((self.blocks_rotator_cc_0, 0), (self.rational_resampler_xxx_2, 0))    
        self.connect((self.blocks_throttle_0, 0), (self.hilbert_fc_1, 0))    
        self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_diff_decoder_bb_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))    
        self.connect((self.digital_costas_loop_cc_1, 0), (self.fir_filter_xxx_0, 0))    
        self.connect((self.digital_diff_decoder_bb_0, 0), (self.blocks_not_xx_0, 0))    
        self.connect((self.fir_filter_xxx_0, 0), (self.blocks_complex_to_real_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.digital_costas_loop_cc_1, 0))    
        self.connect((self.hilbert_fc_1, 0), (self.blocks_rotator_cc_0, 0))    
        self.connect((self.rational_resampler_xxx_2, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) 
开发者ID:0xsh,项目名称:Workshops,代码行数:58,代码来源:psk31_rx-no-gfx.py

示例4: __init__

# 需要导入模块: from gnuradio import digital [as 别名]
# 或者: from gnuradio.digital import clock_recovery_mm_ff [as 别名]
def __init__(self):
        gr.top_block.__init__(self, "Top Block")

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 4000
        self.lpf = lpf = firdes.low_pass_2(1, 4000, 30, 10, 40)
        self.baud_rate = baud_rate = 31.25
        self.tune_freq = tune_freq = 2000
        self.sps = sps = int(samp_rate / 4 / baud_rate)
        self.lpf_len = lpf_len = len(lpf)
        self.audio_samp_rate = audio_samp_rate = 44100

        ##################################################
        # Blocks
        ##################################################
        self.rational_resampler_xxx_2 = filter.rational_resampler_ccc(
                interpolation=4000,
                decimation=44100,
                taps=None,
                fractional_bw=None,
        )
        self.psk31_varicode_dec_b_0 = psk31.varicode_dec_b()
        self.hilbert_fc_1 = filter.hilbert_fc(65, firdes.WIN_HAMMING, 6.76)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(4, (lpf), tune_freq-2000, samp_rate)
        self.fir_filter_xxx_0 = filter.fir_filter_ccc(sps/4, ([math.sin(math.pi*t/sps) / 50 / math.pi for t in xrange(sps)]))
        self.fir_filter_xxx_0.declare_sample_delay(0)
        self.digital_diff_decoder_bb_0 = digital.diff_decoder_bb(2)
        self.digital_costas_loop_cc_1 = digital.costas_loop_cc(2*math.pi/2/100, 2, False)
        self.digital_clock_recovery_mm_xx_0 = digital.clock_recovery_mm_ff(4*(1+0.0), 0.25*0.175*0.175, 0.5, 0.175, 0.005)
        self.digital_binary_slicer_fb_0 = digital.binary_slicer_fb()
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_float*1, audio_samp_rate*10,True)
        self.blocks_rotator_cc_0 = blocks.rotator_cc(2*math.pi*-2000/audio_samp_rate)
        self.blocks_not_xx_0 = blocks.not_bb()
        self.blocks_complex_to_real_0 = blocks.complex_to_real(1)
        self.blocks_and_const_xx_0 = blocks.and_const_bb(1)
        self.audio_source_0 = audio.source(audio_samp_rate, "", True)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.audio_source_0, 0), (self.blocks_throttle_0, 0))    
        self.connect((self.blocks_and_const_xx_0, 0), (self.psk31_varicode_dec_b_0, 0))    
        self.connect((self.blocks_complex_to_real_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))    
        self.connect((self.blocks_not_xx_0, 0), (self.blocks_and_const_xx_0, 0))    
        self.connect((self.blocks_rotator_cc_0, 0), (self.rational_resampler_xxx_2, 0))    
        self.connect((self.blocks_throttle_0, 0), (self.hilbert_fc_1, 0))    
        self.connect((self.digital_binary_slicer_fb_0, 0), (self.digital_diff_decoder_bb_0, 0))    
        self.connect((self.digital_clock_recovery_mm_xx_0, 0), (self.digital_binary_slicer_fb_0, 0))    
        self.connect((self.digital_costas_loop_cc_1, 0), (self.fir_filter_xxx_0, 0))    
        self.connect((self.digital_diff_decoder_bb_0, 0), (self.blocks_not_xx_0, 0))    
        self.connect((self.fir_filter_xxx_0, 0), (self.blocks_complex_to_real_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.digital_costas_loop_cc_1, 0))    
        self.connect((self.hilbert_fc_1, 0), (self.blocks_rotator_cc_0, 0))    
        self.connect((self.rational_resampler_xxx_2, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) 
开发者ID:0xsh,项目名称:Workshops,代码行数:58,代码来源:psk31_rx-no-gfx.py


注:本文中的gnuradio.digital.clock_recovery_mm_ff方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。