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 * SPDX-License-Identifier: GPL-2.0-only
7 */
8
9#ifndef THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
10#define THREE_GPP_V2V_CHANNEL_CONDITION_MODEL
11
13
14#include "ns3/channel-condition-model.h"
15
16#include <functional>
17
18namespace ns3
19{
20
21class MobilityModel;
22
23/**
24 * \ingroup buildings
25 * \ingroup propagation
26 *
27 * \brief Computes the channel condition for the V2V Urban scenario
28 *
29 * Computes the channel condition following the specifications for the
30 * V2V Urban scenario reported in Table 6.2-1 of 3GPP TR 37.885.
31 *
32 * 3GPP TR 37.885 defines 3 different channel states for vehicular environments:
33 * LOS, NLOS and NLOSv, the latter representing the case in which the LOS path is
34 * blocked by other vehicles in the scenario. The document defines a probabilistic
35 * model to determine if the channel state is LOS or NLOSv, while the NLOS state
36 * is determined in a deterministic way based on the buildings deployed in the
37 * scenario. For this reason, this class makes use of an instance of
38 * BuildingsChannelConditionModel to determine if the LOS is obstructed by
39 * buildings or not.
40 */
42{
43 public:
44 /**
45 * Get the type ID.
46 * \brief Get the type ID.
47 * \return the object TypeId
48 */
49 static TypeId GetTypeId();
50
51 /**
52 * Constructor for the ThreeGppV2vUrbanChannelConditionModel class
53 */
55
56 /**
57 * Destructor for the ThreeGppV2vUrbanChannelConditionModel class
58 */
60
61 private:
62 /**
63 * Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885
64 * for the V2V Urban scenario.
65 *
66 * \param a tx mobility model
67 * \param b rx mobility model
68 * \return the LOS probability
69 */
71
72 /**
73 * Compute the NLOS probability. It determines the presence of obstructions
74 * between the tx and the rx based on the buildings deployed in the scenario.
75 * It returns 1 if the LOS path is obstructed, 0 otherwise.
76 *
77 * \param a tx mobility model
78 * \param b rx mobility model
79 * \return the NLOS probability
80 */
82
84 m_buildingsCcm; //!< used to determine the obstructions due to buildings
85};
86
87/**
88 * \ingroup buildings
89 *
90 * \brief Computes the channel condition for the V2V Highway scenario
91 *
92 * Computes the channel condition following the specifications for the
93 * V2V Highway scenario reported in Table 6.2-1 of 3GPP TR 37.885.
94 *
95 * 3GPP TR 37.885 defines 3 different channel states for vehicular environments:
96 * LOS, NLOS and NLOSv, the latter representing the case in which the LOS path is
97 * blocked by other vehicles in the scenario. The document defines a probabilistic
98 * model to determine if the channel state is LOS or NLOSv, while the NLOS state
99 * is determined in a deterministic way based on the buildings deployed in the
100 * scenario. For this reason, this class makes use of an instance of
101 * BuildingsChannelConditionModel to determine if the LOS is obstructed by
102 * buildings or not.
103 */
105{
106 public:
107 /**
108 * Get the type ID.
109 * \brief Get the type ID.
110 * \return the object TypeId
111 */
112 static TypeId GetTypeId();
113
114 /**
115 * Constructor for the ThreeGppV2vHighwayChannelConditionModel class
116 */
118
119 /**
120 * Destructor for the ThreeGppV2vHighwayChannelConditionModel class
121 */
123
124 private:
125 /**
126 * Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885
127 * for the V2V Highway scenario.
128 *
129 * \param a tx mobility model
130 * \param b rx mobility model
131 * \return the LOS probability
132 */
134
135 /**
136 * Compute the NLOS probability. It determines the presence of obstructions
137 * between the tx and the rx based on the buildings deployed in the scenario.
138 * It returns 1 if the LOS path is obstructed, 0 otherwise.
139 *
140 * \param a tx mobility model
141 * \param b rx mobility model
142 * \return the NLOS probability
143 */
145
146 /**
147 * \brief The callback which is hooked to a method to compute channel condition.
148 *
149 * This callback is implemented to make this model robust against the
150 * presence and absence of buildings in a highway scenario. If there are
151 * buildings in a scenario, this model will use
152 * \link BuildingsChannelConditionModel \endlink, which requires
153 * \link MobilityBuildingInfo \endlink aggregated to the nodes to compute
154 * LOS and NLOS. Otherwise, the callback is hooked to a local method
155 * \link GetChCondWithNoBuildings \endlink
156 * , which construct the ChannelCondtion object and set the condition to
157 * outdoor to outdoor with LOS.
158 */
159 std::function<Ptr<ChannelCondition>(Ptr<const MobilityModel>, Ptr<const MobilityModel>)>
161
162 /**
163 * \brief Get the channel condition and redirect the callback
164 * \link ComputeChCond \endlink to \link GetChCondWithBuildings \endlink
165 * or to \link GetChCondWithNoBuildings \endlink depending on if there are
166 * buildings in the scenario or not.
167 *
168 * \param a tx mobility model
169 * \param b rx mobility model
170 * \return the the condition of the channel between \p a and \p b
171 */
174
175 /**
176 * \brief Get the channel condition between \p a and \p b
177 * using BuildingsChannelConditionModel.
178 *
179 * This method will be called for the scenarios with buildings
180 *
181 * \param a tx mobility model
182 * \param b rx mobility model
183 * \return the condition of the channel between \p a and \p b
184 */
187
188 /**
189 * \brief Get the channel condition between \p a and \p b
190 *
191 * This method will be called for the scenarios without buildings
192 *
193 * \param a tx mobility model
194 * \param b rx mobility model
195 * \return the condition of the channel between \p a and \p b
196 */
199
201 m_buildingsCcm; //!< used to determine the obstructions due to buildings
202};
203
204} // namespace ns3
205
206#endif /* THREE_GPP_V2V_CHANNEL_CONDITION_MODEL */
Smart pointer class similar to boost::intrusive_ptr.
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:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.