[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] gr_rational_resampler_base_XXX query
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] gr_rational_resampler_base_XXX query |
Date: |
Fri, 12 Jun 2009 12:00:05 -0700 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Jun 12, 2009 at 10:47:11AM +0530, Jesuraj.V wrote:
>
> Dear All,
>
> I have a question in gr_rational_resampler_base_XXX.cc module.
>
> 1. I got 2040 samples instead of 2048 or 2060 samples instead of 2048. Shall
> I use this module for interpolation and decimation? Or any other suitable
> module is available?
>
> 2. In function
>
> void
>
> @NAME@::install_taps (const std::vector<@TAP_TYPE@> &taps)
>
> {
>
> int nfilters = interpolation ();
> int nt = taps.size () / nfilters;
>
> assert (nt * nfilters == (int) taps.size ());
>
> std::vector< std::vector <@TAP_TYPE@> > xtaps (nfilters);
>
> for (int n = 0; n < nfilters; n++)
> xtaps[n].resize (nt);
>
>
> for (int i = 0; i < (int) taps.size(); i++)
> xtaps[i % nfilters][i / nfilters] = taps[i]; ------------> How to
> calculate taps[i] value here. Any table or module?
>
> for (int n = 0; n < nfilters; n++)
> d_firs[n]->set_taps (xtaps[n]);
>
>
> set_history (nt);
> d_updated = false;
>
> Thanks in advance
>
> Regards,
> Jesuraj
Please see gnuradio-core/src/python/gnuradio/blks2impl/rational_resampler.py
from gnuradio import gr, blks2
rr = blks2.rational_resampler_ccf(...)
Eric