User Manual, Developers Guide and API Documentation

NoCorrelationZF.cpp

Go to the documentation of this file.
00001 /*******************************************************************************
00002  * This file is part of openWNS (open Wireless Network Simulator)
00003  * _____________________________________________________________________________
00004  *
00005  * Copyright (C) 2004-2007
00006  * Chair of Communication Networks (ComNets)
00007  * Kopernikusstr. 5, D-52074 Aachen, Germany
00008  * phone: ++49-241-80-27910,
00009  * fax: ++49-241-80-22242
00010  * email: info@openwns.org
00011  * www: http://www.openwns.org
00012  * _____________________________________________________________________________
00013  *
00014  * openWNS is free software; you can redistribute it and/or modify it under the
00015  * terms of the GNU Lesser General Public License version 2 as published by the
00016  * Free Software Foundation;
00017  *
00018  * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY
00019  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
00020  * A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00021  * details.
00022  *
00023  * You should have received a copy of the GNU Lesser General Public License
00024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00025  *
00026  ******************************************************************************/
00027 
00028 #include <OFDMAPHY/receiver/mimo/NoCorrelationZF.hpp>
00029 #include <OFDMAPHY/receiver/Receiver.hpp>
00030 
00031 
00032 using namespace ofdmaphy::receiver::mimo;
00033 
00034 STATIC_FACTORY_REGISTER_WITH_CREATOR(NoCorrelationZF,
00035                                      ICalculationStrategy,
00036                                      "NoCorrelationZF",
00037                                      ICalculationStrategyCreator);
00038 
00039 NoCorrelationZF::NoCorrelationZF(const wns::pyconfig::View& _config,
00040                                  Receiver* _rx,
00041                                  wns::logger::Logger* _logger):
00042     ICalculationStrategy(_config, _rx, _logger),
00043     logger(_logger),
00044     rx(_rx)
00045 {
00046 
00047 }
00048 
00049 std::vector<wns::Ratio>
00050 NoCorrelationZF::getPostProcessingSINRFactor(rise::TransmissionObjectPtr t)
00051 {
00052     int n_SS = t->getNumberOfSpatialStreams();
00053     int n_RX = rx->getOFDMAStation()->getNumAntennas();
00054 
00055     if(n_SS > n_RX)
00056     {
00057         // More streams than receive antennas -> no usefull reception possible
00058         return std::vector<wns::Ratio>(n_SS, wns::Ratio::from_factor(1e-12));
00059     }
00060 
00061     MESSAGE_SINGLE(NORMAL, *logger, "postProcessingSINR with n_SS " << n_SS << " and n_Rx " << n_RX << "-> " << double(n_RX - n_SS + 1)/double(n_SS));
00062 
00063     return std::vector<wns::Ratio>(n_SS,
00064                                    wns::Ratio::from_factor(double(n_RX - n_SS + 1)/double(n_SS)));
00065 }
00066 
00067 
00068 

Generated on Fri May 25 03:32:19 2012 for openWNS by  doxygen 1.5.5