A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-v2v-channel-condition-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 * Copyright (c) 2020 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19
20#ifndef THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
21#define THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
22
24
25#include "ns3/channel-condition-model.h"
26
27#include <functional>
28
29namespace ns3
30{
31
32class MobilityModel;
33
34/**
35 * \ingroup buildings
36 * \ingroup propagation
37 *
38 * \brief Computes the channel condition for the V2V Urban scenario
39 *
40 * Computes the channel condition following the specifications for the
41 * V2V Urban scenario reported in Table 6.2-1 of 3GPP TR 37.885.
42 *
43 * 3GPP TR 37.885 defines 3 different channel states for vehicular environments:
44 * LOS, NLOS and NLOSv, the latter representing the case in which the LOS path is
45 * blocked by other vehicles in the scenario. The document defines a probabilistic
46 * model to determine if the channel state is LOS or NLOSv, while the NLOS state
47 * is determined in a deterministic way based on the buildings deployed in the
48 * scenario. For this reason, this class makes use of an instance of
49 * BuildingsChannelConditionModel to determine if the LOS is obstructed by
50 * buildings or not.
51 */
53{
54 public:
55 /**
56 * Get the type ID.
57 * \brief Get the type ID.
58 * \return the object TypeId
59 */
60 static TypeId GetTypeId();
61
62 /**
63 * Constructor for the ThreeGppV2vUrbanChannelConditionModel class
64 */
66
67 /**
68 * Destructor for the ThreeGppV2vUrbanChannelConditionModel class
69 */
71
72 private:
73 /**
74 * Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885
75 * for the V2V Urban scenario.
76 *
77 * \param a tx mobility model
78 * \param b rx mobility model
79 * \return the LOS probability
80 */
82
83 /**
84 * Compute the NLOS probability. It determines the presence of obstructions
85 * between the tx and the rx based on the buildings deployed in the scenario.
86 * It returns 1 if the LOS path is obstructed, 0 otherwise.
87 *
88 * \param a tx mobility model
89 * \param b rx mobility model
90 * \return the NLOS probability
91 */
93
95 m_buildingsCcm; //!< used to determine the obstructions due to buildings
96};
97
98/**
99 * \ingroup buildings
100 *
101 * \brief Computes the channel condition for the V2V Highway scenario
102 *
103 * Computes the channel condition following the specifications for the
104 * V2V Highway scenario reported in Table 6.2-1 of 3GPP TR 37.885.
105 *
106 * 3GPP TR 37.885 defines 3 different channel states for vehicular environments:
107 * LOS, NLOS and NLOSv, the latter representing the case in which the LOS path is
108 * blocked by other vehicles in the scenario. The document defines a probabilistic
109 * model to determine if the channel state is LOS or NLOSv, while the NLOS state
110 * is determined in a deterministic way based on the buildings deployed in the
111 * scenario. For this reason, this class makes use of an instance of
112 * BuildingsChannelConditionModel to determine if the LOS is obstructed by
113 * buildings or not.
114 */
116{
117 public:
118 /**
119 * Get the type ID.
120 * \brief Get the type ID.
121 * \return the object TypeId
122 */
123 static TypeId GetTypeId();
124
125 /**
126 * Constructor for the ThreeGppV2vHighwayChannelConditionModel class
127 */
129
130 /**
131 * Destructor for the ThreeGppV2vHighwayChannelConditionModel class
132 */
134
135 private:
136 /**
137 * Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885
138 * for the V2V Highway scenario.
139 *
140 * \param a tx mobility model
141 * \param b rx mobility model
142 * \return the LOS probability
143 */
145
146 /**
147 * Compute the NLOS probability. It determines the presence of obstructions
148 * between the tx and the rx based on the buildings deployed in the scenario.
149 * It returns 1 if the LOS path is obstructed, 0 otherwise.
150 *
151 * \param a tx mobility model
152 * \param b rx mobility model
153 * \return the NLOS probability
154 */
156
157 /**
158 * \brief The callback which is hooked to a method to compute channel condition.
159 *
160 * This callback is implemented to make this model robust against the
161 * presence and absence of buildings in a highway scenario. If there are
162 * buildings in a scenario, this model will use
163 * \link BuildingsChannelConditionModel \endlink, which requires
164 * \link MobilityBuildingInfo \endlink aggregated to the nodes to compute
165 * LOS and NLOS. Otherwise, the callback is hooked to a local method
166 * \link GetChCondWithNoBuildings \endlink
167 * , which construct the ChannelCondtion object and set the condition to
168 * outdoor to outdoor with LOS.
169 */
170 std::function<Ptr<ChannelCondition>(Ptr<const MobilityModel>, Ptr<const MobilityModel>)>
172
173 /**
174 * \brief Get the channel condition and redirect the callback
175 * \link ComputeChCond \endlink to \link GetChCondWithBuildings \endlink
176 * or to \link GetChCondWithNoBuildings \endlink depending on if there are
177 * buildings in the scenario or not.
178 *
179 * \param a tx mobility model
180 * \param b rx mobility model
181 * \return the the condition of the channel between \p a and \p b
182 */
185
186 /**
187 * \brief Get the channel condition between \p a and \p b
188 * using BuildingsChannelConditionModel.
189 *
190 * This method will be called for the scenarios with buildings
191 *
192 * \param a tx mobility model
193 * \param b rx mobility model
194 * \return the condition of the channel between \p a and \p b
195 */
198
199 /**
200 * \brief Get the channel condition between \p a and \p b
201 *
202 * This method will be called for the scenarios without buildings
203 *
204 * \param a tx mobility model
205 * \param b rx mobility model
206 * \return the condition of the channel between \p a and \p b
207 */
210
212 m_buildingsCcm; //!< used to determine the obstructions due to buildings
213};
214
215} // namespace ns3
216
217#endif /* THREE_GPP_V2V_CHANNEL_CONDITION_MODEL */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Base class for the 3GPP channel condition models.
Computes the channel condition for the V2V Highway scenario.
Ptr< ChannelCondition > GetChCondWithNoBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b.
Ptr< ChannelCondition > GetChCondWithBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b using BuildingsChannelConditionModel.
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
std::function< Ptr< ChannelCondition >(Ptr< const MobilityModel >, Ptr< const MobilityModel >)> ComputeChCond
The callback which is hooked to a method to compute channel condition.
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
ThreeGppV2vHighwayChannelConditionModel()
Constructor for the ThreeGppV2vHighwayChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Highway s...
Ptr< ChannelCondition > GetChCondAndFixCallback(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Get the channel condition and redirect the callback ComputeChCond to GetChCondWithBuildings or to Get...
~ThreeGppV2vHighwayChannelConditionModel() override
Destructor for the ThreeGppV2vHighwayChannelConditionModel class.
Computes the channel condition for the V2V Urban scenario.
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
ThreeGppV2vUrbanChannelConditionModel()
Constructor for the ThreeGppV2vUrbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Urban sce...
~ThreeGppV2vUrbanChannelConditionModel() override
Destructor for the ThreeGppV2vUrbanChannelConditionModel class.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.