GNU Radio C++ API Reference  g65ab7ea
The Free & Open Software Radio Ecosystem
mmse_fir_interpolator.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2002,2007,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * SPDX-License-Identifier: GPL-3.0-or-later
8  *
9  */
10 #ifndef INCLUDED_MMSE_FIR_INTERPOLATOR_H
11 #define INCLUDED_MMSE_FIR_INTERPOLATOR_H
12 
13 #include <gnuradio/filter/api.h>
15 #include <gnuradio/gr_complex.h>
16 #include <vector>
17 
18 namespace gr {
19 namespace filter {
20 
21 /*!
22  * \brief Compute intermediate samples between signal samples x(k*Ts)
23  * \ingroup filter_primitive
24  *
25  * \details
26  * This implements a Minimum Mean Squared Error interpolator with
27  * 8 taps. It is suitable for signals where the bandwidth of
28  * interest B = 1/(4*Ts) Where Ts is the time between samples.
29  *
30  * Although mu, the fractional delay, is specified as a float, it
31  * is actually quantized. 0.0 <= mu <= 1.0. That is, mu is
32  * quantized in the interpolate method to 32nd's of a sample.
33  *
34  * For more information, in the GNU Radio source code, see:
35  * \li gr-filter/lib/gen_interpolator_taps/README
36  * \li gr-filter/lib/gen_interpolator_taps/praxis.txt
37  */
38 template <typename sample_t>
40 {
41 public:
44 
45  unsigned ntaps() const;
46  unsigned nsteps() const;
47 
48  /*!
49  * \brief compute a single interpolated output value.
50  *
51  * \p input must have ntaps() valid entries and be 8-byte aligned.
52  * input[0] .. input[ntaps() - 1] are referenced to compute the output value.
53  * \throws std::invalid_argument if input is not 8-byte aligned.
54  *
55  * \p mu must be in the range [0, 1] and specifies the fractional delay.
56  *
57  * \returns the interpolated input value.
58  */
59  sample_t interpolate(const sample_t input[], float mu) const;
60 
61 protected:
62  std::vector<kernel::fir_filter<sample_t, sample_t, float>> filters;
63 };
64 
65 } /* namespace filter */
66 } /* namespace gr */
67 
68 #endif /* INCLUDED_MMSE_FIR_INTERPOLATOR_H */
Compute intermediate samples between signal samples x(k*Ts)
Definition: mmse_fir_interpolator.h:40
mmse_fir_interpolator(mmse_fir_interpolator &&)=default
std::vector< kernel::fir_filter< sample_t, sample_t, float > > filters
Definition: mmse_fir_interpolator.h:62
sample_t interpolate(const sample_t input[], float mu) const
compute a single interpolated output value.
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
GNU Radio logging wrapper.
Definition: basic_block.h:29