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 * SPDX-License-Identifier: GPL-2.0-only
6 */
7
8#ifndef THREE_GPP_PROPAGATION_LOSS_MODEL_H
9#define THREE_GPP_PROPAGATION_LOSS_MODEL_H
10
13
14namespace ns3
15{
16
17/**
18 * @ingroup propagation
19 *
20 * @brief Base class for the 3GPP propagation models
21 */
23{
24 public:
25 /**
26 * @brief Get the type ID.
27 * @return the object TypeId
28 */
29 static TypeId GetTypeId();
30
31 /**
32 * Constructor
33 */
35
36 /**
37 * Destructor
38 */
40
41 // Delete copy constructor and assignment operator to avoid misuse
44
45 /**
46 * @brief Set the channel condition model used to determine the channel
47 * state (e.g., the LOS/NLOS condition)
48 * @param model pointer to the channel condition model
49 */
51
52 /**
53 * @brief Returns the associated channel condition model
54 * @return the channel condition model
55 */
57
58 /**
59 * @brief Set the central frequency of the model
60 * @param f the central frequency in the range in Hz, between 500.0e6 and 100.0e9 Hz
61 */
62 void SetFrequency(double f);
63
64 /**
65 * @brief Return the current central frequency
66 * @return The current central frequency
67 */
68 double GetFrequency() const;
69
70 /**
71 * @brief Return true if the O2I Building Penetration loss
72 * corresponds to a low loss condition.
73 * @param cond The ptr to the channel condition model
74 * @return True for low loss, false for high
75 */
77
78 /**
79 * @brief Stop-gap solution for wraparound model
80 *
81 * Stop-gap solution for support of wraparound model in the 5G NR module. This
82 * method was introduced for ns-3.45 but will be removed in a future release once
83 * a more general solution is added elsewhere (most likely in the spectrum channel). The
84 * callback method registered here will be executed at the beginning of DoCalcRxPower, and the
85 * returned pointer to a mobility model will be subsequently used as the (replacement) source
86 * mobility model for the rest of DoCalcRxPower() processing.
87 *
88 * @param prologueFunction Function that receives two mobility models and compute a third, based
89 * on the wrapped position of the second model in respect to the first
90 */
93 prologueFunction)
94 {
95 m_doCalcRxPowerPrologueFunction = prologueFunction;
96 }
97
98 private:
99 /**
100 * Computes the received power by applying the pathloss model described in
101 * 3GPP TR 38.901
102 *
103 * @param txPowerDbm tx power in dBm
104 * @param a tx mobility model
105 * @param b rx mobility model
106 * @return the rx power in dBm
107 */
108 double DoCalcRxPower(double txPowerDbm,
110 Ptr<MobilityModel> b) const override;
111
112 int64_t DoAssignStreams(int64_t stream) override;
113
114 /**
115 * @brief Computes the pathloss between a and b
116 * @param cond the channel condition
117 * @param a tx mobility model
118 * @param b rx mobility model
119 * @return pathloss value in dB
120 */
122
123 /**
124 * @brief Computes the pathloss between a and b considering that the line of
125 * sight is not obstructed
126 * @param a tx mobility model
127 * @param b rx mobility model
128 * @return pathloss value in dB
129 */
130 virtual double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
131
132 /**
133 * @brief Computes the pathloss between a and b considering that the line of
134 * sight is obstructed
135 * @param a tx mobility model
136 * @param b rx mobility model
137 * @return pathloss value in dB
138 */
139 virtual double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
140
141 /**
142 * @brief Returns the minimum of the two independently generated distances
143 * according to the uniform distribution between the minimum and the maximum
144 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
145 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
146 * for RMa.
147 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
148 * generated. 2D−in distance is used for the O2I penetration losses
149 * calculation according to 3GPP TR 38.901 7.4.3.
150 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
151 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
152 */
153 virtual double GetO2iDistance2dIn() const = 0;
154
155 /**
156 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
157 * If not found or if the channel condition changed it generates a new
158 * independent realization and stores it in the map, otherwise it calculates
159 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
160 *
161 * Note that all child classes should implement this function to support
162 * low losses calculation. As such, this function should be purely virtual.
163 *
164 * @param a tx mobility model (used for the key calculation)
165 * @param b rx mobility model (used for the key calculation)
166 * @param cond the LOS/NLOS channel condition
167 * @return o2iLoss
168 */
172
173 /**
174 * @brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
175 * If not found or if the channel condition changed it generates a new
176 * independent realization and stores it in the map, otherwise it calculates
177 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
178 *
179 * Note that all child classes should implement this function to support
180 * high losses calculation. As such, this function should be purely virtual.
181 *
182 * @param a tx mobility model (used for the key calculation)
183 * @param b rx mobility model (used for the key calculation)
184 * @param cond the LOS/NLOS channel condition
185 * @return o2iLoss
186 */
190
191 /**
192 * @brief Indicates the condition of the o2i building penetration loss
193 * (defined in 3GPP TR 38.901 7.4.3.1).
194 * The default implementation returns the condition as set
195 * (either based on the buildings materials, or if the probabilistic
196 * model is used in the ThreeGppChannelConditionModel, then
197 * based on the result of a random variable).
198 * The derived classes can change the default behavior by overriding
199 * this method.
200 * @param cond the ptr to the channel condition model
201 * @return True for low losses, false for high losses
202 */
204
205 /**
206 * @brief Computes the pathloss between a and b considering that the line of
207 * sight is obstructed by a vehicle. By default it raises an error to
208 * avoid misuse.
209 * @param a tx mobility model
210 * @param b rx mobility model
211 * @return pathloss value in dB
212 */
213 virtual double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
214
215 /**
216 * @brief Retrieves the shadowing value by looking at m_shadowingMap.
217 * If not found or if the channel condition changed it generates a new
218 * independent realization and stores it in the map, otherwise it correlates
219 * the new value with the previous one using the autocorrelation function
220 * defined in 3GPP TR 38.901, Sec. 7.4.4.
221 * @param a tx mobility model
222 * @param b rx mobility model
223 * @param cond the LOS/NLOS channel condition
224 * @return shadowing loss in dB
225 */
229
230 /**
231 * @brief Returns the shadow fading standard deviation
232 * @param a tx mobility model
233 * @param b rx mobility model
234 * @param cond the LOS/NLOS channel condition
235 * @return shadowing std in dB
236 */
240
241 /**
242 * @brief Returns the shadow fading correlation distance
243 * @param cond the LOS/NLOS channel condition
244 * @return shadowing correlation distance in meters
245 */
248
249 /**
250 * @brief Returns an unique key for the channel between a and b.
251 *
252 * The key is the value of the Cantor function calculated by using as
253 * first parameter the lowest node ID, and as a second parameter the highest
254 * node ID.
255 *
256 * @param a tx mobility model
257 * @param b rx mobility model
258 * @return channel key
259 */
261
262 /**
263 * @brief Get the difference between the node position
264 *
265 * The difference is calculated as (b-a) if Id(a) < Id (b), or
266 * (a-b) if Id(b) <= Id(a).
267 *
268 * @param a First node
269 * @param b Second node
270 * @return the difference between the node vector position
271 */
273
274 protected:
275 void DoDispose() override;
276
277 /**
278 * @brief Computes the 2D distance between two 3D vectors
279 * @param a the first 3D vector
280 * @param b the second 3D vector
281 * @return the 2D distance between a and b
282 */
283 static double Calculate2dDistance(Vector a, Vector b);
284
285 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
286 double m_frequency; //!< operating frequency in Hz
287 bool m_shadowingEnabled; //!< enable/disable shadowing
288 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
289 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
291
292 /** Define a struct for the m_shadowingMap entries */
294 {
295 double m_shadowing; //!< the shadowing loss in dB
297 Vector m_distance; //!< the vector AB
298 };
299
300 mutable std::unordered_map<uint32_t, ShadowingMapItem>
301 m_shadowingMap; //!< map to store the shadowing values
302
303 /** Define a struct for the m_o2iLossMap entries */
305 {
306 double m_o2iLoss; //!< the o2i loss in dB
308 };
309
310 mutable std::unordered_map<uint32_t, O2iLossMapItem>
311 m_o2iLossMap; //!< map to store the o2i Loss values
312
313 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
314 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
315 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
316 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
318 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
319 //!< see TR38.901 Table 7.4.3-2
321 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
322 //!< see TR38.901 Table 7.4.3-2
323
324 /// Optional prologue function that can be used to implement wraparound models
325 static std::function<Ptr<MobilityModel>(Ptr<const MobilityModel>, Ptr<const MobilityModel>)>
327};
328
329/**
330 * @ingroup propagation
331 *
332 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
333 * for the RMa scenario.
334 */
336{
337 public:
338 /**
339 * @brief Get the type ID.
340 * @return the object TypeId
341 */
342 static TypeId GetTypeId();
343
344 /**
345 * Constructor
346 */
348
349 /**
350 * Destructor
351 */
353
354 // Delete copy constructor and assignment operator to avoid misuse
357
358 private:
359 /**
360 * @brief Computes the pathloss between a and b considering that the line of
361 * sight is not obstructed
362 * @param a tx mobility model
363 * @param b rx mobility model
364 * @return pathloss value in dB
365 */
366 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
367
368 /**
369 * @brief Returns the minimum of the two independently generated distances
370 * according to the uniform distribution between the minimum and the maximum
371 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
372 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
373 * for RMa.
374 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
375 * generated. 2D−in distance is used for the O2I penetration losses
376 * calculation according to 3GPP TR 38.901 7.4.3.
377 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
378 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
379 */
380 double GetO2iDistance2dIn() const override;
381
382 /**
383 * @brief Indicates the condition of the o2i building penetration loss
384 * (defined in 3GPP TR 38.901 7.4.3.1).
385 * @param cond the ptr to the channel condition model
386 * @return True for low losses, false for high losses
387 */
389
390 /**
391 * @brief Computes the pathloss between a and b considering that the line of
392 * sight is obstructed
393 * @param a tx mobility model
394 * @param b rx mobility model
395 * @return pathloss value in dB
396 */
397 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
398
399 /**
400 * @brief Returns the shadow fading standard deviation
401 * @param a tx mobility model
402 * @param b rx mobility model
403 * @param cond the LOS/NLOS channel condition
404 * @return shadowing std in dB
405 */
408 ChannelCondition::LosConditionValue cond) const override;
409
410 /**
411 * @brief Returns the shadow fading correlation distance
412 * @param cond the LOS/NLOS channel condition
413 * @return shadowing correlation distance in meters
414 */
416
417 /**
418 * @brief Computes the PL1 formula for the RMa scenario
419 * @param frequency the operating frequency in Hz
420 * @param distance3D the 3D distance between the tx and the rx nodes in meters
421 * @param h the average building height in meters
422 * @param w the average street width in meters
423 * @return result of the PL1 formula
424 */
425 static double Pl1(double frequency, double distance3D, double h, double w);
426
427 /**
428 * @brief Computes the breakpoint distance for the RMa scenario
429 * @param frequency the operating frequency in Hz
430 * @param hA height of the tx node in meters
431 * @param hB height of the rx node in meters
432 * @return the breakpoint distance in meters
433 */
434 static double GetBpDistance(double frequency, double hA, double hB);
435
436 double m_h; //!< average building height in meters
437 double m_w; //!< average street width in meters
438};
439
440/**
441 * @ingroup propagation
442 *
443 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
444 * for the UMa scenario.
445 */
447{
448 public:
449 /**
450 * @brief Get the type ID.
451 * @return the object TypeId
452 */
453 static TypeId GetTypeId();
454
455 /**
456 * Constructor
457 */
459
460 /**
461 * Destructor
462 */
464
465 // Delete copy constructor and assignment operator to avoid misuse
468
469 private:
470 int64_t DoAssignStreams(int64_t stream) override;
471
472 /**
473 * @brief Computes the pathloss between a and b considering that the line of
474 * sight is not obstructed
475 * @param a tx mobility model
476 * @param b rx mobility model
477 * @return pathloss value in dB
478 */
479 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
480
481 /**
482 * @brief Returns the minimum of the two independently generated distances
483 * according to the uniform distribution between the minimum and the maximum
484 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
485 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
486 * for RMa.
487 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
488 * generated. 2D−in distance is used for the O2I penetration losses
489 * calculation according to 3GPP TR 38.901 7.4.3.
490 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
491 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
492 */
493 double GetO2iDistance2dIn() const override;
494
495 /**
496 * @brief Computes the pathloss between a and b considering that the line of
497 * sight is obstructed.
498 * @param a tx mobility model
499 * @param b rx mobility model
500 * @return pathloss value in dB
501 */
502 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
503
504 /**
505 * @brief Returns the shadow fading standard deviation
506 * @param a tx mobility model
507 * @param b rx mobility model
508 * @param cond the LOS/NLOS channel condition
509 * @return shadowing std in dB
510 */
513 ChannelCondition::LosConditionValue cond) const override;
514
515 /**
516 * @brief Returns the shadow fading correlation distance
517 * @param cond the LOS/NLOS channel condition
518 * @return shadowing correlation distance in meters
519 */
521
522 /**
523 * @brief Computes the breakpoint distance
524 * @param hUt height of the UT in meters
525 * @param hBs height of the BS in meters
526 * @param distance2D distance between the two nodes in meters
527 * @return the breakpoint distance in meters
528 */
529 double GetBpDistance(double hUt, double hBs, double distance2D) const;
530
531 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
532 //!< of the breakpoint distance
533};
534
535/**
536 * @ingroup propagation
537 *
538 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
539 * for the UMi-Street Canyon scenario.
540 */
542{
543 public:
544 /**
545 * @brief Get the type ID.
546 * @return the object TypeId
547 */
548 static TypeId GetTypeId();
549
550 /**
551 * Constructor
552 */
554
555 /**
556 * Destructor
557 */
559
560 // Delete copy constructor and assignment operator to avoid misuse
565
566 private:
567 /**
568 * @brief Computes the pathloss between a and b considering that the line of
569 * sight is not obstructed
570 * @param a tx mobility model
571 * @param b rx mobility model
572 * @return pathloss value in dB
573 */
574 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
575
576 /**
577 * @brief Returns the minimum of the two independently generated distances
578 * according to the uniform distribution between the minimum and the maximum
579 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
580 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
581 * for RMa.
582 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
583 * generated. 2D−in distance is used for the O2I penetration losses
584 * calculation according to 3GPP TR 38.901 7.4.3.
585 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
586 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
587 */
588 double GetO2iDistance2dIn() const override;
589
590 /**
591 * @brief Computes the pathloss between a and b considering that the line of
592 * sight is obstructed.
593 * @param a tx mobility model
594 * @param b rx mobility model
595 * @return pathloss value in dB
596 */
597 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
598
599 /**
600 * @brief Returns the shadow fading standard deviation
601 * @param a tx mobility model
602 * @param b rx mobility model
603 * @param cond the LOS/NLOS channel condition
604 * @return shadowing std in dB
605 */
608 ChannelCondition::LosConditionValue cond) const override;
609
610 /**
611 * @brief Returns the shadow fading correlation distance
612 * @param cond the LOS/NLOS channel condition
613 * @return shadowing correlation distance in meters
614 */
616
617 /**
618 * @brief Computes the breakpoint distance
619 * @param hUt height of the UT node in meters
620 * @param hBs height of the BS node in meters
621 * @param distance2D distance between the two nodes in meters
622 * @return the breakpoint distance in meters
623 */
624 double GetBpDistance(double hUt, double hBs, double distance2D) const;
625};
626
627/**
628 * @ingroup propagation
629 *
630 * @brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
631 * for the Indoor Office scenario.
632 */
634{
635 public:
636 /**
637 * @brief Get the type ID.
638 * @return the object TypeId
639 */
640 static TypeId GetTypeId();
641
642 /**
643 * Constructor
644 */
646
647 /**
648 * Destructor
649 */
651
652 // Delete copy constructor and assignment operator to avoid misuse
654 delete;
657
658 private:
659 /**
660 * @brief Computes the pathloss between a and b considering that the line of
661 * sight is not obstructed
662 * @param a tx mobility model
663 * @param b rx mobility model
664 * @return pathloss value in dB
665 */
666 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
667
668 /**
669 * @brief Returns the minimum of the two independently generated distances
670 * according to the uniform distribution between the minimum and the maximum
671 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
672 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
673 * for RMa.
674 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
675 * generated. 2D−in distance is used for the O2I penetration losses
676 * calculation according to 3GPP TR 38.901 7.4.3.
677 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
678 * @return Returns 02i 2D distance (in meters) used to calculate low/high losses.
679 */
680 double GetO2iDistance2dIn() const override;
681
682 /**
683 * @brief Computes the pathloss between a and b considering that the line of
684 * sight is obstructed
685 * @param a tx mobility model
686 * @param b rx mobility model
687 * @return pathloss value in dB
688 */
689 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
690
691 /**
692 * @brief Returns the shadow fading standard deviation
693 * @param a tx mobility model
694 * @param b rx mobility model
695 * @param cond the LOS/NLOS channel condition
696 * @return shadowing std in dB
697 */
700 ChannelCondition::LosConditionValue cond) const override;
701
702 /**
703 * @brief Returns the shadow fading correlation distance
704 * @param cond the LOS/NLOS channel condition
705 * @return shadowing correlation distance in meters
706 */
708};
709
710/**
711 * @ingroup propagation
712 *
713 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
714 * for the NTN Dense Urban scenario.
715 */
717{
718 public:
719 /**
720 * @brief Get the type ID.
721 * @return the object TypeId
722 */
723 static TypeId GetTypeId();
724
725 /**
726 * Constructor
727 */
729
730 /**
731 * Destructor
732 */
734
735 /**
736 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
737 * Does nothing in NTN scenarios.
738 */
739 double GetO2iDistance2dIn() const override;
740
741 /**
742 * @brief Copy constructor
743 *
744 * Deleted in base class
745 */
747 delete;
748
749 /**
750 * @brief Copy constructor
751 *
752 * Deleted in base class
753 * @returns the ThreeGppNTNDenseUrbanPropagationLossModel instance
754 */
757
758 private:
759 // Inherited
760 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
761 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
764 ChannelCondition::LosConditionValue cond) const override;
766
767 /**
768 * @brief The nested map containing the Shadow Fading and
769 * Clutter Loss values for the NTN Dense Urban scenario
770 */
771 const std::map<int, std::vector<float>>* m_SFCL_DenseUrban;
772};
773
774/**
775 * @ingroup propagation
776 *
777 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
778 * for the NTN Urban scenario.
779 */
781{
782 public:
783 /**
784 * @brief Get the type ID.
785 * @return the object TypeId
786 */
787 static TypeId GetTypeId();
788
789 /**
790 * Constructor
791 */
793
794 /**
795 * Destructor
796 */
798
799 /**
800 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
801 * Does nothing in NTN scenarios.
802 */
803 double GetO2iDistance2dIn() const override;
804
805 /**
806 * @brief Copy constructor
807 *
808 * Deleted in base class
809 */
811
812 /**
813 * @brief Copy constructor
814 *
815 * Deleted in base class
816 * @returns the ThreeGppNTNUrbanPropagationLossModel instance
817 */
819 delete;
820
821 private:
822 // Inherited
823 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
824 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
827 ChannelCondition::LosConditionValue cond) const override;
829
830 /**
831 * @brief The nested map containing the Shadow Fading and
832 * Clutter Loss values for the NTN Urban scenario
833 */
834 const std::map<int, std::vector<float>>* m_SFCL_Urban;
835};
836
837/**
838 * @ingroup propagation
839 *
840 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
841 * for the NTN Suburban scenario.
842 */
844{
845 public:
846 /**
847 * @brief Get the type ID.
848 * @return the object TypeId
849 */
850 static TypeId GetTypeId();
851
852 /**
853 * Constructor
854 */
856
857 /**
858 * Destructor
859 */
861
862 /**
863 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
864 * Does nothing in NTN scenarios.
865 */
866 double GetO2iDistance2dIn() const override;
867
868 /**
869 * @brief Copy constructor
870 *
871 * Deleted in base class
872 */
874 delete;
875
876 /**
877 * @brief Copy constructor
878 *
879 * Deleted in base class
880 * @returns the ThreeGppNTNSuburbanPropagationLossModel instance
881 */
884
885 private:
886 // Inherited
887 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
888 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
891 ChannelCondition::LosConditionValue cond) const override;
893
894 /**
895 * @brief The nested map containing the Shadow Fading and
896 * Clutter Loss values for the NTN Suburban and Rural scenario
897 */
898 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
899};
900
901/**
902 * @ingroup propagation
903 *
904 * @brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
905 * for the NTN Rural scenario.
906 */
908{
909 public:
910 /**
911 * @brief Get the type ID.
912 * @return the object TypeId
913 */
914 static TypeId GetTypeId();
915
916 /**
917 * Constructor
918 */
920
921 /**
922 * Destructor
923 */
925
926 /**
927 * @copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
928 * Does nothing in NTN scenarios.
929 */
930 double GetO2iDistance2dIn() const override;
931
932 /**
933 * @brief Copy constructor
934 *
935 * Deleted in base class
936 */
938
939 /**
940 * @brief Copy constructor
941 *
942 * Deleted in base class
943 * @returns the ThreeGppNTNRuralPropagationLossModel instance
944 */
946 delete;
947
948 private:
949 // Inherited
950 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
951 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
954 ChannelCondition::LosConditionValue cond) const override;
956
957 /**
958 * @brief The nested map containing the Shadow Fading and
959 * Clutter Loss values for the NTN Suburban and Rural scenario
960 */
961 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
962};
963
964} // namespace ns3
965
966#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.
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...
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.
ThreeGppIndoorOfficePropagationLossModel & operator=(const ThreeGppIndoorOfficePropagationLossModel &)=delete
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 38.811, Table ???? for the NTN Dense Urban scenario.
ThreeGppNTNDenseUrbanPropagationLossModel(const ThreeGppNTNDenseUrbanPropagationLossModel &)=delete
Copy constructor.
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
ThreeGppNTNDenseUrbanPropagationLossModel & operator=(const ThreeGppNTNDenseUrbanPropagationLossModel &)=delete
Copy constructor.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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.
const std::map< int, std::vector< float > > * m_SFCL_DenseUrban
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Dense Urban scenario.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
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.
Implements the pathloss model defined in 3GPP TR 38.811, Table ???? for the NTN Rural scenario.
const std::map< int, std::vector< float > > * m_SFCL_SuburbanRural
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Suburban and Rural sc...
ThreeGppNTNRuralPropagationLossModel(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
ThreeGppNTNRuralPropagationLossModel & operator=(const ThreeGppNTNRuralPropagationLossModel &)=delete
Copy constructor.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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.
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 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 38.811, Table ???? for the NTN Suburban scenario.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
const std::map< int, std::vector< float > > * m_SFCL_SuburbanRural
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Suburban and Rural sc...
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
ThreeGppNTNSuburbanPropagationLossModel(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
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.
ThreeGppNTNSuburbanPropagationLossModel & operator=(const ThreeGppNTNSuburbanPropagationLossModel &)=delete
Copy constructor.
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.
Implements the pathloss model defined in 3GPP TR 38.811, Table ???? for the NTN Urban scenario.
ThreeGppNTNUrbanPropagationLossModel & operator=(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
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.
const std::map< int, std::vector< float > > * m_SFCL_Urban
The nested map containing the Shadow Fading and Clutter Loss values for the NTN Urban scenario.
double GetShadowingCorrelationDistance(ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading correlation distance.
ThreeGppNTNUrbanPropagationLossModel(const ThreeGppNTNUrbanPropagationLossModel &)=delete
Copy constructor.
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.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
double GetShadowingStd(Ptr< MobilityModel > a, Ptr< MobilityModel > b, ChannelCondition::LosConditionValue cond) const override
Returns the shadow fading standard deviation.
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.
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.
double GetLoss(Ptr< ChannelCondition > cond, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Computes the pathloss between a and b.
Ptr< UniformRandomVariable > m_randomO2iVar1
a uniform random variable for the calculation of the indoor loss, see TR38.901 Table 7....
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 GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Computes the pathloss between a and b considering that the line of sight is 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.
virtual double GetLossNlosv(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Computes the pathloss between a and b considering that the line of sight is obstructed by a vehicle.
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.
Ptr< NormalRandomVariable > m_normalO2iHighLossVar
a normal random variable for the calculation of 02i high loss, see TR38.901 Table 7....
static std::function< Ptr< MobilityModel >(Ptr< const MobilityModel >, Ptr< const MobilityModel >)> m_doCalcRxPowerPrologueFunction
Optional prologue function that can be used to implement wraparound models.
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.
static void InstallDoCalcRxPowerPrologueFunction(std::function< Ptr< MobilityModel >(Ptr< const MobilityModel >, Ptr< const MobilityModel >)> prologueFunction)
Stop-gap solution for wraparound model.
bool m_buildingPenLossesEnabled
enable/disable building penetration losses
virtual double GetLossLos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
Computes the pathloss between a and b considering that the line of sight is not obstructed.
Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1 for the RMa scenario.
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.
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 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.
double GetO2iDistance2dIn() const override
Returns the minimum of the two independently generated distances according to the uniform distributio...
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 GetLossNlos(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
Computes the pathloss between a and b considering that the line of sight is 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.
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.
ThreeGppUmaPropagationLossModel(const ThreeGppUmaPropagationLossModel &)=delete
ThreeGppUmaPropagationLossModel & operator=(const ThreeGppUmaPropagationLossModel &)=delete
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
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.
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(Ptr< MobilityModel > a, Ptr< MobilityModel > b) 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:49
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