How to read and store minimum value displayed on the frequency sink in GNU Radio - Python code

111 views Asked by At

I am trying to read and store the gain value of the received signal using the QT GUI Frequency Sink block in GNU Radio. Is there any block that I can use to store this value?

Here is the graph that shows the gain of the signal: Frequency SInk

The stored value in this case should be around -19.8 dB: Value to store

1

There are 1 answers

0
Marcus Müller On

No, there isn't. A visualization is a visualization!

You want to programmatically calculate a spectrum estimate, find the maximum value, and safe that to a "File Sink" directly. That's easy:

  • source
  • -> stream to vector (vector length: desired FFT length)
  • -> FFT (length: desired fft length)
  • -> complex to mag² (vector length: fft length)
  • -> Max (vector length: fft length)
  • -> log10 (n=10)
  • -> File sink

In case this seems like a challenge, you'll want to read the official tutorials on https://tutorials.gnuradio.org; and, I generally recommend reading the block documentation (linked from the "Documentation" tab in the block properties dialog), especially on the File Sink.