gnuradio - GNU Radio File Format for the recorded samples -
do know format in gnu radio ( file sink in gnu radio companion) stores samples in binary file?
i need read these samples in matlab, problem file big read in matlab.
i writing program in c++ read binary file.
the file sink dump of data stream. if data stream content simple bytes content of file straightforward. if data stream contained complex numbers file contain list of complex numbers each complex number given 2 floats , each float (usually) 4 bytes.
see files gnuradio/gnuradio-core/src/lib/io/gr_file_sink.cc , gr_file_source.cc implementations of gnuradio file reading , writing blocks.
you use python , gnuradio convert files other format.
from gnuradio import gr # assuming data stream complex numbers. src = gr.file_source(gr.sizeof_gr_complex, "the_file_name") snk = gr.vector_sink_c() tb = gr.top_block() tb.connect(src, snk) tb.run() # complex numbers accessible python list. data = snk.data()
Comments
Post a Comment