discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: How to perform FFT shift after FFT?


From: Ron Economos
Subject: Re: How to perform FFT shift after FFT?
Date: Mon, 22 Aug 2022 05:05:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

Just look at the code for the FFT block.

https://github.com/gnuradio/gnuradio/blob/main/gr-fft/lib/fft_v_fftw.cc#L81

Ron

On 8/22/22 03:37, Bartłomiej Sójka wrote:
Hi,
I'm trying to write a block that would compute FFT on the received samples, but 
I'm having trouble with finding how to perform FFT shift after the computation. 
Any help with that?
So far I'm using

d_fft = std::make_unique<fft::fft_complex_fwd>(d_fftsize);

memcpy(d_fft->get_inbuf(), d_fft_processed.data(), 
d_fftsize*sizeof(gr_complex)); //get samples from input and store them in input 
buffer
d_fft->execute(); // compute the fft
memcpy(d_fft_processed.data(), d_fft->get_outbuf(), 
d_fftsize*sizeof(gr_complex)); //get processed samples from output buffer and 
storing them in d_fft_processed

I'll appreciate any help
Bartek




reply via email to

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