Hi,
I try to demodulate a file of a transmit signal file (from matlab). But
I
can not get the correct message. Therefore I need your suggestion.
Below is the code
Thanks
Makmur
#!/usr/bin/env python
from gnuradio import gr
from gnuradio.eng_option import eng_option
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx
class coba_demod(grc_wxgui.top_block_gui):
def init(self):
grc_wxgui.top_block_gui.init(self, title=“Demodulasi transmit
signal”)
##################################################
Variables
##################################################
self.samp_rate = samp_rate = 32000
##################################################
Blocks
##################################################
self.gr_diff_decoder_bb_0 = gr.diff_decoder_bb(5)
self.gr_file_sink_0 = gr.file_sink(gr.sizeof_char1,
“/home/makmur/datacoba”)
self.gr_file_source_0 = gr.file_source(gr.sizeof_char1,
“/home/makmur/transmit_signal.mat”, False)
self.gr_throttle_0 = gr.throttle(gr.sizeof_char*1, samp_rate)
##################################################
Connections
##################################################
self.connect((self.gr_file_source_0, 0), (self.gr_throttle_0, 0))
self.connect((self.gr_throttle_0, 0), (self.gr_diff_decoder_bb_0, 0))
self.connect((self.gr_diff_decoder_bb_0, 0), (self.gr_file_sink_0, 0))
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
if name == ‘main’:
parser = OptionParser(option_class=eng_option, usage="%prog:
[options]")
(options, args) = parser.parse_args()
tb = coba_demod()
tb.Run(True)