GNU Radio 3.7.2 C++ API
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  /* \brief Very simple static equalizer for OFDM.
33  * \ingroup ofdm_blk
34  * \ingroup equalizers_blk
35  *
36  * \details
37  * This is an extremely simple equalizer. It will only work for
38  * high-SNR, very, very slowly changing channels.
39  *
40  * It simply divides the signal with the currently known channel
41  * state. Whenever a pilot symbol comes around, it updates the
42  * channel state on that particular carrier by dividing the
43  * received symbol with the known pilot symbol.
44  */
46  {
47  public:
49 
51  int fft_len,
52  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
53  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
54  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
55  int symbols_skipped = 0,
56  bool input_is_shifted = true
57  );
59 
60  /*! \brief Divide the input signal with the current channel state.
61  *
62  * Does the following (and nothing else):
63  * - Divide every OFDM symbol with the current channel state
64  * - If a pilot symbol is found, re-set the channel state by dividing the received
65  * symbol with the known pilot symbol
66  */
67  void equalize(gr_complex *frame,
68  int n_sym,
69  const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
70  const std::vector<tag_t> &tags = std::vector<tag_t>());
71 
72  /*
73  * \param fft_len FFT length
74  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
75  * for a description.
76  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
77  * for a description.
78  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
79  * for a description.
80  * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
81  * If the first symbol of the frame was removed (e.g. to decode the
82  * header), set this make sure the pilot symbols are correctly
83  * identified.
84  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
85  * the first input items is on the DC carrier.
86  * Note that a lot of the OFDM receiver blocks operate on shifted
87  * signals!
88  */
89  static sptr make(
90  int fft_len,
91  const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
92  const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
93  const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
94  int symbols_skipped = 0,
95  bool input_is_shifted = true
96  );
97  };
98 
99  } /* namespace digital */
100 } /* namespace gr */
101 
102 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
103 
#define DIGITAL_API
Definition: gr-digital/include/gnuradio/digital/api.h:30
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
std::complex< float > gr_complex
Definition: gr_complex.h:27
Definition: ofdm_equalizer_static.h:45
boost::shared_ptr< ofdm_equalizer_static > sptr
Definition: ofdm_equalizer_static.h:48
Definition: ofdm_equalizer_base.h:68