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


Python analog.quadrature_demod_cf方法代码示例

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


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

示例1: __init__

# 需要导入模块: from gnuradio import analog [as 别名]
# 或者: from gnuradio.analog import quadrature_demod_cf [as 别名]
def __init__(self, bb_gain=20, destination="localhost", filter_width=20000, freq=0, freq_corr=0, gpredict_port=4532, if_gain=20, offset=50e3, port=7355, rf_gain=40):
        gr.top_block.__init__(self, "FM/FSK receiver for an Airspy device")

        ##################################################
        # Parameters
        ##################################################
        self.bb_gain = bb_gain
        self.destination = destination
        self.filter_width = filter_width
        self.freq = freq
        self.freq_corr = freq_corr
        self.gpredict_port = gpredict_port
        self.if_gain = if_gain
        self.offset = offset
        self.port = port
        self.rf_gain = rf_gain

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 2.5e6
        self.doppler_freq = doppler_freq = freq

        ##################################################
        # Blocks
        ##################################################
        self.rational_resampler_xxx_0 = filter.rational_resampler_ccc(
                interpolation=24,
                decimation=25,
                taps=None,
                fractional_bw=None,
        )
        self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + "rtl" )
        self.osmosdr_source_0.set_sample_rate(samp_rate)
        self.osmosdr_source_0.set_center_freq(freq-offset, 0)
        self.osmosdr_source_0.set_freq_corr(freq_corr, 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(rf_gain, 0)
        self.osmosdr_source_0.set_if_gain(if_gain, 0)
        self.osmosdr_source_0.set_bb_gain(bb_gain, 0)
        self.osmosdr_source_0.set_antenna("", 0)
        self.osmosdr_source_0.set_bandwidth(0, 0)
          
        self.gpredict_doppler_0 = gpredict.doppler(self.set_doppler_freq, "localhost", 4532, False)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(50, (firdes.low_pass(1, samp_rate, filter_width/2.0, filter_width/20.0)), doppler_freq-freq+offset, samp_rate)
        self.blocks_udp_sink_0 = blocks.udp_sink(gr.sizeof_short*1, destination, port, 1472, True)
        self.blocks_float_to_short_0 = blocks.float_to_short(1, 32767)
        self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(0.2)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.analog_quadrature_demod_cf_0, 0), (self.blocks_float_to_short_0, 0))    
        self.connect((self.blocks_float_to_short_0, 0), (self.blocks_udp_sink_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.rational_resampler_xxx_0, 0))    
        self.connect((self.osmosdr_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))    
        self.connect((self.rational_resampler_xxx_0, 0), (self.analog_quadrature_demod_cf_0, 0)) 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:61,代码来源:airspy_fm.py

示例2: __init__

# 需要导入模块: from gnuradio import analog [as 别名]
# 或者: from gnuradio.analog import quadrature_demod_cf [as 别名]
def __init__(self, bb_gain=20, destination="localhost", filter_width=20000, freq=145e6, freq_corr=0, gpredict_port=4532, if_gain=20, offset=40e3, port=7355, rf_gain=40):
        gr.top_block.__init__(self, "FM/FSK receiver for a FUNcube Dongle Pro+ device")

        ##################################################
        # Parameters
        ##################################################
        self.bb_gain = bb_gain
        self.destination = destination
        self.filter_width = filter_width
        self.freq = freq
        self.freq_corr = freq_corr
        self.gpredict_port = gpredict_port
        self.if_gain = if_gain
        self.offset = offset
        self.port = port
        self.rf_gain = rf_gain

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 192e3
        self.doppler_freq = doppler_freq = freq

        ##################################################
        # Blocks
        ##################################################
        self.gpredict_doppler_0 = gpredict.doppler(self.set_doppler_freq, "localhost", 4532, False)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(4, (firdes.low_pass(1, samp_rate, filter_width/2.0, filter_width/20.0)), doppler_freq-freq+offset, samp_rate)
        self.fcdproplus_fcdproplus_0 = fcdproplus.fcdproplus("",1)
        self.fcdproplus_fcdproplus_0.set_lna(0)
        self.fcdproplus_fcdproplus_0.set_mixer_gain(0)
        self.fcdproplus_fcdproplus_0.set_if_gain(0)
        self.fcdproplus_fcdproplus_0.set_freq_corr(0)
        self.fcdproplus_fcdproplus_0.set_freq(freq-offset)
          
        self.blocks_udp_sink_0 = blocks.udp_sink(gr.sizeof_short*1, destination, port, 1472, True)
        self.blocks_float_to_short_0 = blocks.float_to_short(1, 32767)
        self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(0.2)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.analog_quadrature_demod_cf_0, 0), (self.blocks_float_to_short_0, 0))    
        self.connect((self.blocks_float_to_short_0, 0), (self.blocks_udp_sink_0, 0))    
        self.connect((self.fcdproplus_fcdproplus_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_quadrature_demod_cf_0, 0)) 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:48,代码来源:fcdpp_fm.py

示例3: __init__

