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"
128 virtual double GetLossLos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const = 0;
139 virtual double GetLossNlos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const = 0;
151 virtual double GetLossNlosv (
double distance2D,
double distance3D,
double hUt,
double hBs)
const;
161 virtual std::pair<double, double>
GetUtAndBsHeights (
double za,
double zb)
const;
294 virtual double GetLossLos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
305 virtual double GetLossNlos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
331 static double Pl1 (
double frequency,
double distance3D,
double h,
double w);
340 static double GetBpDistance (
double frequency,
double hA,
double hB);
398 double GetLossLos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
409 double GetLossNlos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
434 double GetBpDistance (
double hUt,
double hBs,
double distance2D)
const;
489 double GetLossLos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
500 double GetLossNlos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
525 double GetBpDistance (
double hUt,
double hBs,
double distance2D)
const;
533 std::pair<double, double>
GetUtAndBsHeights (
double za,
double zb)
const override;
586 double GetLossLos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
597 double GetLossNlos (
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
double f(double x, void *params)
LosConditionValue
Possible values for Line-of-Sight condition.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the Indoor Office scenario...
ThreeGppIndoorOfficePropagationLossModel(const ThreeGppIndoorOfficePropagationLossModel &)=delete
Copy constructor.
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.
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
Copy constructor.
virtual ~ThreeGppIndoorOfficePropagationLossModel() override
Destructor.
static TypeId GetTypeId(void)
Get the type ID.
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.
ThreeGppIndoorOfficePropagationLossModel()
Constructor.
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.
Base class for the 3GPP propagation models.
double GetLoss(Ptr< ChannelCondition > cond, double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b.
Ptr< ChannelConditionModel > GetChannelConditionModel(void) const
Returns the associated channel condition model.
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.
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the shadowing value by looking at m_shadowingMap.
static double Calculate2dDistance(Vector a, Vector b)
Computes the 2D distance between two 3D vectors.
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model used to determine the channel state (e.g., the LOS/NLOS condition)
static TypeId GetTypeId(void)
Get the type ID.
std::unordered_map< uint32_t, ShadowingMapItem > m_shadowingMap
map to store the shadowing values
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 int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
ThreeGppPropagationLossModel & operator=(const ThreeGppPropagationLossModel &)=delete
Copy constructor.
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading correlation distance.
ThreeGppPropagationLossModel()
Constructor.
ThreeGppPropagationLossModel(const ThreeGppPropagationLossModel &)=delete
Copy constructor.
Ptr< NormalRandomVariable > m_normRandomVariable
normal random variable
Ptr< ChannelConditionModel > m_channelConditionModel
pointer to the channel condition model
virtual ~ThreeGppPropagationLossModel() override
Destructor.
double GetFrequency(void) const
Return the current central frequency.
void SetFrequency(double f)
Set the central frequency of the model.
virtual void DoDispose() override
Destructor implementation.
static uint32_t GetKey(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Returns an unique key for the channel between a and b.
double m_frequency
operating frequency in Hz
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading standard deviation.
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.
virtual std::pair< double, double > GetUtAndBsHeights(double za, double zb) const
Determines hUT and hBS.
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....
bool m_shadowingEnabled
enable/disable shadowing
static Vector GetVectorDifference(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Get the difference between the node position.
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the RMa scenario.
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
static double Pl1(double frequency, double distance3D, double h, double w)
Computes the PL1 formula for the RMa scenario.
ThreeGppRmaPropagationLossModel()
Constructor.
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.
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.
virtual ~ThreeGppRmaPropagationLossModel() override
Destructor.
ThreeGppRmaPropagationLossModel & operator=(const ThreeGppRmaPropagationLossModel &)=delete
Copy constructor.
ThreeGppRmaPropagationLossModel(const ThreeGppRmaPropagationLossModel &)=delete
Copy constructor.
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double m_h
average building height in meters
static TypeId GetTypeId(void)
Get the type ID.
static double GetBpDistance(double frequency, double hA, double hB)
Computes the breakpoint distance for the RMa scenario.
double m_w
average street width in meters
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.
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
Copy constructor.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
virtual ~ThreeGppUmaPropagationLossModel() override
Destructor.
ThreeGppUmaPropagationLossModel()
Constructor.
virtual int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
ThreeGppUmaPropagationLossModel(const ThreeGppUmaPropagationLossModel &)=delete
Copy 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.
Ptr< UniformRandomVariable > m_uniformVar
a uniform random variable used for the computation of the breakpoint distance
static TypeId GetTypeId(void)
Get the type ID.
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMi-Street Canyon scen...
std::pair< double, double > GetUtAndBsHeights(double za, double zb) const override
Determines hUT and hBS.
virtual ~ThreeGppUmiStreetCanyonPropagationLossModel() override
Destructor.
ThreeGppUmiStreetCanyonPropagationLossModel & operator=(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
Copy 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.
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
ThreeGppUmiStreetCanyonPropagationLossModel()
Constructor.
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.
ThreeGppUmiStreetCanyonPropagationLossModel(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
Copy constructor.
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Define a struct for the m_shadowingMap entries.
Vector m_distance
the vector AB
double m_shadowing
the shadowing loss in dB
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition