GNU Radio 3.6.5.1 C++ API
digital_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 <digital_api.h>
26 #include <digital_constellation.h>
28 
31 
32 /*
33  * \param fft_len FFT length
34  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
35  * for a description.
36  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
37  * for a description.
38  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
39  * for a description.
40  * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
41  * If the first symbol of the frame was removed (e.g. to decode the
42  * header), set this make sure the pilot symbols are correctly
43  * identified.
44  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
45  * the first input items is on the DC carrier.
46  * Note that a lot of the OFDM receiver blocks operate on shifted
47  * signals!
48  */
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 
58 /* \brief Very simple static equalizer for OFDM.
59  * \ingroup ofdm_blk
60  * \ingroup equalizers_blk
61  *
62  * This is an extremely simple equalizer. It will only work for high-SNR, very, very
63  * slowly changing channels.
64  * It simply divides the signal with the currently known channel state. Whenever
65  * a pilot symbol comes around, it updates the channel state on that particular
66  * carrier by dividing the received symbol with the known pilot symbol.
67  */
69 {
70  public:
72  int fft_len,
73  const std::vector<std::vector<int> > &occupied_carriers,
74  const std::vector<std::vector<int> > &pilot_carriers,
75  const std::vector<std::vector<gr_complex> > &pilot_symbols,
76  int symbols_skipped,
77  bool input_is_shifted);
79 
80  /*! \brief Divide the input signal with the current channel state.
81  *
82  * Does the following (and nothing else):
83  * - Divide every OFDM symbol with the current channel state
84  * - If a pilot symbol is found, re-set the channel state by dividing the received
85  * symbol with the known pilot symbol
86  */
87  void equalize(gr_complex *frame,
88  int n_sym,
89  const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
90  const std::vector<gr_tag_t> &tags = std::vector<gr_tag_t>());
91 
92  private:
93 
94 };
95 
96 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
97