GNU Radio Manual and C++ API Reference  3.10.9.1
The Free & Open Software Radio Ecosystem
filter_delay_fc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012 Free Software Foundation, Inc.
4  * Copyright 2021 Marcus Müller
5  *
6  * This file is part of GNU Radio
7  *
8  * SPDX-License-Identifier: GPL-3.0-or-later
9  *
10  */
11 
12 #ifndef INCLUDED_FILTER_FILTER_DELAY_FC_H
13 #define INCLUDED_FILTER_FILTER_DELAY_FC_H
14 
15 #include <gnuradio/filter/api.h>
16 #include <gnuradio/sync_block.h>
17 
18 namespace gr {
19 namespace filter {
20 
21 /*!
22  * \brief Filter-Delay Combination Block
23  * \ingroup filter_blk
24  *
25  * \details
26  * The purpose of this block is to compensate the delay that a linear-phase filter
27  * introduces.
28  *
29  * It does that by introducing a delay of half the length of the FIR tap vector on
30  * passed-through samples.
31  *
32  * The block takes one or two float stream and outputs a stream composed of pairs of
33  * floats. (In GNU Radio, pairs of floats are identical to complex numbers, where the real
34  * and imaginary parts are the first and second element, respectively.)
35  *
36  * If only one float stream is input, the first element of each output item is a delayed
37  * version of this input and the second element is the filtered output.
38  *
39  * If two floats are connected to the input, then the first element of each output item is
40  * the delayed version of the first input, and the second element is the filtered second
41  * input.
42  *
43  * The delay in the first elements of the output accounts for the group delay introduced
44  * by the filter in the second elements path under the assumption of linear-phase
45  * filtering. The filter taps need to be calculated before initializing this block.
46  */
47 class FILTER_API filter_delay_fc : virtual public sync_block
48 {
49 public:
50  typedef std::shared_ptr<filter_delay_fc> sptr;
51 
52  /*!
53  * Build a filter with delay block.
54  *
55  * \param taps the vector of real-valued tags. Half of the length of this vector is
56  * the delay introduced by this block.
57  */
58  static sptr make(const std::vector<float>& taps);
59 };
60 
61 } /* namespace filter */
62 } /* namespace gr */
63 
64 #endif /* INCLUDED_FILTER_FILTER_DELAY_FC_H */
Filter-Delay Combination Block.
Definition: filter_delay_fc.h:48
std::shared_ptr< filter_delay_fc > sptr
Definition: filter_delay_fc.h:50
static sptr make(const std::vector< float > &taps)
synchronous 1:1 input to output with history
Definition: sync_block.h:26
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:18
static constexpr float taps[NSTEPS+1][NTAPS]
Definition: interpolator_taps.h:9
GNU Radio logging wrapper.
Definition: basic_block.h:29