def test_incoherent_loopback(self): self._loopback_test( modulators.psk31_modulator_bc(), demodulators.psk31_incoherent_demodulator_cc(), demodulators.psk31_constellation_decoder_cb( varicode_decode=True, differential_decode=False, ), )
def __init__(self, mode, input_rate=0, context=None): assert input_rate > 0 self.__input_rate = input_rate gr.hier_block2.__init__( self, type(self).__name__, gr.io_signature(1, 1, gr.sizeof_gr_complex), gr.io_signature(1, 1, gr.sizeof_float)) channel_filter = self.__make_channel_filter() self.__text = u'' self.__char_queue = gr.msg_queue(limit=100) self.__char_sink = blocks.message_sink(gr.sizeof_char, self.__char_queue, True) # The output of the channel filter is oversampled so we don't need to # interpolate for the audio monitor. So we'll downsample before going into # the demodulator. samp_per_sym = 8 downsample = self.__demod_rate / samp_per_sym / self.__symbol_rate assert downsample % 1 == 0 downsample = int(downsample) self.connect( self, channel_filter, blocks.keep_one_in_n(gr.sizeof_gr_complex, downsample), psk31_coherent_demodulator_cc(samp_per_sym=samp_per_sym), psk31_constellation_decoder_cb( varicode_decode=True, differential_decode=True), self.__char_sink) self.connect( channel_filter, blocks.rotator_cc(rotator_inc(self.__demod_rate, self.__audio_frequency)), blocks.complex_to_real(vlen=1), analog.agc2_ff( reference=dB(-10), attack_rate=8e-1, decay_rate=8e-1), self)
def __init__(self, mode, input_rate=0, context=None): assert input_rate > 0 self.__input_rate = input_rate gr.hier_block2.__init__( self, type(self).__name__, gr.io_signature(1, 1, gr.sizeof_gr_complex), gr.io_signature(1, 1, gr.sizeof_float)) channel_filter = self.__make_channel_filter() self.__char_queue = gr.msg_queue(limit=100) self.__char_sink = blocks.message_sink(gr.sizeof_char, self.__char_queue, True) # The output of the channel filter is oversampled so we don't need to # interpolate for the audio monitor. So we'll downsample before going into # the demodulator. samp_per_sym = 8 downsample = self.__demod_rate / samp_per_sym / self.__symbol_rate assert downsample % 1 == 0 downsample = int(downsample) self.connect( self, channel_filter, blocks.keep_one_in_n(gr.sizeof_gr_complex, downsample), psk31_coherent_demodulator_cc(samp_per_sym=samp_per_sym), psk31_constellation_decoder_cb( varicode_decode=True, differential_decode=True), self.__char_sink) self.connect( channel_filter, blocks.rotator_cc(rotator_inc(self.__demod_rate, self.__audio_frequency)), blocks.complex_to_real(vlen=1), analog.agc2_ff( reference=dB(-10), attack_rate=8e-1, decay_rate=8e-1), self)