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

标签 gnuradio

我有一个来自 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/

相关文章:

sockets - 将 SO_LINGER 与 udp 套接字一起使用是否有效?

floating-point - 在 gnuradio 中从 Float 转换为 Char 时出错

c++ - GNURADIO:让流标签传递超过一个 block ?

gnuradio - 使用来自 Python 的简单 GNU Radio 流程图时来自 USRP 的电压脉冲

gnuradio - GNU radio + HackRF : RuntimeError: firdes check failed: 0 < fa <= sampling_freq/2

尝试安装 gr-osmosdr 时出现 CMake 错误

c++ - GNU Radio Block 在程序终止时运行代码

linux - cmake 找不到/usr/include/gnuradio/swig/gnuradio.i

python - GnuRadio:在子目录中组织 OOT 模块 python 代码

gnuradio - 尝试在 GNU Radio 中使用我的 USRP 时,出现 "No devices found for ----->"错误