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