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/

相关文章:

c++ - RX channel 超出配置的 RX 前端的范围

python - 使用 Python 在 GNU Radio 中计算 BER 置信度

video - 如何使用 GNURadio 和 USRP 发送视频文件?

python - 从 GNU Radio Companion 获取数据时出现问题 (3.7.11)

gnuradio - osmocom 接收器的输入范围是多少?

python - 导入错误:没有名为 _analog_swig 的模块

linux - 为什么我会收到运行时错误/ key 错误 "no device found for"空设备地址?

python - 在 Python 中处理阻塞函数调用

c++ - 使 : cannot find -lthrift

matlab - 使用 FM radio 传输 .dat 文件时接收正确的值