23 #include "ns3/double.h" 
   25 #include "ns3/mobility-model.h" 
   40   static TypeId tid = 
TypeId (
"ns3::ItuR1411NlosOverRooftopPropagationLossModel")
 
   42     .SetGroupName (
"Propagation")
 
   44     .AddAttribute (
"Frequency",
 
   45                    "The Frequency  (default is 2.106 GHz).",
 
   48                    MakeDoubleChecker<double> ())
 
   49     .AddAttribute (
"Environment",
 
   50                    "Environment Scenario",
 
   56     .AddAttribute (
"CitySize",
 
   57                    "Dimension of the city",
 
   63     .AddAttribute (
"RooftopLevel",
 
   64                    "The height of the rooftop level in meters",
 
   67                    MakeDoubleChecker<double> (0.0, 90.0))
 
   68     .AddAttribute (
"StreetsOrientation",
 
   69                    "The orientation of streets in degrees [0,90] with respect to the direction of propagation",
 
   72                    MakeDoubleChecker<double> (0.0, 90.0))
 
   73     .AddAttribute (
"StreetsWidth",
 
   74                    "The width of streets",
 
   77                    MakeDoubleChecker<double> (0.0, 1000.0))
 
   78     .AddAttribute (
"BuildingsExtend",
 
   79                    "The distance over which the buildings extend",
 
   82                    MakeDoubleChecker<double> ())
 
   83     .AddAttribute (
"BuildingSeparation",
 
   84                    "The separation between buildings",
 
   87                    MakeDoubleChecker<double> ());
 
  109                  " Street Orientation must be in [0,90]");
 
  126   NS_ASSERT_MSG (hm > 0 && hb > 0, 
"nodes' height must be greater then 0");
 
  128   double ds = (
m_lambda * distance * distance) / (Dhb * Dhb);
 
  137       if (hb > m_rooftopHeight)
 
  139           Lbsh = -18 * std::log10 (1 + Dhb);
 
  140           ka = (fmhz > 2000 ? 71.4 : 54.0);
 
  149               ka = 54.0 - 1.6 * Dhb * distance / 1000;
 
  153               ka = 54.0 - 0.8 * Dhb;
 
  162           kf = -4 + 0.7 * (fmhz / 925.0 - 1);
 
  166           kf = -4 + 1.5 * (fmhz / 925.0 - 1);
 
  169       Lmsd = Lbsh + ka + kd * std::log10 (distance / 1000.0) + kf * std::log10 (fmhz) - 9.0 * std::log10 (
m_buildingSeparation);
 
  176       if ((hb > m_rooftopHeight - 1.0) && (hb < m_rooftopHeight + 1.0))
 
  178           Qm = m_buildingSeparation / distance;
 
  180       else if (hb > m_rooftopHeight)
 
  182           Qm = 2.35 * pow (Dhb / distance * std::sqrt (m_buildingSeparation / 
m_lambda), 0.9);
 
  186           Qm = m_buildingSeparation / (2 * M_PI * distance) * std::sqrt (
m_lambda / rho) * (1 / theta - (1 / (2 * M_PI + theta)));
 
  188       Lmsd = -10 * std::log10 (Qm * Qm);
 
  190   double Lbf = 32.4 + 20 * std::log10 (distance / 1000) + 20 * std::log10 (fmhz);
 
  191   double Dhm = m_rooftopHeight - hm;
 
  192   double Lrts = -8.2 - 10 * std::log10 (
m_streetsWidth) + 10 * std::log10 (fmhz) + 20 * std::log10 (Dhm) + Lori;
 
  193   NS_LOG_LOGIC (
this << 
" Lbf " << Lbf << 
" Lrts " << Lrts << 
" Dhm" << Dhm << 
" Lmsd "  << Lmsd);
 
  197       loss = Lbf + Lrts + Lmsd;
 
  220   return (txPowerDbm - 
GetLoss (a, b));
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const 
 
the ITU-R 1411 NLOS over rooftop propagation model 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
double GetDistanceFrom(Ptr< const MobilityModel > position) const 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
Vector GetPosition(void) const 
 
double m_frequency
frequency in MHz 
 
double m_rooftopHeight
in meters 
 
double m_streetsWidth
in meters 
 
EnvironmentType m_environment
Environment Scenario. 
 
NS_ASSERT_MSG(false,"Ipv4AddressGenerator::MaskToIndex(): Impossible")
 
Hold variables of type enum. 
 
CitySize m_citySize
Dimension of the city. 
 
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero. ...
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
double m_streetsOrientation
in degrees [0,90] 
 
void SetFrequency(double freq)
Set the operating frequency. 
 
double m_buildingsExtend
in meters 
 
double m_buildingSeparation
in meters 
 
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
 
ItuR1411NlosOverRooftopPropagationLossModel()
 
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const 
Returns the Rx Power taking into account only the particular PropagatinLossModel. ...
 
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name. 
 
Models the propagation loss through a transmission medium. 
 
double m_lambda
wavelength 
 
virtual ~ItuR1411NlosOverRooftopPropagationLossModel()
 
This class can be used to hold variables of floating point type such as 'double' or 'float'...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId.