User Manual, Developers Guide and API Documentation

SNR2MI.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 <RISE/plmapping/SNR2MI.hpp>
00029 #include <RISE/plmapping/PhyMode.hpp>
00030 #include <WNS/StaticFactoryBroker.hpp>
00031 
00032 using namespace rise;
00033 using namespace rise::plmapping;
00034 using namespace rise::plmapping::Modulations;
00035 
00036 STATIC_FACTORY_BROKER_REGISTER_PLAIN(SNR2MIMap,
00037                                      wns::service::phy::phymode::SNR2MIInterface,
00038                                      "rise.SNR2MI.Table");
00039 
00040 STATIC_FACTORY_BROKER_REGISTER_PLAIN(SNR2MIFormula,
00041                                      wns::service::phy::phymode::SNR2MIInterface,
00042                                      "rise.SNR2MI.Formula");
00043 
00044 /************************* Base Class ***********************/
00045 
00046 double SNR2MI::convertSNR2MIB(const wns::Ratio& snr, const wns::service::phy::phymode::PhyModeInterface& phyMode) const
00047 {
00048     return convertSNR2MI(snr, phyMode) / (double) phyMode.getModulation(); // MI per bit
00049 }
00050 
00051 double SNR2MI::convertSNR2MI(const wns::Ratio& snr, const wns::service::phy::phymode::PhyModeInterface& phyMode) const
00052 {
00053     wns::service::phy::phymode::Modulation modTYPE = phyMode.getModulation();
00054     return mapSNR2MI(snr, modTYPE); // MI
00055 }
00056 
00057 double SNR2MI::convertSNR2MIB(const wns::Ratio& snr, wns::service::phy::phymode::Modulation modTYPE) const
00058 {
00059     return mapSNR2MI(snr, modTYPE) / (double) modTYPE; // MI per bit
00060 }
00061 
00062 
00063 wns::Ratio SNR2MI::convertMIB2SNR(const double& mib, const wns::service::phy::phymode::Modulation& modTYPE) const
00064 {
00065     // nullstellenproblem: find x satisfying f(x)=0 with f(x)=SNR2MI(snr)-mib
00066     // solution: see rootFindByBisection() function in .hpp
00067     const unsigned int maxIterations = 100;
00068     const double accuracy = 1e-6; // determines (runtime) cost of this function
00069     const double &offset = mib; // alias
00070     unsigned int iteration=0;
00071     // initial bracket: [-inf;+inf] would be too much
00072     double x1       = -10.0;
00073     double x2       = 5.0+4.0*modTYPE;
00074     // convertSNR2MIB() should be switched to "formula" mode for best results
00075     double f    = convertSNR2MIB(wns::Ratio().from_dB(x1),modTYPE) - offset;
00076     double fmid = convertSNR2MIB(wns::Ratio().from_dB(x2),modTYPE) - offset;
00077     if (f==0.0)    return wns::Ratio::from_dB(x1);
00078     if (fmid==0.0) return wns::Ratio::from_dB(x2);
00079     // expand bracket if necessary:
00080     //const double expandFactor = 1.6; // numerical recipes recommendation
00081     while((f*fmid>=0.0) && (++iteration<maxIterations)) {
00082         if (f>=0.0) {
00083             //x1+=expandFactor*(x1-x2); // move left
00084             x1-=5.0; // 5dB to the left
00085             f = convertSNR2MIB(wns::Ratio().from_dB(x1),modTYPE) - offset;
00086             if (f==0.0)    return wns::Ratio::from_dB(x1);
00087         }
00088         if (fmid<=0.0) {
00089             //x2+=expandFactor*(x2-x1); // move right
00090             x2+=5.0; // 5dB to the right
00091             fmid = convertSNR2MIB(wns::Ratio().from_dB(x2),modTYPE) - offset;
00092             if (fmid==0.0) return wns::Ratio::from_dB(x2);
00093         }
00094     }
00095     // now bracket should be ok (negative@x1, positive@x2):
00096     assure(f*fmid<0.0, "rootFindByBisection(): Root must be bracketed within ["<<x1<<","<<x2<<"]: f="<<f<<", fmid="<<fmid);
00097     double rtb = (f<0.0) ? x1 : x2;
00098     double dx  = (f<0.0) ? (x2-x1) : (x1-x2);
00099     for(iteration=1; iteration<=maxIterations; iteration++) {
00100         double xmid=rtb+(dx *= 0.5);
00101         fmid = convertSNR2MIB(wns::Ratio().from_dB(xmid),modTYPE) - offset;
00102         if (fmid <= 0.0) rtb=xmid;
00103         if ((fabs(dx) < accuracy) || (fmid == 0.0)) return wns::Ratio::from_dB(rtb);
00104     }
00105     assure(false,"rootFindByBisection(): too many iterations: "<<maxIterations);
00106     return wns::Ratio::from_dB(rtb);
00107 }
00108 
00109 double SNR2MI::BER2MIB(double ber)
00110 {
00111     assure(ber<=1.0,"BER2MIB(): BER must be <= 1.0");
00112     //assure(ber<=0.5+1e-6,"BER2MIB(): BER must be <= 0.5");
00113     assure(ber>=0.0,"BER2MIB(): BER must be >= 0.0");
00114     // http://de.wikipedia.org/wiki/Kanalkapazit%C3%A4t
00115     // result = 1 + ( (1-e)*log2(1-e) + e*log2(e) ); % Matlab code
00116     if (ber<=1e-12) return 1.0; // border value
00117     if (ber>=1.0) return 1.0; // border value
00118     return 1.0 + ( (1.0-ber)*log2(1.0-ber) + ber*log2(ber) );
00119 }
00120 
00121 double SNR2MI::MIB2BER(double mib)
00122 {
00123     //assure(false,"MIB2BER not yet implemented");
00124     if (mib<=0.0) return 0.5;
00125     if (mib>=1.0) return 0.0;
00126     return rootFindByBisection(&BER2MIB, /*offset*/mib, 0.0,0.5, /*accuracy*/1e-6);
00127 }
00128 
00129 
00130 
00131 /************************* Mapping by Formula ***********************/
00132 
00133 double SNR2MIFormula::mapSNR2MI(const wns::Ratio& snr, wns::service::phy::phymode::Modulation modTYPE) const
00134 {
00135     assure(modTYPE > UNDEFINED_MODULATION, "invalid Modulation");
00136     //assure(modTYPE <= MAX_MODULATIONS, "unknown Modulation"); // the formula should be valid for all, even QAM1024...
00137     double shannon = log2(1.0+pow(10.0,(snr.get_dB()/10.0)));
00138     double sf = 0.95 - (modTYPE % 2)*0.08;
00139     double w = 2*modTYPE+1;
00140     double sh = sf * shannon;
00141     // mi = 1./(sh.^(-w) + modIndex^(-w)).^(1/w)
00142     double mi = 1/pow((pow(sh,-w) + pow(modTYPE,-w)),1.0/w);
00143 
00144     return mi; // full MI (not per bit)
00145 }
00146 
00147 
00148 /************************* Mapping by Table ***********************/
00149 
00150 
00151 SNR2MIMap::SNR2MIMap() :
00152     wns::container::Mapping<Modulation, double>(30)
00153 {
00154     initBPSK();
00155     initQPSK();
00156     initQAM8();
00157     initQAM16();
00158     initQAM32();
00159     initQAM64();
00160     //std::cout << "SNR2MI::SNR2MI()" << std::endl;
00161 }
00162 
00163 
00164 
00165 double SNR2MIMap::mapSNR2MI(const wns::Ratio& snr, wns::service::phy::phymode::Modulation modTYPE) const
00166 {
00167     assure(modTYPE > UNDEFINED_MODULATION, "invalid Modulation");
00168     assure(modTYPE <= MAX_MODULATIONS, "unknown Modulation");
00169     assure(modTYPE <= MAX_MODULATIONS_FOR_TABLE, "No table for Modulation");
00170     // handle out-of-range
00171     if (snr >=  wns::Ratio::from_factor(1000))
00172         return ( (double)modTYPE );
00173     if (snr <=  wns::Ratio::from_factor(0.001))
00174         return ( 0.0 );
00175     double snr_dB  = snr.get_dB();
00176     int snr_dB_int = int(floor(snr_dB));
00177     // else do linear interpolation
00178     double lower = map(snr_dB_int   , modTYPE);
00179     double upper = map(snr_dB_int+1 , modTYPE);
00180     double mi  = lower +  ((upper - lower) * (snr_dB - snr_dB_int )); // linear interpolation
00181 
00182     return mi; // full MI (not per bit)
00183 }
00184 
00185 
00186 void SNR2MIMap::initBPSK()
00187 {
00188     mf[BPSK()].resize(61);
00189     mf[BPSK()][  0] = 0  ;
00190     mf[BPSK()][  1] = 0  ;
00191     mf[BPSK()][  2] = 0  ;
00192     mf[BPSK()][  3] = 0  ;
00193     mf[BPSK()][  4] = 0  ;
00194     mf[BPSK()][  5] = 0  ;
00195     mf[BPSK()][  6] = 0  ;
00196     mf[BPSK()][  7] = 0  ;
00197     mf[BPSK()][  8] = 0  ;
00198     mf[BPSK()][  9] = 0  ;
00199     mf[BPSK()][ 10] = 0.014284 ;
00200     mf[BPSK()][ 11] = 0.017937 ;
00201     mf[BPSK()][ 12] = 0.02251    ;
00202     mf[BPSK()][ 13] = 0.028226 ;
00203     mf[BPSK()][ 14] = 0.035357 ;
00204     mf[BPSK()][ 15] = 0.044236 ;
00205     mf[BPSK()][ 16] = 0.055259 ;
00206     mf[BPSK()][ 17] = 0.068899 ;
00207     mf[BPSK()][ 18] = 0.085706 ;
00208     mf[BPSK()][ 19] = 0.10631    ;
00209     mf[BPSK()][ 20] = 0.13142    ;
00210     mf[BPSK()][ 21] = 0.16177    ;
00211     mf[BPSK()][ 22] = 0.19814    ;
00212     mf[BPSK()][ 23] = 0.24123    ;
00213     mf[BPSK()][ 24] = 0.29159    ;
00214     mf[BPSK()][ 25] = 0.34951    ;
00215     mf[BPSK()][ 26] = 0.41482    ;
00216     mf[BPSK()][ 27] = 0.48671    ;
00217     mf[BPSK()][ 28] = 0.5636     ;
00218     mf[BPSK()][ 29] = 0.64297    ;
00219     mf[BPSK()][ 30] = 0.72145    ;
00220     mf[BPSK()][ 31] = 0.79507    ;
00221     mf[BPSK()][ 32] = 0.8598     ;
00222     mf[BPSK()][ 33] = 0.91235    ;
00223     mf[BPSK()][ 34] = 0.95101    ;
00224     mf[BPSK()][ 35] = 0.97618    ;
00225     mf[BPSK()][ 36] = 0.99026    ;
00226     mf[BPSK()][ 37] = 0.9968     ;
00227     mf[BPSK()][ 38] = 0.9992     ;
00228     mf[BPSK()][ 39] = 0.99986    ;
00229     mf[BPSK()][ 40] = 0.99998    ;
00230     mf[BPSK()][ 41] = 1  ;
00231     mf[BPSK()][ 42] = 1  ;
00232     mf[BPSK()][ 43] = 1  ;
00233     mf[BPSK()][ 44] = 1  ;
00234     mf[BPSK()][ 45] = 1  ;
00235     mf[BPSK()][ 46] = 1  ;
00236     mf[BPSK()][ 47] = 1  ;
00237     mf[BPSK()][ 48] = 1  ;
00238     mf[BPSK()][ 49] = 1  ;
00239     mf[BPSK()][ 50] = 1  ;
00240     mf[BPSK()][ 51] = 1  ;
00241     mf[BPSK()][ 52] = 1  ;
00242     mf[BPSK()][ 53] = 1  ;
00243     mf[BPSK()][ 54] = 1  ;
00244     mf[BPSK()][ 55] = 1  ;
00245     mf[BPSK()][ 56] = 1  ;
00246     mf[BPSK()][ 57] = 1  ;
00247     mf[BPSK()][ 58] = 1  ;
00248     mf[BPSK()][ 59] = 1  ;
00249     mf[BPSK()][ 60] = 1  ;
00250 }
00251 void SNR2MIMap::initQPSK()
00252 {
00253     mf[QPSK()].resize(61);
00254     mf[QPSK()][  0] = 0  ;
00255     mf[QPSK()][  1] = 0  ;
00256     mf[QPSK()][  2] = 0  ;
00257     mf[QPSK()][  3] = 0  ;
00258     mf[QPSK()][  4] = 0  ;
00259     mf[QPSK()][  5] = 0  ;
00260     mf[QPSK()][  6] = 0  ;
00261     mf[QPSK()][  7] = 0  ;
00262     mf[QPSK()][  8] = 0  ;
00263     mf[QPSK()][  9] = 0  ;
00264     mf[QPSK()][ 10] = 0.014355 ;
00265     mf[QPSK()][ 11] = 0.018049 ;
00266     mf[QPSK()][ 12] = 0.022686 ;
00267     mf[QPSK()][ 13] = 0.028502 ;
00268     mf[QPSK()][ 14] = 0.035791 ;
00269     mf[QPSK()][ 15] = 0.044915 ;
00270     mf[QPSK()][ 16] = 0.05632    ;
00271     mf[QPSK()][ 17] = 0.070551 ;
00272     mf[QPSK()][ 18] = 0.088268 ;
00273     mf[QPSK()][ 19] = 0.11027    ;
00274     mf[QPSK()][ 20] = 0.13749    ;
00275     mf[QPSK()][ 21] = 0.17103    ;
00276     mf[QPSK()][ 22] = 0.21215    ;
00277     mf[QPSK()][ 23] = 0.26226    ;
00278     mf[QPSK()][ 24] = 0.32286    ;
00279     mf[QPSK()][ 25] = 0.39546    ;
00280     mf[QPSK()][ 26] = 0.48149    ;
00281     mf[QPSK()][ 27] = 0.58207    ;
00282     mf[QPSK()][ 28] = 0.69776    ;
00283     mf[QPSK()][ 29] = 0.82822    ;
00284     mf[QPSK()][ 30] = 0.97189    ;
00285     mf[QPSK()][ 31] = 1.1256     ;
00286     mf[QPSK()][ 32] = 1.2843     ;
00287     mf[QPSK()][ 33] = 1.4413     ;
00288     mf[QPSK()][ 34] = 1.5887     ;
00289     mf[QPSK()][ 35] = 1.7184     ;
00290     mf[QPSK()][ 36] = 1.8238     ;
00291     mf[QPSK()][ 37] = 1.9014     ;
00292     mf[QPSK()][ 38] = 1.952  ;
00293     mf[QPSK()][ 39] = 1.9803     ;
00294     mf[QPSK()][ 40] = 1.9935     ;
00295     mf[QPSK()][ 41] = 1.9984     ;
00296     mf[QPSK()][ 42] = 1.9997     ;
00297     mf[QPSK()][ 43] = 2  ;
00298     mf[QPSK()][ 44] = 2  ;
00299     mf[QPSK()][ 45] = 2  ;
00300     mf[QPSK()][ 46] = 2  ;
00301     mf[QPSK()][ 47] = 2  ;
00302     mf[QPSK()][ 48] = 2  ;
00303     mf[QPSK()][ 49] = 2  ;
00304     mf[QPSK()][ 50] = 2  ;
00305     mf[QPSK()][ 51] = 2  ;
00306     mf[QPSK()][ 52] = 2  ;
00307     mf[QPSK()][ 53] = 2  ;
00308     mf[QPSK()][ 54] = 2  ;
00309     mf[QPSK()][ 55] = 2  ;
00310     mf[QPSK()][ 56] = 2  ;
00311     mf[QPSK()][ 57] = 2  ;
00312     mf[QPSK()][ 58] = 2  ;
00313     mf[QPSK()][ 59] = 2  ;
00314     mf[QPSK()][ 60] = 2  ;
00315 }
00316 
00317 void SNR2MIMap::initQAM8()
00318 {
00319     mf[QAM8()].resize(61);
00320     mf[QAM8()][  0] = 0  ;
00321     mf[QAM8()][  1] = 0  ;
00322     mf[QAM8()][  2] = 0  ;
00323     mf[QAM8()][  3] = 0  ;
00324     mf[QAM8()][  4] = 0  ;
00325     mf[QAM8()][  5] = 0  ;
00326     mf[QAM8()][  6] = 0  ;
00327     mf[QAM8()][  7] = 0  ;
00328     mf[QAM8()][  8] = 0  ;
00329     mf[QAM8()][  9] = 0  ;
00330     mf[QAM8()][ 10] = 0.014324 ;
00331     mf[QAM8()][ 11] = 0.017999 ;
00332     mf[QAM8()][ 12] = 0.022608 ;
00333     mf[QAM8()][ 13] = 0.028379 ;
00334     mf[QAM8()][ 14] = 0.035598 ;
00335     mf[QAM8()][ 15] = 0.044614 ;
00336     mf[QAM8()][ 16] = 0.05585    ;
00337     mf[QAM8()][ 17] = 0.069819 ;
00338     mf[QAM8()][ 18] = 0.087136 ;
00339     mf[QAM8()][ 19] = 0.10852    ;
00340     mf[QAM8()][ 20] = 0.13482    ;
00341     mf[QAM8()][ 21] = 0.167  ;
00342     mf[QAM8()][ 22] = 0.2061     ;
00343     mf[QAM8()][ 23] = 0.25329    ;
00344     mf[QAM8()][ 24] = 0.30976    ;
00345     mf[QAM8()][ 25] = 0.37668    ;
00346     mf[QAM8()][ 26] = 0.45515    ;
00347     mf[QAM8()][ 27] = 0.54608    ;
00348     mf[QAM8()][ 28] = 0.65018    ;
00349     mf[QAM8()][ 29] = 0.7679     ;
00350     mf[QAM8()][ 30] = 0.8994     ;
00351     mf[QAM8()][ 31] = 1.0446     ;
00352     mf[QAM8()][ 32] = 1.2032     ;
00353     mf[QAM8()][ 33] = 1.3746     ;
00354     mf[QAM8()][ 34] = 1.5575     ;
00355     mf[QAM8()][ 35] = 1.7501     ;
00356     mf[QAM8()][ 36] = 1.9493     ;
00357     mf[QAM8()][ 37] = 2.1501     ;
00358     mf[QAM8()][ 38] = 2.3451     ;
00359     mf[QAM8()][ 39] = 2.5252     ;
00360     mf[QAM8()][ 40] = 2.681  ;
00361     mf[QAM8()][ 41] = 2.805  ;
00362     mf[QAM8()][ 42] = 2.894  ;
00363     mf[QAM8()][ 43] = 2.9502     ;
00364     mf[QAM8()][ 44] = 2.9805     ;
00365     mf[QAM8()][ 45] = 2.9939     ;
00366     mf[QAM8()][ 46] = 2.9986     ;
00367     mf[QAM8()][ 47] = 2.9998     ;
00368     mf[QAM8()][ 48] = 3  ;
00369     mf[QAM8()][ 49] = 3  ;
00370     mf[QAM8()][ 50] = 3  ;
00371     mf[QAM8()][ 51] = 3  ;
00372     mf[QAM8()][ 52] = 3  ;
00373     mf[QAM8()][ 53] = 3  ;
00374     mf[QAM8()][ 54] = 3  ;
00375     mf[QAM8()][ 55] = 3  ;
00376     mf[QAM8()][ 56] = 3  ;
00377     mf[QAM8()][ 57] = 3  ;
00378     mf[QAM8()][ 58] = 3  ;
00379     mf[QAM8()][ 59] = 3  ;
00380     mf[QAM8()][ 60] = 3  ;
00381 
00382 }
00383 
00384 void SNR2MIMap::initQAM16()
00385 {
00386     mf[QAM16()].resize(61);
00387     mf[QAM16()][  0] = 0     ;
00388     mf[QAM16()][  1] = 0     ;
00389     mf[QAM16()][  2] = 0     ;
00390     mf[QAM16()][  3] = 0     ;
00391     mf[QAM16()][  4] = 0     ;
00392     mf[QAM16()][  5] = 0     ;
00393     mf[QAM16()][  6] = 0     ;
00394     mf[QAM16()][  7] = 0     ;
00395     mf[QAM16()][  8] = 0     ;
00396     mf[QAM16()][  9] = 0     ;
00397     mf[QAM16()][ 10] = 0.014355 ;
00398     mf[QAM16()][ 11] = 0.018049 ;
00399     mf[QAM16()][ 12] = 0.022686 ;
00400     mf[QAM16()][ 13] = 0.028502 ;
00401     mf[QAM16()][ 14] = 0.035791 ;
00402     mf[QAM16()][ 15] = 0.044915 ;
00403     mf[QAM16()][ 16] = 0.05632   ;
00404     mf[QAM16()][ 17] = 0.070551 ;
00405     mf[QAM16()][ 18] = 0.08827   ;
00406     mf[QAM16()][ 19] = 0.11027   ;
00407     mf[QAM16()][ 20] = 0.1375    ;
00408     mf[QAM16()][ 21] = 0.17105   ;
00409     mf[QAM16()][ 22] = 0.2122    ;
00410     mf[QAM16()][ 23] = 0.26237   ;
00411     mf[QAM16()][ 24] = 0.3231    ;
00412     mf[QAM16()][ 25] = 0.396     ;
00413     mf[QAM16()][ 26] = 0.48263   ;
00414     mf[QAM16()][ 27] = 0.58443   ;
00415     mf[QAM16()][ 28] = 0.70252   ;
00416     mf[QAM16()][ 29] = 0.83759   ;
00417     mf[QAM16()][ 30] = 0.98974   ;
00418     mf[QAM16()][ 31] = 1.1585    ;
00419     mf[QAM16()][ 32] = 1.3427    ;
00420     mf[QAM16()][ 33] = 1.541     ;
00421     mf[QAM16()][ 34] = 1.7517    ;
00422     mf[QAM16()][ 35] = 1.9732    ;
00423     mf[QAM16()][ 36] = 2.2036    ;
00424     mf[QAM16()][ 37] = 2.4413    ;
00425     mf[QAM16()][ 38] = 2.6837    ;
00426     mf[QAM16()][ 39] = 2.9269    ;
00427     mf[QAM16()][ 40] = 3.1639    ;
00428     mf[QAM16()][ 41] = 3.3852    ;
00429     mf[QAM16()][ 42] = 3.5794    ;
00430     mf[QAM16()][ 43] = 3.7371    ;
00431     mf[QAM16()][ 44] = 3.853     ;
00432     mf[QAM16()][ 45] = 3.9285    ;
00433     mf[QAM16()][ 46] = 3.9708    ;
00434     mf[QAM16()][ 47] = 3.9904    ;
00435     mf[QAM16()][ 48] = 3.9976    ;
00436     mf[QAM16()][ 49] = 3.9996    ;
00437     mf[QAM16()][ 50] = 3.9999    ;
00438     mf[QAM16()][ 51] = 4     ;
00439     mf[QAM16()][ 52] = 4     ;
00440     mf[QAM16()][ 53] = 4     ;
00441     mf[QAM16()][ 54] = 4     ;
00442     mf[QAM16()][ 55] = 4     ;
00443     mf[QAM16()][ 56] = 4     ;
00444     mf[QAM16()][ 57] = 4     ;
00445     mf[QAM16()][ 58] = 4     ;
00446     mf[QAM16()][ 59] = 4     ;
00447     mf[QAM16()][ 60] = 4     ;
00448 
00449 }
00450 
00451 void SNR2MIMap::initQAM32()
00452 {
00453     mf[QAM32()].resize(61);
00454     mf[QAM32()][  0] = 0     ;
00455     mf[QAM32()][  1] = 0     ;
00456     mf[QAM32()][  2] = 0     ;
00457     mf[QAM32()][  3] = 0     ;
00458     mf[QAM32()][  4] = 0     ;
00459     mf[QAM32()][  5] = 0     ;
00460     mf[QAM32()][  6] = 0     ;
00461     mf[QAM32()][  7] = 0     ;
00462     mf[QAM32()][  8] = 0     ;
00463     mf[QAM32()][  9] = 0     ;
00464     mf[QAM32()][ 10] = 0.014328 ;
00465     mf[QAM32()][ 11] = 0.018007 ;
00466     mf[QAM32()][ 12] = 0.022619 ;
00467     mf[QAM32()][ 13] = 0.028397 ;
00468     mf[QAM32()][ 14] = 0.035627 ;
00469     mf[QAM32()][ 15] = 0.044658 ;
00470     mf[QAM32()][ 16] = 0.055919 ;
00471     mf[QAM32()][ 17] = 0.069928 ;
00472     mf[QAM32()][ 18] = 0.087305 ;
00473     mf[QAM32()][ 19] = 0.10878   ;
00474     mf[QAM32()][ 20] = 0.13522   ;
00475     mf[QAM32()][ 21] = 0.16761   ;
00476     mf[QAM32()][ 22] = 0.20703   ;
00477     mf[QAM32()][ 23] = 0.25468   ;
00478     mf[QAM32()][ 24] = 0.31183   ;
00479     mf[QAM32()][ 25] = 0.37974   ;
00480     mf[QAM32()][ 26] = 0.45959   ;
00481     mf[QAM32()][ 27] = 0.55248   ;
00482     mf[QAM32()][ 28] = 0.65924   ;
00483     mf[QAM32()][ 29] = 0.78052   ;
00484     mf[QAM32()][ 30] = 0.91665   ;
00485     mf[QAM32()][ 31] = 1.0677    ;
00486     mf[QAM32()][ 32] = 1.2337    ;
00487     mf[QAM32()][ 33] = 1.4141    ;
00488     mf[QAM32()][ 34] = 1.6084    ;
00489     mf[QAM32()][ 35] = 1.8159    ;
00490     mf[QAM32()][ 36] = 2.0353    ;
00491     mf[QAM32()][ 37] = 2.2656    ;
00492     mf[QAM32()][ 38] = 2.5053    ;
00493     mf[QAM32()][ 39] = 2.7533    ;
00494     mf[QAM32()][ 40] = 3.0083    ;
00495     mf[QAM32()][ 41] = 3.2688    ;
00496     mf[QAM32()][ 42] = 3.5331    ;
00497     mf[QAM32()][ 43] = 3.7978    ;
00498     mf[QAM32()][ 44] = 4.0565    ;
00499     mf[QAM32()][ 45] = 4.2996    ;
00500     mf[QAM32()][ 46] = 4.5152    ;
00501     mf[QAM32()][ 47] = 4.6924    ;
00502     mf[QAM32()][ 48] = 4.8249    ;
00503     mf[QAM32()][ 49] = 4.9129    ;
00504     mf[QAM32()][ 50] = 4.9634    ;
00505     mf[QAM32()][ 51] = 4.9875    ;
00506     mf[QAM32()][ 52] = 4.9967    ;
00507     mf[QAM32()][ 53] = 4.9994    ;
00508     mf[QAM32()][ 54] = 4.9999    ;
00509     mf[QAM32()][ 55] = 5     ;
00510     mf[QAM32()][ 56] = 5     ;
00511     mf[QAM32()][ 57] = 5     ;
00512     mf[QAM32()][ 58] = 5     ;
00513     mf[QAM32()][ 59] = 5     ;
00514     mf[QAM32()][ 60] = 5     ;
00515 
00516 }
00517 
00518 void SNR2MIMap::initQAM64()
00519 {
00520     mf[QAM64()].resize(61);
00521     mf[QAM64()][  0] = 0     ;
00522     mf[QAM64()][  1] = 0     ;
00523     mf[QAM64()][  2] = 0     ;
00524     mf[QAM64()][  3] = 0     ;
00525     mf[QAM64()][  4] = 0     ;
00526     mf[QAM64()][  5] = 0     ;
00527     mf[QAM64()][  6] = 0     ;
00528     mf[QAM64()][  7] = 0     ;
00529     mf[QAM64()][  8] = 0     ;
00530     mf[QAM64()][  9] = 0     ;
00531     mf[QAM64()][ 10] = 0.014355 ;
00532     mf[QAM64()][ 11] = 0.018049 ;
00533     mf[QAM64()][ 12] = 0.022686 ;
00534     mf[QAM64()][ 13] = 0.028502 ;
00535     mf[QAM64()][ 14] = 0.035791 ;
00536     mf[QAM64()][ 15] = 0.044915 ;
00537     mf[QAM64()][ 16] = 0.05632   ;
00538     mf[QAM64()][ 17] = 0.070552 ;
00539     mf[QAM64()][ 18] = 0.08827   ;
00540     mf[QAM64()][ 19] = 0.11027   ;
00541     mf[QAM64()][ 20] = 0.1375    ;
00542     mf[QAM64()][ 21] = 0.17105   ;
00543     mf[QAM64()][ 22] = 0.21221   ;
00544     mf[QAM64()][ 23] = 0.26239   ;
00545     mf[QAM64()][ 24] = 0.32314   ;
00546     mf[QAM64()][ 25] = 0.39607   ;
00547     mf[QAM64()][ 26] = 0.48278   ;
00548     mf[QAM64()][ 27] = 0.58474   ;
00549     mf[QAM64()][ 28] = 0.70312   ;
00550     mf[QAM64()][ 29] = 0.83872   ;
00551     mf[QAM64()][ 30] = 0.99177   ;
00552     mf[QAM64()][ 31] = 1.162     ;
00553     mf[QAM64()][ 32] = 1.3484    ;
00554     mf[QAM64()][ 33] = 1.55  ;
00555     mf[QAM64()][ 34] = 1.7652    ;
00556     mf[QAM64()][ 35] = 1.9926    ;
00557     mf[QAM64()][ 36] = 2.2308    ;
00558     mf[QAM64()][ 37] = 2.4786    ;
00559     mf[QAM64()][ 38] = 2.7349    ;
00560     mf[QAM64()][ 39] = 2.9985    ;
00561     mf[QAM64()][ 40] = 3.2686    ;
00562     mf[QAM64()][ 41] = 3.5442    ;
00563     mf[QAM64()][ 42] = 3.8246    ;
00564     mf[QAM64()][ 43] = 4.1087    ;
00565     mf[QAM64()][ 44] = 4.3953    ;
00566     mf[QAM64()][ 45] = 4.6814    ;
00567     mf[QAM64()][ 46] = 4.9613    ;
00568     mf[QAM64()][ 47] = 5.225     ;
00569     mf[QAM64()][ 48] = 5.4601    ;
00570     mf[QAM64()][ 49] = 5.6547    ;
00571     mf[QAM64()][ 50] = 5.8015    ;
00572     mf[QAM64()][ 51] = 5.9   ;
00573     mf[QAM64()][ 52] = 5.9573    ;
00574     mf[QAM64()][ 53] = 5.9852    ;
00575     mf[QAM64()][ 54] = 5.996     ;
00576     mf[QAM64()][ 55] = 5.9992    ;
00577     mf[QAM64()][ 56] = 5.9999    ;
00578     mf[QAM64()][ 57] = 6     ;
00579     mf[QAM64()][ 58] = 6     ;
00580     mf[QAM64()][ 59] = 6     ;
00581     mf[QAM64()][ 60] = 6        ;
00582 
00583 }
00584 
00585 
00586 

Generated on Fri May 25 03:31:58 2012 for openWNS by  doxygen 1.5.5