A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
three-gpp-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019 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_PROPAGATION_LOSS_MODEL_H
20#define THREE_GPP_PROPAGATION_LOSS_MODEL_H
21
24
25namespace ns3
26{
27
28/**
29 * \ingroup propagation
30 *
31 * \brief Base class for the 3GPP propagation models
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
56 /**
57 * \brief Set the channel condition model used to determine the channel
58 * state (e.g., the LOS/NLOS condition)
59 * \param model pointer to the channel condition model
60 */
62
63 /**
64 * \brief Returns the associated channel condition model
65 * \return the channel condition model
66 */
68
69 /**
70 * \brief Set the central frequency of the model
71 * \param f the central frequency in the range in Hz, between 500.0e6 and 100.0e9 Hz
72 */
73 void SetFrequency(double f);
74
75 /**
76 * \brief Return the current central frequency
77 * \return The current central frequency
78 */
79 double GetFrequency() const;
80
81 /**
82 * \brief Return true if the O2I Building Penetration loss
83 * corresponds to a low loss condition.
84 * \param cond The ptr to the channel condition model
85 * \return True for low loss, false for high
86 */
88
89 private:
90 /**
91 * Computes the received power by applying the pathloss model described in
92 * 3GPP TR 38.901
93 *
94 * \param txPowerDbm tx power in dBm
95 * \param a tx mobility model
96 * \param b rx mobility model
97 * \return the rx power in dBm
98 */
99 double DoCalcRxPower(double txPowerDbm,
101 Ptr<MobilityModel> b) const override;
102
103 int64_t DoAssignStreams(int64_t stream) override;
104
105 /**
106 * \brief Computes the pathloss between a and b
107 * \param cond the channel condition
108 * \param distance2D the 2D distance between tx and rx in meters
109 * \param distance3D the 3D distance between tx and rx in meters
110 * \param hUt the height of the UT in meters
111 * \param hBs the height of the BS in meters
112 * \return pathloss value in dB
113 */
114 double GetLoss(Ptr<ChannelCondition> cond,
115 double distance2D,
116 double distance3D,
117 double hUt,
118 double hBs) const;
119
120 /**
121 * \brief Computes the pathloss between a and b considering that the line of
122 * sight is not obstructed
123 * \param distance2D the 2D distance between tx and rx in meters
124 * \param distance3D the 3D distance between tx and rx in meters
125 * \param hUt the height of the UT in meters
126 * \param hBs the height of the BS in meters
127 * \return pathloss value in dB
128 */
129 virtual double GetLossLos(double distance2D,
130 double distance3D,
131 double hUt,
132 double hBs) const = 0;
133
134 /**
135 * \brief Returns the minimum of the two independently generated distances
136 * according to the uniform distribution between the minimum and the maximum
137 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
138 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
139 * for RMa.
140 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
141 * generated. 2D−in distance is used for the O2I penetration losses
142 * calculation according to 3GPP TR 38.901 7.4.3.
143 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
144 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
145 */
146 virtual double GetO2iDistance2dIn() const = 0;
147
148 /**
149 * \brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
150 * If not found or if the channel condition changed it generates a new
151 * independent realization and stores it in the map, otherwise it calculates
152 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
153 *
154 * Note that all child classes should implement this function to support
155 * low losses calculation. As such, this function should be purely virtual.
156 *
157 * \param a tx mobility model (used for the key calculation)
158 * \param b rx mobility model (used for the key calculation)
159 * \param cond the LOS/NLOS channel condition
160 * \return o2iLoss
161 */
165
166 /**
167 * \brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
168 * If not found or if the channel condition changed it generates a new
169 * independent realization and stores it in the map, otherwise it calculates
170 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
171 *
172 * Note that all child classes should implement this function to support
173 * high losses calculation. As such, this function should be purely virtual.
174 *
175 * \param a tx mobility model (used for the key calculation)
176 * \param b rx mobility model (used for the key calculation)
177 * \param cond the LOS/NLOS channel condition
178 * \return o2iLoss
179 */
183
184 /**
185 * \brief Indicates the condition of the o2i building penetration loss
186 * (defined in 3GPP TR 38.901 7.4.3.1).
187 * The default implementation returns the condition as set
188 * (either based on the buildings materials, or if the probabilistic
189 * model is used in the ThreeGppChannelConditionModel, then
190 * based on the result of a random variable).
191 * The derived classes can change the default behavior by overriding
192 * this method.
193 * \param cond the ptr to the channel condition model
194 * \return True for low losses, false for high losses
195 */
197
198 /**
199 * \brief Computes the pathloss between a and b considering that the line of
200 * sight is obstructed
201 * \param distance2D the 2D distance between tx and rx in meters
202 * \param distance3D the 3D distance between tx and rx in meters
203 * \param hUt the height of the UT in meters
204 * \param hBs the height of the BS in meters
205 * \return pathloss value in dB
206 */
207 virtual double GetLossNlos(double distance2D,
208 double distance3D,
209 double hUt,
210 double hBs) const = 0;
211
212 /**
213 * \brief Computes the pathloss between a and b considering that the line of
214 * sight is obstructed by a vehicle. By default it raises an error to
215 * avoid misuse.
216 * \param distance2D the 2D distance between tx and rx in meters
217 * \param distance3D the 3D distance between tx and rx in meters
218 * \param hUt the height of the UT in meters
219 * \param hBs the height of the BS in meters
220 * \return pathloss value in dB
221 */
222 virtual double GetLossNlosv(double distance2D, double distance3D, double hUt, double hBs) const;
223
224 /**
225 * \brief Determines hUT and hBS. The default implementation assumes that
226 * the tallest node is the BS and the smallest is the UT. The derived classes
227 * can change the default behavior by overriding this method.
228 * \param za the height of the first node in meters
229 * \param zb the height of the second node in meters
230 * \return std::pair of heights in meters, the first element is hUt and the second is hBs
231 */
232 virtual std::pair<double, double> GetUtAndBsHeights(double za, double zb) const;
233
234 /**
235 * \brief Retrieves the shadowing value by looking at m_shadowingMap.
236 * If not found or if the channel condition changed it generates a new
237 * independent realization and stores it in the map, otherwise it correlates
238 * the new value with the previous one using the autocorrelation function
239 * defined in 3GPP TR 38.901, Sec. 7.4.4.
240 * \param a tx mobility model
241 * \param b rx mobility model
242 * \param cond the LOS/NLOS channel condition
243 * \return shadowing loss in dB
244 */
248
249 /**
250 * \brief Returns the shadow fading standard deviation
251 * \param a tx mobility model
252 * \param b rx mobility model
253 * \param cond the LOS/NLOS channel condition
254 * \return shadowing std in dB
255 */
259
260 /**
261 * \brief Returns the shadow fading correlation distance
262 * \param cond the LOS/NLOS channel condition
263 * \return shadowing correlation distance in meters
264 */
267
268 /**
269 * \brief Returns an unique key for the channel between a and b.
270 *
271 * The key is the value of the Cantor function calculated by using as
272 * first parameter the lowest node ID, and as a second parameter the highest
273 * node ID.
274 *
275 * \param a tx mobility model
276 * \param b rx mobility model
277 * \return channel key
278 */
280
281 /**
282 * \brief Get the difference between the node position
283 *
284 * The difference is calculated as (b-a) if Id(a) < Id (b), or
285 * (a-b) if Id(b) <= Id(a).
286 *
287 * \param a First node
288 * \param b Second node
289 * \return the difference between the node vector position
290 */
292
293 protected:
294 void DoDispose() override;
295
296 /**
297 * \brief Computes the 2D distance between two 3D vectors
298 * \param a the first 3D vector
299 * \param b the second 3D vector
300 * \return the 2D distance between a and b
301 */
302 static double Calculate2dDistance(Vector a, Vector b);
303
304 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
305 double m_frequency; //!< operating frequency in Hz
306 bool m_shadowingEnabled; //!< enable/disable shadowing
307 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
308 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
310
311 /** Define a struct for the m_shadowingMap entries */
313 {
314 double m_shadowing; //!< the shadowing loss in dB
316 Vector m_distance; //!< the vector AB
317 };
318
319 mutable std::unordered_map<uint32_t, ShadowingMapItem>
320 m_shadowingMap; //!< map to store the shadowing values
321
322 /** Define a struct for the m_o2iLossMap entries */
324 {
325 double m_o2iLoss; //!< the o2i loss in dB
327 };
328
329 mutable std::unordered_map<uint32_t, O2iLossMapItem>
330 m_o2iLossMap; //!< map to store the o2i Loss values
331
332 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
333 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
334 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
335 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
337 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
338 //!< see TR38.901 Table 7.4.3-2
340 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
341 //!< see TR38.901 Table 7.4.3-2
342};
343
344/**
345 * \ingroup propagation
346 *
347 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
348 * for the RMa scenario.
349 */
351{
352 public:
353 /**
354 * \brief Get the type ID.
355 * \return the object TypeId
356 */
357 static TypeId GetTypeId();
358
359 /**
360 * Constructor
361 */
363
364 /**
365 * Destructor
366 */
368
369 // Delete copy constructor and assignment operator to avoid misuse
372
373 private:
374 /**
375 * \brief Computes the pathloss between a and b considering that the line of
376 * sight is not obstructed
377 * \param distance2D the 2D distance between tx and rx in meters
378 * \param distance3D the 3D distance between tx and rx in meters
379 * \param hUt the height of the UT in meters
380 * \param hBs the height of the BS in meters
381 * \return pathloss value in dB
382 */
383 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
384
385 /**
386 * \brief Returns the minimum of the two independently generated distances
387 * according to the uniform distribution between the minimum and the maximum
388 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
389 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
390 * for RMa.
391 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
392 * generated. 2D−in distance is used for the O2I penetration losses
393 * calculation according to 3GPP TR 38.901 7.4.3.
394 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
395 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
396 */
397 double GetO2iDistance2dIn() const override;
398
399 /**
400 * \brief Indicates the condition of the o2i building penetration loss
401 * (defined in 3GPP TR 38.901 7.4.3.1).
402 * \param cond the ptr to the channel condition model
403 * \return True for low losses, false for high losses
404 */
406
407 /**
408 * \brief Computes the pathloss between a and b considering that the line of
409 * sight is obstructed
410 * \param distance2D the 2D distance between tx and rx in meters
411 * \param distance3D the 3D distance between tx and rx in meters
412 * \param hUt the height of the UT in meters
413 * \param hBs the height of the BS in meters
414 * \return pathloss value in dB
415 */
416 double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override;
417
418 /**
419 * \brief Returns the shadow fading standard deviation
420 * \param a tx mobility model
421 * \param b rx mobility model
422 * \param cond the LOS/NLOS channel condition
423 * \return shadowing std in dB
424 */
427 ChannelCondition::LosConditionValue cond) const override;
428
429 /**
430 * \brief Returns the shadow fading correlation distance
431 * \param cond the LOS/NLOS channel condition
432 * \return shadowing correlation distance in meters
433 */
435
436 /**
437 * \brief Computes the PL1 formula for the RMa scenario
438 * \param frequency the operating frequency in Hz
439 * \param distance3D the 3D distance between the tx and the rx nodes in meters
440 * \param h the average building height in meters
441 * \param w the average street width in meters
442 * \return result of the PL1 formula
443 */
444 static double Pl1(double frequency, double distance3D, double h, double w);
445
446 /**
447 * \brief Computes the breakpoint distance for the RMa scenario
448 * \param frequency the operating frequency in Hz
449 * \param hA height of the tx node in meters
450 * \param hB height of the rx node in meters
451 * \return the breakpoint distance in meters
452 */
453 static double GetBpDistance(double frequency, double hA, double hB);
454
455 double m_h; //!< average building height in meters
456 double m_w; //!< average street width in meters
457};
458
459/**
460 * \ingroup propagation
461 *
462 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
463 * for the UMa scenario.
464 */
466{
467 public:
468 /**
469 * \brief Get the type ID.
470 * \return the object TypeId
471 */
472 static TypeId GetTypeId();
473
474 /**
475 * Constructor
476 */
478
479 /**
480 * Destructor
481 */
483
484 // Delete copy constructor and assignment operator to avoid misuse
487
488 private:
489 int64_t DoAssignStreams(int64_t stream) override;
490
491 /**
492 * \brief Computes the pathloss between a and b considering that the line of
493 * sight is not obstructed
494 * \param distance2D the 2D distance between tx and rx in meters
495 * \param distance3D the 3D distance between tx and rx in meters
496 * \param hUt the height of the UT in meters
497 * \param hBs the height of the BS in meters
498 * \return pathloss value in dB
499 */
500 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
501
502 /**
503 * \brief Returns the minimum of the two independently generated distances
504 * according to the uniform distribution between the minimum and the maximum
505 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
506 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
507 * for RMa.
508 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
509 * generated. 2D−in distance is used for the O2I penetration losses
510 * calculation according to 3GPP TR 38.901 7.4.3.
511 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
512 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
513 */
514 double GetO2iDistance2dIn() const override;
515
516 /**
517 * \brief Computes the pathloss between a and b considering that the line of
518 * sight is obstructed.
519 * \param distance2D the 2D distance between tx and rx in meters
520 * \param distance3D the 3D distance between tx and rx in meters
521 * \param hUt the height of the UT in meters
522 * \param hBs the height of the BS in meters
523 * \return pathloss value in dB
524 */
525 double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override;
526
527 /**
528 * \brief Returns the shadow fading standard deviation
529 * \param a tx mobility model
530 * \param b rx mobility model
531 * \param cond the LOS/NLOS channel condition
532 * \return shadowing std in dB
533 */
536 ChannelCondition::LosConditionValue cond) const override;
537
538 /**
539 * \brief Returns the shadow fading correlation distance
540 * \param cond the LOS/NLOS channel condition
541 * \return shadowing correlation distance in meters
542 */
544
545 /**
546 * \brief Computes the breakpoint distance
547 * \param hUt height of the UT in meters
548 * \param hBs height of the BS in meters
549 * \param distance2D distance between the two nodes in meters
550 * \return the breakpoint distance in meters
551 */
552 double GetBpDistance(double hUt, double hBs, double distance2D) const;
553
554 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
555 //!< of the breakpoint distance
556};
557
558/**
559 * \ingroup propagation
560 *
561 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
562 * for the UMi-Street Canyon scenario.
563 */
565{
566 public:
567 /**
568 * \brief Get the type ID.
569 * \return the object TypeId
570 */
571 static TypeId GetTypeId();
572
573 /**
574 * Constructor
575 */
577
578 /**
579 * Destructor
580 */
582
583 // Delete copy constructor and assignment operator to avoid misuse
588
589 private:
590 /**
591 * \brief Computes the pathloss between a and b considering that the line of
592 * sight is not obstructed
593 * \param distance2D the 2D distance between tx and rx in meters
594 * \param distance3D the 3D distance between tx and rx in meters
595 * \param hUt the height of the UT in meters
596 * \param hBs the height of the BS in meters
597 * \return pathloss value in dB
598 */
599 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
600
601 /**
602 * \brief Returns the minimum of the two independently generated distances
603 * according to the uniform distribution between the minimum and the maximum
604 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
605 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
606 * for RMa.
607 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
608 * generated. 2D−in distance is used for the O2I penetration losses
609 * calculation according to 3GPP TR 38.901 7.4.3.
610 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
611 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
612 */
613 double GetO2iDistance2dIn() const override;
614
615 /**
616 * \brief Computes the pathloss between a and b considering that the line of
617 * sight is obstructed.
618 * \param distance2D the 2D distance between tx and rx in meters
619 * \param distance3D the 3D distance between tx and rx in meters
620 * \param hUt the height of the UT in meters
621 * \param hBs the height of the BS in meters
622 * \return pathloss value in dB
623 */
624 double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override;
625
626 /**
627 * \brief Returns the shadow fading standard deviation
628 * \param a tx mobility model
629 * \param b rx mobility model
630 * \param cond the LOS/NLOS channel condition
631 * \return shadowing std in dB
632 */
635 ChannelCondition::LosConditionValue cond) const override;
636
637 /**
638 * \brief Returns the shadow fading correlation distance
639 * \param cond the LOS/NLOS channel condition
640 * \return shadowing correlation distance in meters
641 */
643
644 /**
645 * \brief Computes the breakpoint distance
646 * \param hUt height of the UT node in meters
647 * \param hBs height of the BS node in meters
648 * \param distance2D distance between the two nodes in meters
649 * \return the breakpoint distance in meters
650 */
651 double GetBpDistance(double hUt, double hBs, double distance2D) const;
652
653 /**
654 * \brief Determines hUT and hBS. Overrides the default implementation.
655 * \param za the height of the first node in meters
656 * \param zb the height of the second node in meters
657 * \return std::pair, the first element is hUt and the second is hBs
658 */
659 std::pair<double, double> GetUtAndBsHeights(double za, double zb) const override;
660};
661
662/**
663 * \ingroup propagation
664 *
665 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
666 * for the Indoor Office scenario.
667 */
669{
670 public:
671 /**
672 * \brief Get the type ID.
673 * \return the object TypeId
674 */
675 static TypeId GetTypeId();
676
677 /**
678 * Constructor
679 */
681
682 /**
683 * Destructor
684 */
686
687 // Delete copy constructor and assignment operator to avoid misuse
689 delete;
692
693 private:
694 /**
695 * \brief Computes the pathloss between a and b considering that the line of
696 * sight is not obstructed
697 * \param distance2D the 2D distance between tx and rx in meters
698 * \param distance3D the 3D distance between tx and rx in meters
699 * \param hUt the height of the UT in meters
700 * \param hBs the height of the BS in meters
701 * \return pathloss value in dB
702 */
703 double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const override;
704
705 /**
706 * \brief Returns the minimum of the two independently generated distances
707 * according to the uniform distribution between the minimum and the maximum
708 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
709 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
710 * for RMa.
711 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
712 * generated. 2D−in distance is used for the O2I penetration losses
713 * calculation according to 3GPP TR 38.901 7.4.3.
714 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
715 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
716 */
717 double GetO2iDistance2dIn() const override;
718
719 /**
720 * \brief Computes the pathloss between a and b considering that the line of
721 * sight is obstructed
722 * \param distance2D the 2D distance between tx and rx in meters
723 * \param distance3D the 3D distance between tx and rx in meters
724 * \param hUt the height of the UT in meters
725 * \param hBs the height of the BS in meters
726 * \return pathloss value in dB
727 */
728 double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const override;
729
730 /**
731 * \brief Returns the shadow fading standard deviation
732 * \param a tx mobility model
733 * \param b rx mobility model
734 * \param cond the LOS/NLOS channel condition
735 * \return shadowing std in dB
736 */
739 ChannelCondition::LosConditionValue cond) const override;
740
741 /**
742 * \brief Returns the shadow fading correlation distance
743 * \param cond the LOS/NLOS channel condition
744 * \return shadowing correlation distance in meters
745 */
747};
748
749} // namespace ns3
750
751#endif /* THREE_GPP_PROPAGATION_LOSS_MODEL_H */
LosConditionValue
Possible values for Line-of-Sight condition.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the Indoor Office scenario...
ThreeGppIndoorOfficePropagationLossModel(const ThreeGppIndoorOfficePropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
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.
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.
Base class for the 3GPP propagation models.
Ptr< ChannelConditionModel > GetChannelConditionModel() const
Returns the associated channel condition model.
virtual double GetO2iLowPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
double GetLoss(Ptr< ChannelCondition > cond, double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b.
Ptr< UniformRandomVariable > m_randomO2iVar2
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
double GetFrequency() const
Return the current central frequency.
Ptr< UniformRandomVariable > m_randomO2iVar1
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
virtual double GetLossNlos(double distance2D, double distance3D, double hUt, double hBs) const =0
Computes the pathloss between a and b considering that the line of sight is obstructed.
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the shadowing value by looking at m_shadowingMap.
static double Calculate2dDistance(Vector a, Vector b)
Computes the 2D distance between two 3D vectors.
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model used to determine the channel state (e.g., the LOS/NLOS condition)
std::unordered_map< uint32_t, ShadowingMapItem > m_shadowingMap
map to store the shadowing values
virtual double GetLossLos(double distance2D, double distance3D, double hUt, double hBs) const =0
Computes the pathloss between a and b considering that the line of sight is not obstructed.
virtual bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
ThreeGppPropagationLossModel & operator=(const ThreeGppPropagationLossModel &)=delete
virtual double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading correlation distance.
ThreeGppPropagationLossModel(const ThreeGppPropagationLossModel &)=delete
Ptr< NormalRandomVariable > m_normRandomVariable
normal random variable
Ptr< ChannelConditionModel > m_channelConditionModel
pointer to the channel condition model
std::unordered_map< uint32_t, O2iLossMapItem > m_o2iLossMap
map to store the o2i Loss values
virtual double GetO2iDistance2dIn() const =0
Returns the minimum of the two independently generated distances according to the uniform distributio...
virtual double GetO2iHighPenetrationLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const
Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
bool IsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const
Return true if the O2I Building Penetration loss corresponds to a low loss condition.
void SetFrequency(double f)
Set the central frequency of the model.
void DoDispose() override
Destructor implementation.
static uint32_t GetKey(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Returns an unique key for the channel between a and b.
Ptr< NormalRandomVariable > m_normalO2iLowLossVar
a normal random variable for the calculation of 02i low loss, see TR38.901 Table 7....
bool m_enforceRanges
strictly enforce TR 38.901 parameter ranges
virtual double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const =0
Returns the shadow fading standard deviation.
virtual double GetLossNlosv(double distance2D, double distance3D, double hUt, double hBs) const
Computes the pathloss between a and b considering that the line of sight is obstructed by a vehicle.
Ptr< NormalRandomVariable > m_normalO2iHighLossVar
a normal random variable for the calculation of 02i high loss, see TR38.901 Table 7....
virtual std::pair< double, double > GetUtAndBsHeights(double za, double zb) const
Determines hUT and hBS.
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the received power by applying the pathloss model described in 3GPP TR 38....
static Vector GetVectorDifference(Ptr< MobilityModel > a, Ptr< MobilityModel > b)
Get the difference between the node position.
bool m_buildingPenLossesEnabled
enable/disable building penetration losses
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the RMa scenario.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
static double Pl1(double frequency, double distance3D, double h, double w)
Computes the PL1 formula for the RMa scenario.
ThreeGppRmaPropagationLossModel & operator=(const ThreeGppRmaPropagationLossModel &)=delete
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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 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.
ThreeGppRmaPropagationLossModel(const ThreeGppRmaPropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
double m_h
average building height in meters
static double GetBpDistance(double frequency, double hA, double hB)
Computes the breakpoint distance for the RMa scenario.
bool DoIsO2iLowPenetrationLoss(Ptr< const ChannelCondition > cond) const override
Indicates the condition of the o2i building penetration loss (defined in 3GPP TR 38....
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMa 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.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
ThreeGppUmaPropagationLossModel(const ThreeGppUmaPropagationLossModel &)=delete
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
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.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
Ptr< UniformRandomVariable > m_uniformVar
a uniform random variable used for the computation of the breakpoint distance
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the UMi-Street Canyon scen...
ThreeGppUmiStreetCanyonPropagationLossModel & operator=(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
std::pair< double, double > GetUtAndBsHeights(double za, double zb) const override
Determines hUT and hBS.
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.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
double GetBpDistance(double hUt, double hBs, double distance2D) const
Computes the breakpoint distance.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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.
ThreeGppUmiStreetCanyonPropagationLossModel(const ThreeGppUmiStreetCanyonPropagationLossModel &)=delete
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition
ChannelCondition::LosConditionValue m_condition
the LOS/NLOS condition