GNU Radio 3.7.2 C++ API
dc_blocker_cc.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2011,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
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 3, or (at your option)
10  * any later version.
11  *
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.
16  *
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.
21  */
22 
23 #ifndef INCLUDED_FILTER_DC_BLOCKER_CC_H
24 #define INCLUDED_FILTER_DC_BLOCKER_CC_H
25 
26 #include <gnuradio/filter/api.h>
27 #include <gnuradio/sync_block.h>
28 
29 namespace gr {
30  namespace filter {
31 
32  /*!
33  * \brief a computationally efficient controllable DC blocker
34  * \ingroup filter_blk
35  *
36  * \details
37  * This block implements a computationally efficient DC blocker that produces
38  * a tighter notch filter around DC for a smaller group delay than an
39  * equivalent FIR filter or using a single pole IIR filter (though the IIR
40  * filter is computationally cheaper).
41  *
42  * The block defaults to using a delay line of length 32 and the long form
43  * of the filter. Optionally, the delay line length can be changed to alter
44  * the width of the DC notch (longer lines will decrease the width).
45  *
46  * The long form of the filter produces a nearly flat response outside of
47  * the notch but at the cost of a group delay of 2D-2.
48  *
49  * The short form of the filter does not have as flat a response in the
50  * passband but has a group delay of only D-1 and is cheaper to compute.
51  *
52  * The theory behind this block can be found in the paper:
53  *
54  * <B><EM>R. Yates, "DC Blocker Algorithms," IEEE Signal Processing Magazine,
55  * Mar. 2008, pp 132-134.</EM></B>
56  */
57  class FILTER_API dc_blocker_cc : virtual public sync_block
58  {
59  public:
60 
61  // gr::filter::dc_blocker_cc::sptr
63 
64  /*!
65  * Make a DC blocker block.
66  *
67  * \param D (int) the length of the delay line
68  * \param long_form (bool) whether to use long (true, default) or short form
69  */
70  static sptr make(int D, bool long_form);
71 
72  virtual int group_delay() = 0;
73  };
74 
75  } /* namespace filter */
76 } /* namespace gr */
77 
78 #endif /* INCLUDED_FILTER_DC_BLOCKER_CC_H */
boost::shared_ptr< dc_blocker_cc > sptr
Definition: dc_blocker_cc.h:62
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
a computationally efficient controllable DC blocker
Definition: dc_blocker_cc.h:57
synchronous 1:1 input to output with historyOverride work to provide the signal processing implementa...
Definition: sync_block.h:37
#define FILTER_API
Definition: gr-filter/include/gnuradio/filter/api.h:30