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
24#include "ns3/deprecated.h"
25#include <ns3/mobility-model.h>
26
27namespace ns3
28{
29
30/**
31 * \ingroup propagation
32 *
33 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
34 * for the Urban scenario.
35 */
37{
38 public:
39 /**
40 * \brief Get the type ID.
41 * \return the object TypeId
42 */
43 static TypeId GetTypeId();
44
45 /**
46 * Constructor
47 */
49
50 /**
51 * Destructor
52 */
54
57 delete;
58
59 private:
60 /**
61 * \brief Computes the pathloss between a and b considering that the line of
62 * sight is not obstructed
63 * \param a mobility model of one of the two communicating nodes
64 * \param b mobility model of one of the two communicating nodes
65 * \return pathloss value in dB
66 */
67 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) 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 a mobility model of one of the two communicating nodes
90 * \param b mobility model of one of the two communicating nodes
91 * \return pathloss value in dB
92 */
93 double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
94
95 /**
96 * \brief Computes the pathloss between a and b considering that the line of
97 * sight is obstructed by a building
98 * \param a mobility model of one of the two communicating nodes
99 * \param b mobility model of one of the two communicating nodes
100 * \return pathloss value in dB
101 */
102 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
103
104 /**
105 * \brief Computes the additional loss due to an obstruction caused by a vehicle
106 * \param a mobility model of one of the two communicating nodes
107 * \param b mobility model of one of the two communicating nodes
108 * \return pathloss value in dB
109 */
111
112 /**
113 * \brief Returns the shadow fading standard deviation
114 * \param a mobility model of one of the two communicating nodes
115 * \param b mobility model of one of the two communicating nodes
116 * \param cond the LOS/NLOS channel condition
117 * \return shadowing std in dB
118 */
121 ChannelCondition::LosConditionValue cond) const override;
122
123 /**
124 * \brief Returns the shadow fading correlation distance
125 * \param cond the LOS/NLOS channel condition
126 * \return shadowing correlation distance in meters
127 */
129
130 int64_t DoAssignStreams(int64_t stream) override;
131
132 double m_percType3Vehicles; //!< percentage of Type 3 vehicles in the scenario (i.e., trucks)
133 Ptr<UniformRandomVariable> m_uniformVar; //!< uniform random variable
134 Ptr<LogNormalRandomVariable> m_logNorVar; //!< log normal random variable
135};
136
137/**
138 * \ingroup propagation
139 *
140 * \brief Implements the pathloss model defined in 3GPP TR 37.885, Table 6.2.1-1
141 * for the Highway scenario.
142 */
144{
145 public:
146 /**
147 * \brief Get the type ID.
148 * \return the object TypeId
149 */
150 static TypeId GetTypeId();
151
152 /**
153 * Constructor
154 */
156
157 /**
158 * Destructor
159 */
161
162 private:
163 /**
164 * \brief Computes the pathloss between a and b considering that the line of
165 * sight is not obstructed
166 * \param a mobility model of one of the two communicating nodes
167 * \param b mobility model of one of the two communicating nodes
168 * \return pathloss value in dB
169 */
170 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
171};
172
173} // namespace ns3
174
175#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(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:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.