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.
22 #ifndef _GRI_MMSE_FIR_INTERPOLATOR_H_
23 #define _GRI_MMSE_FIR_INTERPOLATOR_H_
30 * \brief Compute intermediate samples between signal samples x(k*Ts)
32 * This implements a Mininum Mean Squared Error interpolator with 8 taps.
33 * It is suitable for signals where the bandwidth of interest B = 1/(4*Ts)
34 * Where Ts is the time between samples.
36 * Although mu, the fractional delay, is specified as a float, it is actually
37 * quantized. 0.0 <= mu <= 1.0. That is, mu is quantized in the interpolate
38 * method to 32nd's of a sample.
41 class gri_mmse_fir_interpolator {
43 gri_mmse_fir_interpolator ();
44 ~gri_mmse_fir_interpolator ();
46 unsigned ntaps () const;
47 unsigned nsteps () const;
50 * \brief compute a single interpolated output value.
51 * \p input must have ntaps() valid entries.
52 * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
54 * \p mu must be in the range [0, 1] and specifies the fractional delay.
56 * \returns the interpolated input value.
58 float interpolate (const float input[], float mu) const;
61 std::vector<gr_fir_fff *> filters;
65 #endif /* _GRI_MMSE_FIR_INTERPOLATOR_H_ */