3 * Copyright 2002 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 51 Franklin Street,
20 * Boston, MA 02110-1301, USA.
26 #include <gri_mmse_fir_interpolator_cc.h>
27 #include <gr_fir_util.h>
28 #include <gr_fir_ccf.h>
31 #include "interpolator_taps.h"
33 gri_mmse_fir_interpolator_cc::gri_mmse_fir_interpolator_cc ()
35 filters.resize (NSTEPS + 1);
37 for (int i = 0; i < NSTEPS + 1; i++){
38 std::vector<float> t (&taps[i][0], &taps[i][NTAPS]);
39 filters[i] = gr_fir_util::create_gr_fir_ccf (t);
43 gri_mmse_fir_interpolator_cc::~gri_mmse_fir_interpolator_cc ()
45 for (int i = 0; i < NSTEPS + 1; i++)
50 gri_mmse_fir_interpolator_cc::ntaps () const
56 gri_mmse_fir_interpolator_cc::nsteps () const
62 gri_mmse_fir_interpolator_cc::interpolate (const gr_complex input[], float mu)
64 int imu = (int) rint (mu * NSTEPS);
67 assert (imu <= NSTEPS);
69 gr_complex r = filters[imu]->filter (input);