Hello!
I’m new to GNU Radio and USRP.
I’ve done this simple code below.
class topBlock(gr.top_block):
def init(self):
gr.top_block.init(self)
fftsize = 256
udecim = 256
mywin = window.blackmanharris(fftsize)
fft = gr.fft_vcc(fftsize, True, mywin)
signal = usrp.source_c(0,udecim)
ss2v = gr.stream_to_vector(gr.sizeof_gr_complex, fftsize)
v2ss = gr.vector_to_stream(gr.sizeof_gr_complex, fftsize)
c2f = gr.complex_to_float(fftsize)
v_sink = gr.vector_sink_c()
f_sink = gr.file_sink(gr.sizeof_gr_complex, "fft.data")
self.connect(signal, ss2v, fft, v2ss, f_sink)
def main():
print “Initilizing…”
tb = topBlock()
print “Flowgraph start…”
tb.run()
print “Exiting…”
if name == “main”:
main()
The thing is that I don’t know what kind of values is the fft giving to
the
f_sink,
because if a load them on octave using “y=read_complex_binary(…)”, a
run
plot(abs(y(1:256))
it does come close to what I saw using the GUI version.
Without looking at the scales there should be a spike in the middle of
the
graph.
http://www.nabble.com/file/p22457062/scrsht.png
Shouldn’t the first 256 values be the first fft computed from the
flowgraph?
Thank you in advance!
–
View this message in context:
http://www.nabble.com/fft_vcc---file_sink-tp22457062p22457062.html
Sent from the GnuRadio mailing list archive at Nabble.com.