GNU Radio 3.7.1 C++ API
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 <gnuradio/digital/api.h>
00026 #include <gnuradio/digital/constellation.h>
00027 #include <gnuradio/digital/ofdm_equalizer_base.h>
00028 
00029 namespace gr {
00030   namespace digital {
00031 
00032     /* \brief Very simple static equalizer for OFDM.
00033      * \ingroup ofdm_blk
00034      * \ingroup equalizers_blk
00035      *
00036      * \details
00037      * This is an extremely simple equalizer. It will only work for
00038      * high-SNR, very, very slowly changing channels.
00039      *
00040      * It simply divides the signal with the currently known channel
00041      * state. Whenever a pilot symbol comes around, it updates the
00042      * channel state on that particular carrier by dividing the
00043      * received symbol with the known pilot symbol.
00044      */
00045     class DIGITAL_API ofdm_equalizer_static : public ofdm_equalizer_1d_pilots
00046     {
00047      public:
00048       typedef boost::shared_ptr<ofdm_equalizer_static> sptr;
00049 
00050       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       ~ofdm_equalizer_static();
00059 
00060       /*! \brief Divide the input signal with the current channel state.
00061        *
00062        * Does the following (and nothing else):
00063        * - Divide every OFDM symbol with the current channel state
00064        * - If a pilot symbol is found, re-set the channel state by dividing the received
00065        *   symbol with the known pilot symbol
00066        */
00067       void equalize(gr_complex *frame,
00068                       int n_sym,
00069                       const std::vector<gr_complex> &initial_taps = std::vector<gr_complex>(),
00070                       const std::vector<tag_t> &tags = std::vector<tag_t>());
00071 
00072       /*
00073        * \param fft_len FFT length
00074        * \param occupied_carriers List of occupied carriers, see ofdm_carrier_allocator
00075        *                          for a description.
00076        * \param pilot_carriers Position of pilot symbols, see ofdm_carrier_allocator
00077        *                          for a description.
00078        * \param pilot_symbols Value of pilot symbols, see ofdm_carrier_allocator
00079        *                          for a description.
00080        * \param symbols_skipped Starting position within occupied_carriers and pilot_carriers.
00081        *                        If the first symbol of the frame was removed (e.g. to decode the
00082        *                        header), set this make sure the pilot symbols are correctly
00083        *                        identified.
00084        * \param input_is_shifted Set this to false if the input signal is not shifted, i.e.
00085        *                         the first input items is on the DC carrier.
00086        *                         Note that a lot of the OFDM receiver blocks operate on shifted
00087        *                         signals!
00088        */
00089       static sptr make(
00090         int fft_len,
00091         const std::vector<std::vector<int> > &occupied_carriers = std::vector<std::vector<int> >(),
00092         const std::vector<std::vector<int> > &pilot_carriers = std::vector<std::vector<int> >(),
00093         const std::vector<std::vector<gr_complex> > &pilot_symbols = std::vector<std::vector<gr_complex> >(),
00094         int symbols_skipped = 0,
00095         bool input_is_shifted = true
00096       );
00097     };
00098 
00099   } /* namespace digital */
00100 } /* namespace gr */
00101 
00102 #endif /* INCLUDED_DIGITAL_OFDM_EQUALIZER_STATIC_H */
00103