Hey Eric, Michael and other friends:
My code is working well now. But I met two new problems, which are not
crucial, but really important to me.
When I initilize the Viterbi algorithm, I wish that for the first
of data, ninput_items >= Viterbi algorithm’s working length, let’s say
ninput_items > 100 (only for the first trunk of data, doesn’t matter for
later ones). Now I am using assert(ninput_items > 100), which may not
not let me get through. Is there anyway so that I could control the
of incoming samples?
Another problem is more difficult to describe, the following is part
my main code:
def __init__(self, rx_callbackA, rx_callbackB, spb, bt, SNR,
fg = self # Tuning Parameters gain_mu = 0.002*spb omega = spb*(1+freq_error) # transmitter self.packet_transmitterA = gmsk2_mod_pkts(fg, spb=spb, bt=bt) self.packet_transmitterB = gmsk2_mod_pkts(fg, spb=spb, bt=bt) adder = gr.add_cc ()
const = gr.multiply_const_cc (0.5)
filesink = gr.file_sink (gr.sizeof_gr_complex, "added.dat") filesinkA = gr.file_sink (gr.sizeof_gr_complex, "A.dat") filesinkB = gr.file_sink (gr.sizeof_gr_complex, "B.dat") #fg.connect (rx_channel_A, (adder, 0)) #fg.connect (rx_channel_B, (adder, 1)) #fg.connect (noise, (adder, 2)) fg.connect (self.packet_transmitterA, (adder, 0)) fg.connect (self.packet_transmitterB, const, (adder, 1)) # receiver self.packet_receiver = Hamkins_demod_pkts(fg,
fg.connect (adder, self.packet_receiver) fg.connect (adder, filesink) fg.connect (self.packet_transmitterA, filesinkA) fg.connect (const, filesinkB)