discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to compute FFT and IFFT in C++ OOT?


From: Ron Economos
Subject: Re: How to compute FFT and IFFT in C++ OOT?
Date: Tue, 14 Dec 2021 22:28:55 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

FFT support is built in to GNU Radio with FFTW. Here's how it's done. First, define it in your foo_impl.h file. The options are fft_complex_fwd, fft_complex_rev, fft_real_fwd and fft_real_rev.

https://github.com/drmpeg/gr-paint/blob/master/lib/paint_bc_impl.h#L25

https://github.com/drmpeg/gr-paint/blob/master/lib/paint_bc_impl.h#L41

Then initialize it in your foo_impl.cc constructor.

https://github.com/drmpeg/gr-paint/blob/master/lib/paint_bc_impl.cc#L47

Then execute it.

https://github.com/drmpeg/gr-paint/blob/master/lib/paint_bc_impl.cc#L175-L179

You'll need to add the component in the top level CMakeLists.txt.

https://github.com/drmpeg/gr-paint/blob/master/CMakeLists.txt#L78

And link with it in lib/CMakeLists.txt

https://github.com/drmpeg/gr-paint/blob/master/lib/CMakeLists.txt#L25

If you need a window, you can look at the block implementation file for details.

https://github.com/gnuradio/gnuradio/blob/master/gr-fft/lib/fft_v_fftw.cc

Ron

On 12/14/21 7:53 PM, George Edwards wrote:
 Dear GNURadio Community:

I am writing a C++ OOT block where the signal processing requires the computation of both fft and ifft. Is there any Gnuradio C++ functions for the fft and ifft? If not, is there any way to wrap in Python's libraries with these methods into C++ OOT?

Thank you!

Regards,
George

reply via email to

[Prev in Thread] Current Thread [Next in Thread]