GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
ofdm_equalizer_static.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /* Copyright 2012 Free Software Foundation, Inc.
3  *
4  * This file is part of GNU Radio
5  *
6  * GNU Radio is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3, or (at your option)
9  * any later version.
10  *
11  * GNU Radio is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with GNU Radio; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street,
19  * Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
23 #define INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
24 
25 #include <gnuradio/digital/api.h>
28 
29 namespace gr {
30 namespace digital {
31 
32 /*!
33  * \brief Very simple static equalizer for OFDM.
34  * \ingroup ofdm_blk
35  * \ingroup equalizers_blk
36  *
37  * \details
38  * This is an extremely simple equalizer. It will only work for
39  * high-SNR, very, very slowly changing channels.
40  *
41  * It simply divides the signal with the currently known channel
42  * state. Whenever a pilot symbol comes around, it updates the
43  * channel state on that particular carrier by dividing the
44  * received symbol with the known pilot symbol.
45  */
47 {
48 public:
49  typedef boost::shared_ptr<ofdm_equalizer_static> sptr;
50 
51  ofdm_equalizer_static(int fft_len,
52  const std::vector<std::vector<int>>& occupied_carriers =
53  std::vector<std::vector<int>>(),
54  const std::vector<std::vector<int>>& pilot_carriers =
55  std::vector<std::vector<int>>(),
56  const std::vector<std::vector<gr_complex>>& pilot_symbols =
57  std::vector<std::vector<gr_complex>>(),
58  int symbols_skipped = 0,
59  bool input_is_shifted = true);
61 
62  /*! \brief Divide the input signal with the current channel state.
63  *
64  * Does the following (and nothing else):
65  * - Divide every OFDM symbol with the current channel state
66  * - If a pilot symbol is found, re-set the channel state by dividing the received
67  * symbol with the known pilot symbol
68  */
69  void equalize(gr_complex* frame,
70  int n_sym,
71  const std::vector<gr_complex>& initial_taps = std::vector<gr_complex>(),
72  const std::vector<tag_t>& tags = std::vector<tag_t>());
73 
74  /*
75  * \param fft_len FFT length
76  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
77  * for a description.
78  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
79  * for a description.
80  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
81  * for a description.
82  * \param symbols_skipped Starting position within occupied_carriers and
83  * pilot_carriers. If the first symbol of the frame was removed (e.g. to decode the
84  * header), set this make sure the pilot symbols are correctly
85  * identified.
86  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
87  * the first input items is on the DC carrier.
88  * Note that a lot of the OFDM receiver blocks operate on
89  * shifted signals!
90  */
91  static sptr make(int fft_len,
92  const std::vector<std::vector<int>>& occupied_carriers =
93  std::vector<std::vector<int>>(),
94  const std::vector<std::vector<int>>& pilot_carriers =
95  std::vector<std::vector<int>>(),
96  const std::vector<std::vector<gr_complex>>& pilot_symbols =
97  std::vector<std::vector<gr_complex>>(),
98  int symbols_skipped = 0,
99  bool input_is_shifted = true);
100 };
101 
102 } /* namespace digital */
103 } /* namespace gr */
104 
105 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
std::complex< float > gr_complex
Definition: gr_complex.h:27
Very simple static equalizer for OFDM.
Definition: ofdm_equalizer_static.h:46
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
boost::shared_ptr< ofdm_equalizer_static > sptr
Definition: ofdm_equalizer_static.h:49
Definition: ofdm_equalizer_base.h:69