[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] How to use forecast()?
From: |
Sammour |
Subject: |
Re: [Discuss-gnuradio] How to use forecast()? |
Date: |
Fri, 6 Aug 2010 06:32:32 -0700 (PDT) |
Hi Eric,
I have a similar issue as the one described above and I have read some of
the examples in the directory provided but they seem to be different from
what I want to implement. I want to collect L samples from N channels and
store them in a buffer, do processing and output a vector of length N. I
wrote the following code but it doesn't seem to be working properly. Some of
them use loops from i=0 to noutput_items*vlen while others use from 0 to
noutput_items. Also some of them don't use the function memcpy.
I am using gr_sync_decimator with set_decimation(L) is written in the block
constructor.
---------------------------------------------------
int my_package::work(.....) {
gr_complexd *out =(gr_complexd *) output_items[0];
const gr_complex *in[N];
for (unsigned int i = 0; i<N; i++)
in[i] = (const gr_complex *) input_items[i];
for (int i = 0; i <noutput_items; i++){
for(unsigned int k=0; k<N; k++)
memcpy(&inbuffer[k][0],&in[k][i*L],L*sizeof(gr_complex)); //inbuffer is
NxL matrix
//Signal processing of inbuffer and storing the result in a
vector
// out_vector of length vect_lengx;
memcpy(out, &out_vector.at(0),
vect_lengx*sizeof(gr_complexd));
out+=vect_lengx;
}//end for
return noutput_items;
}
------------------------------------------------------
Can you help me with this please?
Thanks a lot.
Sammour
--
View this message in context:
http://old.nabble.com/How-to-use-forecast%28%29--tp28705301p29356450.html
Sent from the GnuRadio mailing list archive at Nabble.com.
- Re: [Discuss-gnuradio] How to use forecast()?,
Sammour <=