# 需要导入模块: from gnuradio import analog [as 别名]
# 或者: from gnuradio.analog import quadrature_demod_cf [as 别名]
def __init__(self, bb_gain=20, destination="localhost", filter_width=20000, freq=0, freq_corr=0, gpredict_port=4532, if_gain=20, offset=50e3, port=7355, rf_gain=40):
        gr.top_block.__init__(self, "FM/FSK receiver for an RTL-SDR device")

        ##################################################
        # Parameters
        ##################################################
        self.bb_gain = bb_gain
        self.destination = destination
        self.filter_width = filter_width
        self.freq = freq
        self.freq_corr = freq_corr
        self.gpredict_port = gpredict_port
        self.if_gain = if_gain
        self.offset = offset
        self.port = port
        self.rf_gain = rf_gain

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 2.4e6
        self.doppler_freq = doppler_freq = freq

        ##################################################
        # Blocks
        ##################################################
        self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + "rtl" )
        self.osmosdr_source_0.set_sample_rate(samp_rate)
        self.osmosdr_source_0.set_center_freq(freq-offset, 0)
        self.osmosdr_source_0.set_freq_corr(freq_corr, 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(rf_gain, 0)
        self.osmosdr_source_0.set_if_gain(if_gain, 0)
        self.osmosdr_source_0.set_bb_gain(bb_gain, 0)
        self.osmosdr_source_0.set_antenna("", 0)
        self.osmosdr_source_0.set_bandwidth(0, 0)
          
        self.gpredict_doppler_0 = gpredict.doppler(self.set_doppler_freq, "localhost", 4532, False)
        self.freq_xlating_fir_filter_xxx_0 = filter.freq_xlating_fir_filter_ccc(50, (firdes.low_pass(1, samp_rate, filter_width/2.0, filter_width/20.0)), doppler_freq-freq+offset, samp_rate)
        self.blocks_udp_sink_0 = blocks.udp_sink(gr.sizeof_short*1, destination, port, 1472, True)
        self.blocks_float_to_short_0 = blocks.float_to_short(1, 32767)
        self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(0.2)

        ##################################################
        # Connections
        ##################################################
        self.connect((self.analog_quadrature_demod_cf_0, 0), (self.blocks_float_to_short_0, 0))    
        self.connect((self.blocks_float_to_short_0, 0), (self.blocks_udp_sink_0, 0))    
        self.connect((self.freq_xlating_fir_filter_xxx_0, 0), (self.analog_quadrature_demod_cf_0, 0))    
        self.connect((self.osmosdr_source_0, 0), (self.freq_xlating_fir_filter_xxx_0, 0)) 
开发者ID:daniestevez,项目名称:gr-frontends,代码行数:54,代码来源:rtlsdr_fm.py

示例4: __init__

# 需要导入模块: from gnuradio import analog [as 别名]
# 或者: from gnuradio.analog import quadrature_demod_cf [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

示例5: __init__

# 需要导入模块: from gnuradio import analog [as 别名]
# 或者: from gnuradio.analog import quadrature_demod_cf [as 别名]
def __init__(self, gain=1):
		gr.hier_block2.__init__(
			self, "Split GMSK Modulator",
			gr.io_signature(0, 0, 0),
			gr.io_signature(1, 1, gr.sizeof_float*1),
		)

		##################################################
		# Parameters
		##################################################
		self.gain = gain

		##################################################
		# Blocks
		##################################################
		self.rational_resampler_xxx_0 = filter.rational_resampler_fff(
		        interpolation=1,
		        decimation=2,
		        taps=(1, ),
		        fractional_bw=None,
		)
		self.pad_source_1 = None;self.message_port_register_hier_out("9k6")
		self.pad_source_0 = None;self.message_port_register_hier_out("4k8")
		self.digital_gmskmod_bc_0_0 = digital.gmskmod_bc(10, 3, 0.3)
		self.digital_gmskmod_bc_0 = digital.gmskmod_bc(10, 3, 0.3)
		self.blocks_pdu_to_tagged_stream_0_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, "packet_len")
		self.blocks_pdu_to_tagged_stream_0 = blocks.pdu_to_tagged_stream(blocks.byte_t, "packet_len")
		self.blocks_add_xx_0 = blocks.add_vff(1)
		self.analog_quadrature_demod_cf_0_0 = analog.quadrature_demod_cf(gain)
		self.analog_quadrature_demod_cf_0 = analog.quadrature_demod_cf(gain)

		##################################################
		# Connections
		##################################################
		self.connect((self.blocks_add_xx_0, 0), (self, 0))
		self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.blocks_add_xx_0, 0))
		self.connect((self.digital_gmskmod_bc_0_0, 0), (self.analog_quadrature_demod_cf_0_0, 0))
		self.connect((self.blocks_pdu_to_tagged_stream_0, 0), (self.digital_gmskmod_bc_0_0, 0))
		self.connect((self.analog_quadrature_demod_cf_0, 0), (self.rational_resampler_xxx_0, 0))
		self.connect((self.rational_resampler_xxx_0, 0), (self.blocks_add_xx_0, 1))
		self.connect((self.digital_gmskmod_bc_0, 0), (self.analog_quadrature_demod_cf_0, 0))
		self.connect((self.blocks_pdu_to_tagged_stream_0_0, 0), (self.digital_gmskmod_bc_0, 0))

		##################################################
		# Asynch Message Connections
		##################################################
		self.msg_connect(self, "4k8", self.blocks_pdu_to_tagged_stream_0, "pdus")
		self.msg_connect(self, "9k6", self.blocks_pdu_to_tagged_stream_0_0, "pdus")

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


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