GNU Radio 3.6.5 C++ API

digital_ofdm_equalizer_static.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 /* Copyright 2012 Free Software Foundation, Inc.
00003  * 
00004  * This file is part of GNU Radio
00005  * 
00006  * GNU Radio is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 3, or (at your option)
00009  * any later version.
00010  * 
00011  * GNU Radio is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with GNU Radio; see the file COPYING.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street,
00019  * Boston, MA 02110-1301, USA.
00020  */
00021 
00022 #ifndef INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
00023 #define INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H
00024 
00025 #include <digital_api.h>
00026 #include <digital_constellation.h>
00027 #include <digital_ofdm_equalizer_base.h>
00028 
00029 class digital_ofdm_equalizer_static;
00030 typedef boost::shared_ptr<digital_ofdm_equalizer_static> digital_ofdm_equalizer_static_sptr;
00031 
00032 /*
00033  * \param fft_len FFT length
00034  * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
00035  *                          for a description.
00036  * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
00037  *                          for a description.
00038  * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
00039  *                          for a description.
00040  * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
00041  *                        If the first symbol of the frame was removed (e.g. to decode the
00042  *                        header), set this make sure the pilot symbols are correctly
00043  *                        identified.
00044  * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
00045  *                         the first input items is on the DC carrier.
00046  *                         Note that a lot of the OFDM receiver blocks operate on shifted
00047  *                         signals!
00048  */
00049 DIGITAL_API digital_ofdm_equalizer_static_sptr
00050 digital_make_ofdm_equalizer_static(
00051       int fft_len,
00052       const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
00053       const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
00054       const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
00055       int symbols_skipped = 0,
00056       bool input_is_shifted = true);
00057 
00058 /* \brief Very simple static equalizer for OFDM.
00059  * \ingroup ofdm_blk
00060  * \ingroup equalizers_blk
00061  *
00062  * This is an extremely simple equalizer. It will only work for high-SNR, very, very
00063  * slowly changing channels.
00064  * It simply divides the signal with the currently known channel state. Whenever
00065  * a pilot symbol comes around, it updates the channel state on that particular
00066  * carrier by dividing the received symbol with the known pilot symbol.
00067  */
00068 class DIGITAL_API digital_ofdm_equalizer_static : public digital_ofdm_equalizer_1d_pilots
00069 {
00070  public:
00071   digital_ofdm_equalizer_static(
00072       int fft_len,
00073       const std::vector<std::vector<int> > &occupied_carriers,
00074       const std::vector<std::vector<int> > &pilot_carriers,
00075       const std::vector<std::vector<gr_complex> > &pilot_symbols,
00076       int symbols_skipped,
00077       bool input_is_shifted);
00078   ~digital_ofdm_equalizer_static();
00079 
00080   /*! \brief Divide the input signal with the current channel state.
00081    *
00082    * Does the following (and nothing else):
00083    * - Divide every OFDM symbol with the current channel state
00084    * - If a pilot symbol is found, re-set the channel state by dividing the received
00085    *   symbol with the known pilot symbol
00086    */
00087   void equalize(gr_complex *frame,
00088                   int n_sym,
00089                   const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
00090                   const std::vector<gr_tag_t> &tags = std::vector<gr_tag_t>());
00091 
00092  private:
00093 
00094 };
00095 
00096 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
00097