discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Fading channel in GNURadio


From: Manu T S
Subject: [Discuss-gnuradio] Fading channel in GNURadio
Date: Fri, 22 Mar 2013 01:15:19 +0530

I'm trying to make a block for fading channel model using hierarchical block.


class channel(gr.hier_block2):
    def __init__(self):
        gr.hier_block2.__init__(self, "channel",
                gr.io_signature(1, 1, gr.sizeof_float),
                gr.io_signature(1, 1, gr.sizeof_gr_complex))

        self.taps = generate_taps()
        self.filt = filter.fir_filter_ccc(1, self.taps)
        self.connect(self, self.filt, self)

    def generate_taps():
        n_taps = random.randint(1, 10)
        r_taps = random.rand(n_taps)
        i_taps = random.rand(n_taps)
        return r_taps + 1j*i_taps


I want the block to be able to update the channel filter taps in run time. Can I do that?
Can I define a function in the class so that the filter taps are updated for every 5 seconds?

Thank you.

--
Manu T S

reply via email to

[Prev in Thread] Current Thread [Next in Thread]