20 #ifndef THREE_GPP_PROPAGATION_LOSS_MODEL_H    21 #define THREE_GPP_PROPAGATION_LOSS_MODEL_H    23 #include "ns3/propagation-loss-model.h"    24 #include "ns3/channel-condition-model.h"   135   virtual double GetLossLos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const = 0;
   146   virtual double GetLossNlos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const = 0;
   158   virtual double GetLossNlosv (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const;
   168   virtual std::pair<double, double> 
GetUtAndBsHeights (
double za, 
double zb) 
const;
   301   virtual double GetLossLos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   312   virtual double GetLossNlos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   338   static double Pl1 (
double frequency, 
double distance3D, 
double h, 
double w);
   347   static double GetBpDistance (
double frequency, 
double hA, 
double hB);
   414   double GetLossLos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   425   double GetLossNlos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   450   double GetBpDistance (
double hUt, 
double hBs, 
double distance2D) 
const;
   505   double GetLossLos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   516   double GetLossNlos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   541   double GetBpDistance (
double hUt, 
double hBs, 
double distance2D) 
const;
   549   std::pair<double, double> 
GetUtAndBsHeights (
double za, 
double zb) 
const override;
   602   double GetLossLos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
   613   double GetLossNlos (
double distance2D, 
double distance3D, 
double hUt, 
double hBs) 
const override;
 std::unordered_map< uint32_t, ShadowingMapItem > m_shadowingMap
map to store the shadowing values 
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMi-Street Canyon scen...
ThreeGppRmaPropagationLossModel()
Constructor. 
Ptr< ChannelConditionModel > m_channelConditionModel
pointer to the channel condition model 
Smart pointer class similar to boost::intrusive_ptr. 
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition 
virtual int64_t DoAssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading correlation distance. 
double GetLoss(Ptr< ChannelCondition > cond, double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b. 
double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is obstructed. 
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation. 
virtual double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const =0
Computes the pathloss between a and b considering that the line of sight is not obstructed. 
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation. 
static double GetBpDistance(double frequency, double hA, double hB)
Computes the breakpoint distance for the RMa scenario. 
virtual ~ThreeGppUmaPropagationLossModel() override
Destructor. 
ThreeGppRmaPropagationLossModel & operator=(const ThreeGppRmaPropagationLossModel &)=delete
Copy constructor. 
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance. 
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the received power by applying the pathloss model described in 3GPP TR 38.901. 
ThreeGppPropagationLossModel()
Constructor. 
virtual ~ThreeGppIndoorOfficePropagationLossModel() override
Destructor. 
static TypeId GetTypeId(void)
Get the type ID. 
ThreeGppUmiStreetCanyonPropagationLossModel & operator=(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
Copy constructor. 
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance. 
ThreeGppIndoorOfficePropagationLossModel()
Constructor. 
double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is obstructed. 
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance. 
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation. 
static double Calculate2dDistance(Vector a, Vector b)
Computes the 2D distance between two 3D vectors. 
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance. 
virtual ~ThreeGppUmiStreetCanyonPropagationLossModel() override
Destructor. 
virtual double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const =0
Computes the pathloss between a and b considering that the line of sight is obstructed. 
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the RMa scenario...
double GetFrequency(void) const
Return the current central frequency. 
bool m_shadowingEnabled
enable/disable shadowing 
Vector m_distance
the vector AB 
double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed. 
double m_w
average street width in meters 
Define a struct for the m_shadowingMap entries. 
double f(double x, void *params)
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
virtual void DoDispose() override
Destructor implementation. 
virtual double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed. 
static Vector GetVectorDifference(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Get the difference between the node position. 
ThreeGppUmaPropagationLossModel()
Constructor. 
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the shadowing value by looking at m_shadowingMap. 
static double Pl1(double frequency, double distance3D, double h, double w)
Computes the PL1 formula for the RMa scenario. 
virtual double GetLossNlosv(double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b considering that the line of sight is obstructed by a vehicle...
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
Copy constructor. 
static TypeId GetTypeId(void)
Get the type ID. 
Ptr< ChannelConditionModel > GetChannelConditionModel(void) const
Returns the associated channel condition model. 
Models the propagation loss through a transmission medium. 
std::pair< double, double > GetUtAndBsHeights(double za, double zb) const override
Determines hUT and hBS. 
double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is obstructed. 
void SetFrequency(double f)
Set the central frequency of the model. 
static TypeId GetTypeId(void)
Get the type ID. 
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model used to determine the channel state (e.g., the LOS/NLOS condition) ...
double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed. 
double m_shadowing
the shadowing loss in dB 
ThreeGppPropagationLossModel & operator=(const ThreeGppPropagationLossModel &)=delete
Copy constructor. 
double m_frequency
operating frequency in Hz 
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance. 
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation. 
Base class for the 3GPP propagation models. 
virtual int64_t DoAssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
virtual double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is obstructed. 
double m_h
average building height in meters 
static TypeId GetTypeId(void)
Get the type ID. 
ThreeGppUmiStreetCanyonPropagationLossModel()
Constructor. 
static uint32_t GetKey(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Returns an unique key for the channel between a and b. 
LosConditionValue
Possible values for Line-of-Sight condition. 
virtual std::pair< double, double > GetUtAndBsHeights(double za, double zb) const
Determines hUT and hBS. 
a unique identifier for an interface. 
Ptr< UniformRandomVariable > m_uniformVar
a uniform random variable used for the computation of the breakpoint distance 
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMa scenario...
double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed. 
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the Indoor Office scenario...
static TypeId GetTypeId(void)
Get the type ID. 
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
Copy constructor. 
virtual ~ThreeGppPropagationLossModel() override
Destructor. 
virtual ~ThreeGppRmaPropagationLossModel() override
Destructor. 
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading standard deviation. 
Ptr< NormalRandomVariable > m_normRandomVariable
normal random variable