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 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19#ifndef THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H
20#define THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H
21
23
24namespace ns3
25{
26
27/**
28 * \ingroup propagation
29 *
30 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
31 * for the Urban scenario.
32 */
34{
35 public:
36 /**
37 * \brief Get the type ID.
38 * \return the object TypeId
39 */
40 static TypeId GetTypeId();
41
42 /**
43 * Constructor
44 */
46
47 /**
48 * Destructor
49 */
51
52 // Delete copy constructor and assignment operator to avoid misuse
55 delete;
56
57 private:
58 /**
59 * \brief Computes the pathloss between a and b considering that the line of
60 * sight is not obstructed
61 * \param distance2D the 2D distance between tx and rx in meters
62 * \param distance3D the 3D distance between tx and rx in meters
63 * \param hUt the height of the UT in meters
64 * \param hBs the height of the BS in meters
65 * \return pathloss value in dB
66 */
67 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
68
69 /**
70 * \brief Returns the minimum of the two independently generated distances
71 * according to the uniform distribution between the minimum and the maximum
72 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
73 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
74 * for RMa.
75 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
76 * generated. 2D−in distance is used for the O2I penetration losses
77 * calculation according to 3GPP TR 38.901 7.4.3.
78 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
79 *
80 * TODO O2I car penetration loss (TR 38.901 7.4.3.2) not considered
81 *
82 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
83 */
84 double GetO2iDistance2dIn() const override;
85
86 /**
87 * \brief Computes the pathloss between a and b considering that the line of
88 * sight is obstructed by a vehicle
89 * \param distance2D the 2D distance between tx and rx in meters
90 * \param distance3D the 3D distance between tx and rx in meters
91 * \param hUt the height of the UT in meters
92 * \param hBs the height of the BS in meters
93 * \return pathloss value in dB
94 */
95 double GetLossNlosv(double distance2D,
96 double distance3D,
97 double hUt,
98 double hBs) const override;
99
100 /**
101 * \brief Computes the pathloss between a and b considering that the line of
102 * sight is obstructed by a building
103 * \param distance2D the 2D distance between tx and rx in meters
104 * \param distance3D the 3D distance between tx and rx in meters
105 * \param hUt the height of the UT in meters
106 * \param hBs the height of the BS in meters
107 * \return pathloss value in dB
108 */
109 double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override;
110
111 /**
112 * \brief Computes the additional loss due to an obstruction caused by a vehicle
113 * \param distance3D the 3D distance between tx and rx in meters
114 * \param hUt the height of the UT in meters
115 * \param hBs the height of the BS in meters
116 * \return pathloss value in dB
117 */
118 double GetAdditionalNlosvLoss(double distance3D, double hUt, double hBs) const;
119
120 /**
121 * \brief Returns the shadow fading standard deviation
122 * \param a tx mobility model
123 * \param b rx mobility model
124 * \param cond the LOS/NLOS channel condition
125 * \return shadowing std in dB
126 */
129 ChannelCondition::LosConditionValue cond) const override;
130
131 /**
132 * \brief Returns the shadow fading correlation distance
133 * \param cond the LOS/NLOS channel condition
134 * \return shadowing correlation distance in meters
135 */
137
138 int64_t DoAssignStreams(int64_t stream) override;
139
140 double m_percType3Vehicles; //!< percentage of Type 3 vehicles in the scenario (i.e., trucks)
141 Ptr<UniformRandomVariable> m_uniformVar; //!< uniform random variable
142 Ptr<LogNormalRandomVariable> m_logNorVar; //!< log normal random variable
143};
144
145/**
146 * \ingroup propagation
147 *
148 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
149 * for the Highway scenario.
150 */
152{
153 public:
154 /**
155 * \brief Get the type ID.
156 * \return the object TypeId
157 */
158 static TypeId GetTypeId();
159
160 /**
161 * Constructor
162 */
164
165 /**
166 * Destructor
167 */
169
170 private:
171 /**
172 * \brief Computes the pathloss between a and b considering that the line of
173 * sight is not obstructed
174 * \param distance2D the 2D distance between tx and rx in meters
175 * \param distance3D the 3D distance between tx and rx in meters
176 * \param hUt the height of the UT in meters
177 * \param hBs the height of the BS in meters
178 * \return pathloss value in dB
179 */
180 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
181};
182
183} // namespace ns3
184
185#endif /* THREE_GPP_V2V_PROPAGATION_LOSS_MODEL_H */
LosConditionValue
Possible values for Line-of-Sight condition.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
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(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 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 GetLossNlosv(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 by a vehicle.
ThreeGppV2vUrbanPropagationLossModel(const ThreeGppV2vUrbanPropagationLossModel &)=delete
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 GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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
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 by a building.
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
double GetAdditionalNlosvLoss(double distance3D, double hUt, double hBs) const
Computes the additional loss due to an obstruction caused by a vehicle.
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.