Ejemplo n.º 1
0
    def test_100(self):
        ''' Test complex feedforward agc with constant input '''

        length = 8
        gain = 2
        
        input_data = 8*(0.0,) + 24*(1.0,) + 24*(0.0,)
        expected_result = (8+length-1)*(0.0,) + 24*(gain*1.0,) + (0,)

        src = blocks.vector_source_c(input_data)
        agc = analog.feedforward_agc_cc(8, 2.0)
        dst = blocks.vector_sink_c()
        self.tb.connect(src, agc, dst)

        self.tb.run()
        dst_data = dst.data()[0:len(expected_result)]

        self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
Ejemplo n.º 2
0
    def test_100(self):
        ''' Test complex feedforward agc with constant input '''

        length = 8
        gain = 2

        input_data = 8 * (0.0, ) + 24 * (1.0, ) + 24 * (0.0, )
        expected_result = (8 + length - 1) * (0.0, ) + 24 * (gain * 1.0, ) + (
            0, )

        src = blocks.vector_source_c(input_data)
        agc = analog.feedforward_agc_cc(8, 2.0)
        dst = blocks.vector_sink_c()
        self.tb.connect(src, agc, dst)

        self.tb.run()
        dst_data = dst.data()[0:len(expected_result)]

        self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
Ejemplo n.º 3
0
    def test_100(self):
        """ Test complex feedforward agc with constant input """

        length = 8
        gain = 2

        input_data = 8 * (0.0,) + 24 * (1.0,) + 24 * (0.0,)
        expected_result = (8 + length - 1) * (0.0,) + 24 * (gain * 1.0,) + (0,)

        src = gr.vector_source_c(input_data)
        agc = analog.feedforward_agc_cc(8, 2.0)
        dst = gr.vector_sink_c()
        self.tb.connect(src, agc, dst)

        if test_output == True:
            self.tb.connect(agc, gr.file_sink(gr.sizeof_gr_complex, "test_feedforward_cc.dat"))

        self.tb.run()
        dst_data = dst.data()[0 : len(expected_result)]

        self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)
Ejemplo n.º 4
0
    def test_100(self):
        ''' Test complex feedforward agc with constant input '''

        length = 8
        gain = 2

        input_data = 8 * (0.0, ) + 24 * (1.0, ) + 24 * (0.0, )
        expected_result = (8 + length - 1) * (0.0, ) + 24 * (gain * 1.0, ) + (
            0, )

        src = gr.vector_source_c(input_data)
        agc = analog.feedforward_agc_cc(8, 2.0)
        dst = gr.vector_sink_c()
        self.tb.connect(src, agc, dst)

        if test_output == True:
            self.tb.connect(
                agc,
                gr.file_sink(gr.sizeof_gr_complex, "test_feedforward_cc.dat"))

        self.tb.run()
        dst_data = dst.data()[0:len(expected_result)]

        self.assertComplexTuplesAlmostEqual(expected_result, dst_data, 4)