gpt4 book ai didi

gnuradio - 使用 GNU Radio 转换后从 rtl_sdr 打开一个 .cfile

转载 作者:行者123 更新时间:2023-12-04 16:49:54 25 4
gpt4 key购买 nike

我有一个来自 rtl_sdr 工具的二进制文件 (capture.bin)。我使用本手册将其转换为 .cfile http://sdr.osmocom.org/trac/wiki/rtl-sdr#Usingthedata

我在哪里可以得到这个文件中的数据?目标是从源获得数字格式输出。这可能吗?

最佳答案

这实际上包含在 a GNU Radio FAQ entry 中.

What is the file format of a file_sink? How can I read files produced by a file sink?

All files are in pure binary format. Just bits. That’s it. A floating point data stream is saved as 32 bits in the file, one after the other. A complex signal has 32 bits for the real part and 32 bits for the imaginary part. Reading back a complex number means reading in 32 bits, saving that to the real part of a complex data structure, and then reading in the next 32 bits as the imaginary part of the data structure. And just keep reading the data.

Take a look at the Octave and Python files in gr-utils for reading in data using Octave and Python’s Scipy module.

The exception to the format is when using the metadata file format. These files are produced by the File Meta Sink: http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1file__meta__sink.html block and read by the File Meta Source block. >See the manual page on the metadata file format for more information about how to deal with these files.

A one-line Python command to read the entire file into a numpy array is:

f = scipy.fromfile(open("filename"), dtype=scipy.uint8)

Replace the dtype with scipy.int16, scipy.int32, scipy.float32, scipy.complex64 or >whatever type you were using.

关于gnuradio - 使用 GNU Radio 转换后从 rtl_sdr 打开一个 .cfile,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22201034/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com