Can I use uhd_fft or gnu-radio to display the spectrum with adjustable frequency resolution

I am trying to use the uhd_fft or gnu-radio scope in a way that it can
show
a real-time spectrum but with adjustable resolution. The uhd_fft
spectrum
resolution appears to be fixed and not changeable. The gnu-radio scope
block
only puts out time series but not real-time spectrum. What is my way out
of
this situation?

Thanks,

LD

Hi LD,

you’re right the QT GUI sink does not seem to care about changing FFT
sizes.
I remember the set_fft_size function being implemented, I think it’s
mainly a matter of having a callback defined for changes of the fft size
parameter.
As I’m not too familiar with that, my mileage when playing with the QT
sinks may vary.
Could you try adding
set_frequency_range($fc, $bw)
to gr-qtqui/grc/qtgui_freq_sink_x.xml where the other callbacks are
defined and try if it works for you?

Greetings,
Marcus

Hi!
On 04.06.2014 01:05, Marcus M. wrote:

set_frequency_range($fc, $bw)
to gr-qtqui/grc/qtgui_freq_sink_x.xml where the other callbacks are
defined and try if it works for you?
Sorry, copied the wrong line.
What I wanted to paste was:
set_fft_size($fftsize)

Greetings,
Marcus

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So I couldn’t resist, and the line that would actually call the
set_fft_size callback function correctly would’ve been
set_fft_size(min(int($fftsize),4))

However, QT Gui spectacularly SEGFAULTs on me when doing that.
That actually happens in
line 123 of gr-qtgui/lib/freqdisplayform.cc :

d_sizemenu->getActionFromSize(newsize)->setChecked(true);

which might be some relict from older times, but I can’t really tell.
I hope someone more familiar with the qtgui infrastructure might chime
in.

Greetings,
Marcus

On 04.06.2014 01:14, Marcus M. wrote:

_______________________________________________ Discuss-gnuradio
mailing list [email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTjlvFAAoJEBQ6EdjyzlHtIN4IAMHXlNAi86/E+Y3oSc8WkjEQ
Hyh370ab55EaFrbvHYb9yLEXjC7hS1ccBLIpbMSKIRrHL/Z4rfIfMzlhEF4LA2cW
TSJ0ydXb+KktRJ7bQ+V62RIufcyUXZc4OWZjfYvjT42GIzgUZAp3kI18n6Ohfeta
FfoNWUnFJMxywYlgIE7QUgUYWIwMq4FTMGqNjGbBL8Jn6/RE7X8kJbnErjqNUprH
Rx96MSj1MBiZrDPuPKYCgj8LR1c00jALorgA8lXtpYK1gufjSmYO0Bjol179kegb
nQFPhMy6cfZChy8cTP0oBxQmC9aPrPtpCmHBcBCoDCIZxcUBU/x4TEEejgFM64g=
=s2I+
-----END PGP SIGNATURE-----

On Tue, Jun 3, 2014 at 4:35 PM, Marcus Müller [email protected]
wrote:

I hope someone more familiar with the qtgui infrastructure might chime in.

Hey Marcus,

Did you try debugging the SEGFAULT using gdb? This is a good reference
to
try:
http://www.unknownroad.com/rtfm/gdbtut/gdbsegfault.html

Hi!

Alfredo: Jep, did that. GDB was how I figured out things went wrong in
FreqDisplayForm::setFFTSize() in the first place :).
J?rg: Interesting; but the error is quite reproducibly at the same
place; I’ll try to set a breakpoint at the kernel call and see if that
happens again. But that will require some gdb magic (so that GDB only
interrupts program flow when the fft size changes), and that’s
definitively something that would be worthwhile to learn, however I’m
postponing this for now for reasons of time available.

Greetings,
Marcus

I think it’s going wrong in getActionFromSize, which easy as it
looks[1], I don’t get the hang of.
Why do we need a specific QAction based on the FFT length we’re setting?
And why does an FFT size of 4 lead to negative indices in a QList?

Anyway, the actual bug was on my side, as I was constantly setting an
FFT size of 4. Which seemingly doesn’t work.
@LD: try
set_fft_size(max(int($fftsize),32))
instead. I was then able to change the displayed FFT on the fly using QT
Gui sliders [2].

Greetings,
Marcus

[1] gr-qtgui/include/gnuradio/qtgui/form_menus.h
[2] https://gist.github.com/marcusmueller/edfef568a92821261f9f , the
adjustable_qtgui_fft.grc file should load nicely in a 3.7.4 GNU Radio, I
think it should work with 3.7.x

Hey,

I know another GSoC Student has problems with the a GT GUI sink as well.
It would randomly SEGFAULT in a volk multiply kernel. I think it is the
volk_32_fc_32f_multiply_32fc kernel used in
waterfall_sink_X_impl::fft(). This kernel takes the FFT size as an input
argument, so it could be related to your problem. I just had a quick
glance at it so I am not sure though. I’ll ask him to post his exact
problem when he arrives at the lab. Maybe he can shed a bit more light
on this problem

-Jan

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs