19 #ifndef THREE_GPP_PROPAGATION_LOSS_MODEL_H
20 #define THREE_GPP_PROPAGATION_LOSS_MODEL_H
132 double hBs)
const = 0;
210 double hBs)
const = 0;
222 virtual double GetLossNlosv(
double distance2D,
double distance3D,
double hUt,
double hBs)
const;
319 mutable std::unordered_map<uint32_t, ShadowingMapItem>
329 mutable std::unordered_map<uint32_t, O2iLossMapItem>
383 double GetLossLos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
416 double GetLossNlos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
444 static double Pl1(
double frequency,
double distance3D,
double h,
double w);
453 static double GetBpDistance(
double frequency,
double hA,
double hB);
500 double GetLossLos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
525 double GetLossNlos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
552 double GetBpDistance(
double hUt,
double hBs,
double distance2D)
const;
599 double GetLossLos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
624 double GetLossNlos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
651 double GetBpDistance(
double hUt,
double hBs,
double distance2D)
const;
659 std::pair<double, double>
GetUtAndBsHeights(
double za,
double zb)
const override;
703 double GetLossLos(
double distance2D,
double distance3D,
double hUt,
double hBs)
const override;
728 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...
static TypeId GetTypeId()
Get the type ID.
ThreeGppIndoorOfficePropagationLossModel(const ThreeGppIndoorOfficePropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
~ThreeGppIndoorOfficePropagationLossModel() override
Destructor.
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.
Ptr< ChannelConditionModel > GetChannelConditionModel() const
Returns the associated channel condition model.
virtual double GetO2iLowPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
double GetLoss(Ptr< ChannelCondition > cond, double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b.
Ptr< UniformRandomVariable > m_randomO2iVar2
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
double GetFrequency() const
Return the current central frequency.
Ptr< UniformRandomVariable > m_randomO2iVar1
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
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)
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 bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
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
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading correlation distance.
ThreeGppPropagationLossModel()
Constructor.
ThreeGppPropagationLossModel(const ThreeGppPropagationLossModel &)=delete
Ptr< NormalRandomVariable > m_normRandomVariable
normal random variable
static TypeId GetTypeId()
Get the type ID.
Ptr< ChannelConditionModel > m_channelConditionModel
pointer to the channel condition model
~ThreeGppPropagationLossModel() override
Destructor.
std::unordered_map< uint32_t, O2iLossMapItem > m_o2iLossMap
map to store the o2i Loss values
virtual double GetO2iDistance2dIn() const =0
Returns the minimum of the two independently generated distances according to the uniform distributio...
virtual double GetO2iHighPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
bool IsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Return true if the O2I Building Penetration loss corresponds to a low loss condition.
void SetFrequency(double f)
Set the central frequency of the model.
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.
Ptr< NormalRandomVariable > m_normalO2iLowLossVar
a normal random variable for the calculation of 02i low loss, see TR38.901 Table 7....
double m_frequency
operating frequency in Hz
bool m_enforceRanges
strictly enforce TR 38.901 parameter ranges
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.
Ptr< NormalRandomVariable > m_normalO2iHighLossVar
a normal random variable for the calculation of 02i high loss, see TR38.901 Table 7....
virtual std::pair< double, double > GetUtAndBsHeights(double za, double zb) const
Determines hUT and hBS.
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.
bool m_buildingPenLossesEnabled
enable/disable building penetration losses
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the RMa scenario.
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.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
ThreeGppRmaPropagationLossModel()
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.
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.
~ThreeGppRmaPropagationLossModel() override
Destructor.
ThreeGppRmaPropagationLossModel & operator=(const ThreeGppRmaPropagationLossModel &)=delete
ThreeGppRmaPropagationLossModel(const ThreeGppRmaPropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double m_h
average building height in meters
static TypeId GetTypeId()
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
bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const override
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMa scenario.
static TypeId GetTypeId()
Get the type ID.
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
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
~ThreeGppUmaPropagationLossModel() override
Destructor.
ThreeGppUmaPropagationLossModel()
Constructor.
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
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 GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
Ptr< UniformRandomVariable > m_uniformVar
a uniform random variable used for the computation of the breakpoint distance
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
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.
~ThreeGppUmiStreetCanyonPropagationLossModel() override
Destructor.
ThreeGppUmiStreetCanyonPropagationLossModel & operator=(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
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 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.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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
static TypeId GetTypeId()
Get the type ID.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
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_o2iLossMap entries.
double m_o2iLoss
the o2i loss in dB
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition
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