User Manual, Developers Guide and API Documentation

ITUInH.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/scenario/pathloss/ITUInH.hpp>
00029 
00030 #include <WNS/StaticFactoryBroker.hpp>
00031 
00032 STATIC_FACTORY_BROKER_REGISTER(rise::scenario::pathloss::ITUInH, rise::scenario::pathloss::Pathloss, "ITUInH");
00033 
00034 using namespace rise::scenario::pathloss;
00035 
00036 ITUInH::ITUInH(const wns::pyconfig::View& pyco):
00037     ITUPathloss(pyco)
00038 {
00039 }
00040 
00041 double
00042 ITUInH::getLOSProbability(double distance) const
00043 {
00044     if (distance <= 18.0) { return 1; }
00045 
00046     if (distance >= 37.0) { return 0.5; }
00047 
00048     double pLOS = exp(-(distance - 18.0)/27.0);
00049 
00050     return pLOS;
00051 }
00052 
00053 wns::Ratio
00054 ITUInH::getLOSPathloss(const rise::antenna::Antenna& source,
00055                        const rise::antenna::Antenna& target,
00056                        const wns::Frequency& frequency,
00057                        const wns::Distance& distance) const
00058 {
00059     assure(distance > 3.0, "This model is only valid for a minimum distance of 3m");
00060     assure(distance < 100.0, "This model is only valid for a maximum distance of 100m");
00061 
00062     double pl = 32.8 + 16.9 * log10(distance);
00063     // Frequency is given in MHz (model uses GHz)
00064     pl += 20 * log10(frequency/1000.0);
00065 
00066     return wns::Ratio::from_dB(pl);
00067 }
00068 
00069 wns::Ratio
00070 ITUInH::getNLOSPathloss(const rise::antenna::Antenna& source,
00071                         const rise::antenna::Antenna& target,
00072                         const wns::Frequency& frequency,
00073                         const wns::Distance& distance) const
00074 {
00075     assure(distance > 10.0, "This model is only valid for a minimum distance of 10m");
00076     assure(distance < 150.0, "This model is only valid for a maximum distance of 150m");
00077 
00078     double pl = 11.5 + 43.3 * log10(distance);
00079     // Frequency is given in MHz (model uses GHz)
00080     pl += 20 * log10(frequency/1000.0);
00081 
00082     return wns::Ratio::from_dB(pl);
00083 }
00084 
00085 double
00086 ITUInH::getLOSShadowingStd(const rise::antenna::Antenna& source,
00087                            const rise::antenna::Antenna& target,
00088                            const wns::Frequency& frequency,
00089                            const wns::Distance& distance) const
00090 {
00091     assure(distance > 3.0, "This model is only valid for a minimum distance of 3m");
00092     assure(distance < 100.0, "This model is only valid for a maximum distance of 100m");
00093     return 3.0;
00094 }
00095 
00096 double
00097 ITUInH::getNLOSShadowingStd(const rise::antenna::Antenna& source,
00098                             const rise::antenna::Antenna& target,
00099                             const wns::Frequency& frequency,
00100                             const wns::Distance& distance) const
00101 {
00102     assure(distance > 10.0, "This model is only valid for a minimum distance of 10m");
00103     assure(distance < 150.0, "This model is only valid for a maximum distance of 150m");
00104 
00105     return 4.0;
00106 }
00107 
00108 double
00109 ITUInH::getCarPenetrationStd() const
00110 {
00111     return 0.0;
00112 }
00113 
00114 double
00115 ITUInH::getCarPenetrationMean() const
00116 {
00117     return 0.0;
00118 }

Generated on Thu May 24 03:31:56 2012 for openWNS by  doxygen 1.5.5