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 private:
79 /**
80 * Computes the received power by applying the pathloss model described in
81 * 3GPP TR 38.901
82 *
83 * \param txPowerDbm tx power in dBm
84 * \param a tx mobility model
85 * \param b rx mobility model
86 * \return the rx power in dBm
87 */
88 double DoCalcRxPower(double txPowerDbm,
90 Ptr<MobilityModel> b) const override;
91
92 int64_t DoAssignStreams(int64_t stream) override;
93
94 /**
95 * \brief Computes the pathloss between a and b
96 * \param cond the channel condition
97 * \param a tx mobility model
98 * \param b rx mobility model
99 * \return pathloss value in dB
100 */
102
103 /**
104 * \brief Computes the pathloss between a and b considering that the line of
105 * sight is not obstructed
106 * \param a tx mobility model
107 * \param b rx mobility model
108 * \return pathloss value in dB
109 */
110 virtual double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
111
112 /**
113 * \brief Computes the pathloss between a and b considering that the line of
114 * sight is obstructed
115 * \param a tx mobility model
116 * \param b rx mobility model
117 * \return pathloss value in dB
118 */
119 virtual double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
120
121 /**
122 * \brief Returns the minimum of the two independently generated distances
123 * according to the uniform distribution between the minimum and the maximum
124 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
125 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
126 * for RMa.
127 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
128 * generated. 2D−in distance is used for the O2I penetration losses
129 * calculation according to 3GPP TR 38.901 7.4.3.
130 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
131 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
132 */
133 virtual double GetO2iDistance2dIn() const = 0;
134
135 /**
136 * \brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
137 * If not found or if the channel condition changed it generates a new
138 * independent realization and stores it in the map, otherwise it calculates
139 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
140 *
141 * Note that all child classes should implement this function to support
142 * low losses calculation. As such, this function should be purely virtual.
143 *
144 * \param a tx mobility model (used for the key calculation)
145 * \param b rx mobility model (used for the key calculation)
146 * \param cond the LOS/NLOS channel condition
147 * \return o2iLoss
148 */
152
153 /**
154 * \brief Retrieves the o2i building penetration loss value by looking at m_o2iLossMap.
155 * If not found or if the channel condition changed it generates a new
156 * independent realization and stores it in the map, otherwise it calculates
157 * a new value as defined in 3GPP TR 38.901 7.4.3.1.
158 *
159 * Note that all child classes should implement this function to support
160 * high losses calculation. As such, this function should be purely virtual.
161 *
162 * \param a tx mobility model (used for the key calculation)
163 * \param b rx mobility model (used for the key calculation)
164 * \param cond the LOS/NLOS channel condition
165 * \return o2iLoss
166 */
170
171 /**
172 * \brief Indicates the condition of the o2i building penetration loss
173 * (defined in 3GPP TR 38.901 7.4.3.1).
174 * The default implementation returns the condition as set
175 * (either based on the buildings materials, or if the probabilistic
176 * model is used in the ThreeGppChannelConditionModel, then
177 * based on the result of a random variable).
178 * The derived classes can change the default behavior by overriding
179 * this method.
180 * \param cond the ptr to the channel condition model
181 * \return True for low losses, false for high losses
182 */
184
185 /**
186 * \brief Computes the pathloss between a and b considering that the line of
187 * sight is obstructed by a vehicle. By default it raises an error to
188 * avoid misuse.
189 * \param a tx mobility model
190 * \param b rx mobility model
191 * \return pathloss value in dB
192 */
193 virtual double GetLossNlosv(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const;
194
195 /**
196 * \brief Retrieves the shadowing value by looking at m_shadowingMap.
197 * If not found or if the channel condition changed it generates a new
198 * independent realization and stores it in the map, otherwise it correlates
199 * the new value with the previous one using the autocorrelation function
200 * defined in 3GPP TR 38.901, Sec. 7.4.4.
201 * \param a tx mobility model
202 * \param b rx mobility model
203 * \param cond the LOS/NLOS channel condition
204 * \return shadowing loss in dB
205 */
209
210 /**
211 * \brief Returns the shadow fading standard deviation
212 * \param a tx mobility model
213 * \param b rx mobility model
214 * \param cond the LOS/NLOS channel condition
215 * \return shadowing std in dB
216 */
220
221 /**
222 * \brief Returns the shadow fading correlation distance
223 * \param cond the LOS/NLOS channel condition
224 * \return shadowing correlation distance in meters
225 */
228
229 /**
230 * \brief Returns an unique key for the channel between a and b.
231 *
232 * The key is the value of the Cantor function calculated by using as
233 * first parameter the lowest node ID, and as a second parameter the highest
234 * node ID.
235 *
236 * \param a tx mobility model
237 * \param b rx mobility model
238 * \return channel key
239 */
241
242 /**
243 * \brief Get the difference between the node position
244 *
245 * The difference is calculated as (b-a) if Id(a) < Id (b), or
246 * (a-b) if Id(b) <= Id(a).
247 *
248 * \param a First node
249 * \param b Second node
250 * \return the difference between the node vector position
251 */
253
254 protected:
255 void DoDispose() override;
256
257 /**
258 * \brief Computes the 2D distance between two 3D vectors
259 * \param a the first 3D vector
260 * \param b the second 3D vector
261 * \return the 2D distance between a and b
262 */
263 static double Calculate2dDistance(Vector a, Vector b);
264
265 Ptr<ChannelConditionModel> m_channelConditionModel; //!< pointer to the channel condition model
266 double m_frequency; //!< operating frequency in Hz
267 bool m_shadowingEnabled; //!< enable/disable shadowing
268 bool m_enforceRanges; //!< strictly enforce TR 38.901 parameter ranges
269 bool m_buildingPenLossesEnabled; //!< enable/disable building penetration losses
271
272 /** Define a struct for the m_shadowingMap entries */
274 {
275 double m_shadowing; //!< the shadowing loss in dB
277 Vector m_distance; //!< the vector AB
278 };
279
280 mutable std::unordered_map<uint32_t, ShadowingMapItem>
281 m_shadowingMap; //!< map to store the shadowing values
282
283 /** Define a struct for the m_o2iLossMap entries */
285 {
286 double m_o2iLoss; //!< the o2i loss in dB
288 };
289
290 mutable std::unordered_map<uint32_t, O2iLossMapItem>
291 m_o2iLossMap; //!< map to store the o2i Loss values
292
293 Ptr<UniformRandomVariable> m_randomO2iVar1; //!< a uniform random variable for the calculation
294 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
295 Ptr<UniformRandomVariable> m_randomO2iVar2; //!< a uniform random variable for the calculation
296 //!< of the indoor loss, see TR38.901 Table 7.4.3-2
298 m_normalO2iLowLossVar; //!< a normal random variable for the calculation of 02i low loss,
299 //!< see TR38.901 Table 7.4.3-2
301 m_normalO2iHighLossVar; //!< a normal random variable for the calculation of 02i high loss,
302 //!< see TR38.901 Table 7.4.3-2
303};
304
305/**
306 * \ingroup propagation
307 *
308 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
309 * for the RMa scenario.
310 */
312{
313 public:
314 /**
315 * \brief Get the type ID.
316 * \return the object TypeId
317 */
318 static TypeId GetTypeId();
319
320 /**
321 * Constructor
322 */
324
325 /**
326 * Destructor
327 */
329
330 // Delete copy constructor and assignment operator to avoid misuse
333
334 private:
335 /**
336 * \brief Computes the pathloss between a and b considering that the line of
337 * sight is not obstructed
338 * \param a tx mobility model
339 * \param b rx mobility model
340 * \return pathloss value in dB
341 */
342 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
343
344 /**
345 * \brief Returns the minimum of the two independently generated distances
346 * according to the uniform distribution between the minimum and the maximum
347 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
348 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
349 * for RMa.
350 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
351 * generated. 2D−in distance is used for the O2I penetration losses
352 * calculation according to 3GPP TR 38.901 7.4.3.
353 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
354 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
355 */
356 double GetO2iDistance2dIn() const override;
357
358 /**
359 * \brief Indicates the condition of the o2i building penetration loss
360 * (defined in 3GPP TR 38.901 7.4.3.1).
361 * \param cond the ptr to the channel condition model
362 * \return True for low losses, false for high losses
363 */
365
366 /**
367 * \brief Computes the pathloss between a and b considering that the line of
368 * sight is obstructed
369 * \param a tx mobility model
370 * \param b rx mobility model
371 * \return pathloss value in dB
372 */
373 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
374
375 /**
376 * \brief Returns the shadow fading standard deviation
377 * \param a tx mobility model
378 * \param b rx mobility model
379 * \param cond the LOS/NLOS channel condition
380 * \return shadowing std in dB
381 */
384 ChannelCondition::LosConditionValue cond) const override;
385
386 /**
387 * \brief Returns the shadow fading correlation distance
388 * \param cond the LOS/NLOS channel condition
389 * \return shadowing correlation distance in meters
390 */
392
393 /**
394 * \brief Computes the PL1 formula for the RMa scenario
395 * \param frequency the operating frequency in Hz
396 * \param distance3D the 3D distance between the tx and the rx nodes in meters
397 * \param h the average building height in meters
398 * \param w the average street width in meters
399 * \return result of the PL1 formula
400 */
401 static double Pl1(double frequency, double distance3D, double h, double w);
402
403 /**
404 * \brief Computes the breakpoint distance for the RMa scenario
405 * \param frequency the operating frequency in Hz
406 * \param hA height of the tx node in meters
407 * \param hB height of the rx node in meters
408 * \return the breakpoint distance in meters
409 */
410 static double GetBpDistance(double frequency, double hA, double hB);
411
412 double m_h; //!< average building height in meters
413 double m_w; //!< average street width in meters
414};
415
416/**
417 * \ingroup propagation
418 *
419 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
420 * for the UMa scenario.
421 */
423{
424 public:
425 /**
426 * \brief Get the type ID.
427 * \return the object TypeId
428 */
429 static TypeId GetTypeId();
430
431 /**
432 * Constructor
433 */
435
436 /**
437 * Destructor
438 */
440
441 // Delete copy constructor and assignment operator to avoid misuse
444
445 private:
446 int64_t DoAssignStreams(int64_t stream) override;
447
448 /**
449 * \brief Computes the pathloss between a and b considering that the line of
450 * sight is not obstructed
451 * \param a tx mobility model
452 * \param b rx mobility model
453 * \return pathloss value in dB
454 */
455 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
456
457 /**
458 * \brief Returns the minimum of the two independently generated distances
459 * according to the uniform distribution between the minimum and the maximum
460 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
461 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
462 * for RMa.
463 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
464 * generated. 2D−in distance is used for the O2I penetration losses
465 * calculation according to 3GPP TR 38.901 7.4.3.
466 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
467 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
468 */
469 double GetO2iDistance2dIn() const override;
470
471 /**
472 * \brief Computes the pathloss between a and b considering that the line of
473 * sight is obstructed.
474 * \param a tx mobility model
475 * \param b rx mobility model
476 * \return pathloss value in dB
477 */
478 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
479
480 /**
481 * \brief Returns the shadow fading standard deviation
482 * \param a tx mobility model
483 * \param b rx mobility model
484 * \param cond the LOS/NLOS channel condition
485 * \return shadowing std in dB
486 */
489 ChannelCondition::LosConditionValue cond) const override;
490
491 /**
492 * \brief Returns the shadow fading correlation distance
493 * \param cond the LOS/NLOS channel condition
494 * \return shadowing correlation distance in meters
495 */
497
498 /**
499 * \brief Computes the breakpoint distance
500 * \param hUt height of the UT in meters
501 * \param hBs height of the BS in meters
502 * \param distance2D distance between the two nodes in meters
503 * \return the breakpoint distance in meters
504 */
505 double GetBpDistance(double hUt, double hBs, double distance2D) const;
506
507 Ptr<UniformRandomVariable> m_uniformVar; //!< a uniform random variable used for the computation
508 //!< of the breakpoint distance
509};
510
511/**
512 * \ingroup propagation
513 *
514 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
515 * for the UMi-Street Canyon scenario.
516 */
518{
519 public:
520 /**
521 * \brief Get the type ID.
522 * \return the object TypeId
523 */
524 static TypeId GetTypeId();
525
526 /**
527 * Constructor
528 */
530
531 /**
532 * Destructor
533 */
535
536 // Delete copy constructor and assignment operator to avoid misuse
541
542 private:
543 /**
544 * \brief Computes the pathloss between a and b considering that the line of
545 * sight is not obstructed
546 * \param a tx mobility model
547 * \param b rx mobility model
548 * \return pathloss value in dB
549 */
550 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
551
552 /**
553 * \brief Returns the minimum of the two independently generated distances
554 * according to the uniform distribution between the minimum and the maximum
555 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
556 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
557 * for RMa.
558 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
559 * generated. 2D−in distance is used for the O2I penetration losses
560 * calculation according to 3GPP TR 38.901 7.4.3.
561 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
562 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
563 */
564 double GetO2iDistance2dIn() const override;
565
566 /**
567 * \brief Computes the pathloss between a and b considering that the line of
568 * sight is obstructed.
569 * \param a tx mobility model
570 * \param b rx mobility model
571 * \return pathloss value in dB
572 */
573 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
574
575 /**
576 * \brief Returns the shadow fading standard deviation
577 * \param a tx mobility model
578 * \param b rx mobility model
579 * \param cond the LOS/NLOS channel condition
580 * \return shadowing std in dB
581 */
584 ChannelCondition::LosConditionValue cond) const override;
585
586 /**
587 * \brief Returns the shadow fading correlation distance
588 * \param cond the LOS/NLOS channel condition
589 * \return shadowing correlation distance in meters
590 */
592
593 /**
594 * \brief Computes the breakpoint distance
595 * \param hUt height of the UT node in meters
596 * \param hBs height of the BS node in meters
597 * \param distance2D distance between the two nodes in meters
598 * \return the breakpoint distance in meters
599 */
600 double GetBpDistance(double hUt, double hBs, double distance2D) const;
601};
602
603/**
604 * \ingroup propagation
605 *
606 * \brief Implements the pathloss model defined in 3GPP TR 38.901, Table 7.4.1-1
607 * for the Indoor Office scenario.
608 */
610{
611 public:
612 /**
613 * \brief Get the type ID.
614 * \return the object TypeId
615 */
616 static TypeId GetTypeId();
617
618 /**
619 * Constructor
620 */
622
623 /**
624 * Destructor
625 */
627
628 // Delete copy constructor and assignment operator to avoid misuse
630 delete;
633
634 private:
635 /**
636 * \brief Computes the pathloss between a and b considering that the line of
637 * sight is not obstructed
638 * \param a tx mobility model
639 * \param b rx mobility model
640 * \return pathloss value in dB
641 */
642 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
643
644 /**
645 * \brief Returns the minimum of the two independently generated distances
646 * according to the uniform distribution between the minimum and the maximum
647 * value depending on the specific 3GPP scenario (UMa, UMi-Street Canyon, RMa),
648 * i.e., between 0 and 25 m for UMa and UMi-Street Canyon, and between 0 and 10 m
649 * for RMa.
650 * According to 3GPP TR 38.901 this 2D−in distance shall be UT-specifically
651 * generated. 2D−in distance is used for the O2I penetration losses
652 * calculation according to 3GPP TR 38.901 7.4.3.
653 * See GetO2iLowPenetrationLoss/GetO2iHighPenetrationLoss functions.
654 * \return Returns 02i 2D distance (in meters) used to calculate low/high losses.
655 */
656 double GetO2iDistance2dIn() const override;
657
658 /**
659 * \brief Computes the pathloss between a and b considering that the line of
660 * sight is obstructed
661 * \param a tx mobility model
662 * \param b rx mobility model
663 * \return pathloss value in dB
664 */
665 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
666
667 /**
668 * \brief Returns the shadow fading standard deviation
669 * \param a tx mobility model
670 * \param b rx mobility model
671 * \param cond the LOS/NLOS channel condition
672 * \return shadowing std in dB
673 */
676 ChannelCondition::LosConditionValue cond) const override;
677
678 /**
679 * \brief Returns the shadow fading correlation distance
680 * \param cond the LOS/NLOS channel condition
681 * \return shadowing correlation distance in meters
682 */
684};
685
686/**
687 * \ingroup propagation
688 *
689 * \brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
690 * for the NTN Dense Urban scenario.
691 */
693{
694 public:
695 /**
696 * \brief Get the type ID.
697 * \return the object TypeId
698 */
699 static TypeId GetTypeId();
700
701 /**
702 * Constructor
703 */
705
706 /**
707 * Destructor
708 */
710
711 /**
712 * \copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
713 * Does nothing in NTN scenarios.
714 */
715 double GetO2iDistance2dIn() const override;
716
717 /**
718 * \brief Copy constructor
719 *
720 * Deleted in base class
721 */
723 delete;
724
725 /**
726 * \brief Copy constructor
727 *
728 * Deleted in base class
729 * \returns the ThreeGppNTNDenseUrbanPropagationLossModel instance
730 */
733
734 private:
735 // Inherited
736 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
737 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
740 ChannelCondition::LosConditionValue cond) const override;
742
743 /**
744 * \brief The nested map containing the Shadow Fading and
745 * Clutter Loss values for the NTN Dense Urban scenario
746 */
747 const std::map<int, std::vector<float>>* m_SFCL_DenseUrban;
748};
749
750/**
751 * \ingroup propagation
752 *
753 * \brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
754 * for the NTN Urban scenario.
755 */
757{
758 public:
759 /**
760 * \brief Get the type ID.
761 * \return the object TypeId
762 */
763 static TypeId GetTypeId();
764
765 /**
766 * Constructor
767 */
769
770 /**
771 * Destructor
772 */
774
775 /**
776 * \copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
777 * Does nothing in NTN scenarios.
778 */
779 double GetO2iDistance2dIn() const override;
780
781 /**
782 * \brief Copy constructor
783 *
784 * Deleted in base class
785 */
787
788 /**
789 * \brief Copy constructor
790 *
791 * Deleted in base class
792 * \returns the ThreeGppNTNUrbanPropagationLossModel instance
793 */
795 delete;
796
797 private:
798 // Inherited
799 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
800 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
803 ChannelCondition::LosConditionValue cond) const override;
805
806 /**
807 * \brief The nested map containing the Shadow Fading and
808 * Clutter Loss values for the NTN Urban scenario
809 */
810 const std::map<int, std::vector<float>>* m_SFCL_Urban;
811};
812
813/**
814 * \ingroup propagation
815 *
816 * \brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
817 * for the NTN Suburban scenario.
818 */
820{
821 public:
822 /**
823 * \brief Get the type ID.
824 * \return the object TypeId
825 */
826 static TypeId GetTypeId();
827
828 /**
829 * Constructor
830 */
832
833 /**
834 * Destructor
835 */
837
838 /**
839 * \copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
840 * Does nothing in NTN scenarios.
841 */
842 double GetO2iDistance2dIn() const override;
843
844 /**
845 * \brief Copy constructor
846 *
847 * Deleted in base class
848 */
850 delete;
851
852 /**
853 * \brief Copy constructor
854 *
855 * Deleted in base class
856 * \returns the ThreeGppNTNSuburbanPropagationLossModel instance
857 */
860
861 private:
862 // Inherited
863 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
864 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
867 ChannelCondition::LosConditionValue cond) const override;
869
870 /**
871 * \brief The nested map containing the Shadow Fading and
872 * Clutter Loss values for the NTN Suburban and Rural scenario
873 */
874 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
875};
876
877/**
878 * \ingroup propagation
879 *
880 * \brief Implements the pathloss model defined in 3GPP TR 38.811, Table ????
881 * for the NTN Rural scenario.
882 */
884{
885 public:
886 /**
887 * \brief Get the type ID.
888 * \return the object TypeId
889 */
890 static TypeId GetTypeId();
891
892 /**
893 * Constructor
894 */
896
897 /**
898 * Destructor
899 */
901
902 /**
903 * \copydoc ThreeGppPropagationLossModel::GetO2iDistance2dIn
904 * Does nothing in NTN scenarios.
905 */
906 double GetO2iDistance2dIn() const override;
907
908 /**
909 * \brief Copy constructor
910 *
911 * Deleted in base class
912 */
914
915 /**
916 * \brief Copy constructor
917 *
918 * Deleted in base class
919 * \returns the ThreeGppNTNRuralPropagationLossModel instance
920 */
922 delete;
923
924 private:
925 // Inherited
926 double GetLossLos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
927 double GetLossNlos(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const override;
930 ChannelCondition::LosConditionValue cond) const override;
932
933 /**
934 * \brief The nested map containing the Shadow Fading and
935 * Clutter Loss values for the NTN Suburban and Rural scenario
936 */
937 const std::map<int, std::vector<float>>* m_SFCL_SuburbanRural;
938};
939
940} // namespace ns3
941
942#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....
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
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:48
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