A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-v2v-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 SIGNET Lab, Department of Information Engineering,
3 * University of Padova
4 *
5 * SPDX-License-Identifier: GPL-2.0-only
6 */
7
8#ifndef THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H
9#define THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H
10
12
13#include "ns3/deprecated.h"
14#include <ns3/mobility-model.h>
15
16namespace ns3
17{
18
19/**
20 * \ingroup propagation
21 *
22 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
23 * for the Urban scenario.
24 */
26{
27 public:
28 /**
29 * \brief Get the type ID.
30 * \return the object TypeId
31 */
32 static TypeId GetTypeId();
33
34 /**
35 * Constructor
36 */
38
39 /**
40 * Destructor
41 */
43
46 delete;
47
48 private:
49 /**
50 * \brief Computes the pathloss between a and b considering that the line of
51 * sight is not obstructed
52 * \param a mobility model of one of the two communicating nodes
53 * \param b mobility model of one of the two communicating nodes
54 * \return pathloss value in dB
55 */
56 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
57
58 /**
59 * \brief Returns the minimum of the two independently generated distances
60 * according to the uniform distribution between the minimum and the maximum
61 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
62 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
63 * for RMa.
64 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
65 * generated. 2D−in distance is used for the O2I penetration losses
66 * calculation according to 3GPP TR 38.901 7.4.3.
67 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
68 *
69 * TODO O2I car penetration loss (TR 38.901 7.4.3.2) not considered
70 *
71 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
72 */
73 double GetO2iDistance2dIn() const override;
74
75 /**
76 * \brief Computes the pathloss between a and b considering that the line of
77 * sight is obstructed by a vehicle
78 * \param a mobility model of one of the two communicating nodes
79 * \param b mobility model of one of the two communicating nodes
80 * \return pathloss value in dB
81 */
82 double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
83
84 /**
85 * \brief Computes the pathloss between a and b considering that the line of
86 * sight is obstructed by a building
87 * \param a mobility model of one of the two communicating nodes
88 * \param b mobility model of one of the two communicating nodes
89 * \return pathloss value in dB
90 */
91 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
92
93 /**
94 * \brief Computes the additional loss due to an obstruction caused by a vehicle
95 * \param a mobility model of one of the two communicating nodes
96 * \param b mobility model of one of the two communicating nodes
97 * \return pathloss value in dB
98 */
100
101 /**
102 * \brief Returns the shadow fading standard deviation
103 * \param a mobility model of one of the two communicating nodes
104 * \param b mobility model of one of the two communicating nodes
105 * \param cond the LOS/NLOS channel condition
106 * \return shadowing std in dB
107 */
110 ChannelCondition::LosConditionValue cond) const override;
111
112 /**
113 * \brief Returns the shadow fading correlation distance
114 * \param cond the LOS/NLOS channel condition
115 * \return shadowing correlation distance in meters
116 */
118
119 int64_t DoAssignStreams(int64_t stream) override;
120
121 double m_percType3Vehicles; //!< percentage of Type 3 vehicles in the scenario (i.e., trucks)
122 Ptr<UniformRandomVariable> m_uniformVar; //!< uniform random variable
123 Ptr<LogNormalRandomVariable> m_logNorVar; //!< log normal random variable
124};
125
126/**
127 * \ingroup propagation
128 *
129 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
130 * for the Highway scenario.
131 */
133{
134 public:
135 /**
136 * \brief Get the type ID.
137 * \return the object TypeId
138 */
139 static TypeId GetTypeId();
140
141 /**
142 * Constructor
143 */
145
146 /**
147 * Destructor
148 */
150
151 private:
152 /**
153 * \brief Computes the pathloss between a and b considering that the line of
154 * sight is not obstructed
155 * \param a mobility model of one of the two communicating nodes
156 * \param b mobility model of one of the two communicating nodes
157 * \return pathloss value in dB
158 */
159 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
160};
161
162} // namespace ns3
163
164#endif /* THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H */
LosConditionValue
Possible values for Line-of-Sight condition.
Smart pointer class similar to boost::intrusive_ptr.
Base class for the 3GPP propagation models.
Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1 for the Highway scenario.
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) 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 37.885, Table 6.2.1-1 for the Urban scenario.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
ThreeGppV2vUrbanPropagationLossModel & operator=(const ThreeGppV2vUrbanPropagationLossModel &)=delete
double GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed by a building.
double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is not obstructed.
ThreeGppV2vUrbanPropagationLossModel(const ThreeGppV2vUrbanPropagationLossModel &)=delete
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetAdditionalNlosvLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Computes the additional loss due to an obstruction caused by a vehicle.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double m_percType3Vehicles
percentage of Type 3 vehicles in the scenario (i.e., trucks)
Ptr< LogNormalRandomVariable > m_logNorVar
log normal random variable
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
double GetLossNlosv(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is obstructed by a vehicle.
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.