GNU Radio Manual and C++ API Reference  3.7.13.4
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 
52  int fft_len,
53  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
54  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
55  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
56  int symbols_skipped = 0,
57  bool input_is_shifted = true
58  );
60 
61  /*! \brief Divide the input signal with the current channel state.
62  *
63  * Does the following (and nothing else):
64  * - Divide every OFDM symbol with the current channel state
65  * - If a pilot symbol is found, re-set the channel state by dividing the received
66  * symbol with the known pilot symbol
67  */
68  void equalize(gr_complex *frame,
69  int n_sym,
70  const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
71  const std::vector<tag_t> &tags = std::vector<tag_t>());
72 
73  /*
74  * \param fft_len FFT length
75  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
76  * for a description.
77  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
78  * for a description.
79  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
80  * for a description.
81  * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
82  * If the first symbol of the frame was removed (e.g. to decode the
83  * header), set this make sure the pilot symbols are correctly
84  * identified.
85  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
86  * the first input items is on the DC carrier.
87  * Note that a lot of the OFDM receiver blocks operate on shifted
88  * signals!
89  */
90  static sptr make(
91  int fft_len,
92  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
93  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
94  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
95  int symbols_skipped = 0,
96  bool input_is_shifted = true
97  );
98  };
99 
100  } /* namespace digital */
101 } /* namespace gr */
102 
103 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
104 
#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
Include this header to use the message passing features.
Definition: logger.h:695
boost::shared_ptr< ofdm_equalizer_static > sptr
Definition: ofdm_equalizer_static.h:49
Definition: ofdm_equalizer_base.h:69