A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
channel-condition-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 CHANNEL_CONDITION_MODEL_H
9#define CHANNEL_CONDITION_MODEL_H
10
11#include "ns3/nstime.h"
12#include "ns3/object.h"
13#include "ns3/random-variable-stream.h"
14#include "ns3/vector.h"
15
16#include <map>
17#include <unordered_map>
18
19namespace ns3
20{
21
22class MobilityModel;
23
24/**
25 * \ingroup propagation
26 *
27 * \brief Carries information about the LOS/NLOS channel state
28 *
29 * Additional information about the channel condition can be aggregated to instances of
30 * this class.
31 */
33{
34 public:
35 /**
36 * Possible values for Line-of-Sight condition.
37 */
39 {
40 LOS, //!< Line of Sight
41 NLOS, //!< Non Line of Sight
42 NLOSv, //!< Non Line of Sight due to a vehicle
43 LC_ND //!< Los condition not defined
44 };
45
46 /**
47 * Possible values for Outdoor to Indoor condition.
48 */
50 {
51 O2O, //!< Outdoor to Outdoor
52 O2I, //!< Outdoor to Indoor
53 I2I, //!< Indoor to Indoor
54 O2I_ND //!< Outdoor to Indoor condition not defined
55 };
56
57 /**
58 * Possible values for Low-High Penetration Loss condition.
59 */
61 {
62 LOW, //!< Low Penetration Losses
63 HIGH, //!< High Penetration Losses
64 LH_O2I_ND //!< Low-High Penetration Losses not defined
65 };
66
67 /**
68 * Get the type ID.
69 * \brief Get the type ID.
70 * \return the object TypeId
71 */
72 static TypeId GetTypeId();
73
74 /**
75 * Constructor for the ChannelCondition class
76 */
78
79 /**
80 * Constructor for the ChannelCondition class
81 * \param losCondition the LOS condition value
82 * \param o2iCondition the O2I condition value (by default is set to O2O)
83 * \param o2iLowHighCondition the O2I Low-High Building Penetration loss condition value (by
84 * default is set to LOW)
85 */
86 ChannelCondition(LosConditionValue losCondition,
87 O2iConditionValue o2iCondition = O2O,
88 O2iLowHighConditionValue o2iLowHighCondition = LOW);
89
90 /**
91 * Destructor for the ChannelCondition class
92 */
93 ~ChannelCondition() override;
94
95 /**
96 * Get the LosConditionValue containing the information about the LOS/NLOS
97 * state of the channel
98 *
99 * \return the LosConditionValue
100 */
101 LosConditionValue GetLosCondition() const;
102
103 /**
104 * Set the LosConditionValue with the information about the LOS/NLOS
105 * state of the channel
106 *
107 * \param losCondition the LosConditionValue
108 */
109 void SetLosCondition(LosConditionValue losCondition);
110
111 /**
112 * Get the O2iConditionValue containing the information about the O2I
113 * state of the channel
114 *
115 * \return the O2iConditionValue
116 */
117 O2iConditionValue GetO2iCondition() const;
118
119 /**
120 * Set the O2iConditionValue containing the information about the O2I
121 * state of the channel
122 *
123 * \param o2iCondition the O2iConditionValue
124 */
125 void SetO2iCondition(O2iConditionValue o2iCondition);
126
127 /**
128 * Get the O2iLowHighConditionValue containing the information about the O2I
129 * building penetration losses (low or high)
130 *
131 * \return the O2iLowHighConditionValue
132 */
133 O2iLowHighConditionValue GetO2iLowHighCondition() const;
134
135 /**
136 * Set the O2iLowHighConditionValue containing the information about the O2I
137 * building penetration losses (low or high)
138 *
139 * \param o2iLowHighCondition the O2iLowHighConditionValue
140 */
141 void SetO2iLowHighCondition(O2iLowHighConditionValue o2iLowHighCondition);
142
143 /**
144 * Return true if the channel condition is LOS
145 *
146 * \return true if the channel condition is LOS
147 */
148 bool IsLos() const;
149
150 /**
151 * Return true if the channel condition is NLOS
152 *
153 * It does not consider the case in which the LOS path is obstructed by a
154 * vehicle. This case is represented as a separate channel condition (NLOSv),
155 * use the method IsNlosv instead.
156 *
157 * \return true if the channel condition is NLOS
158 */
159 bool IsNlos() const;
160
161 /**
162 * Return true if the channel condition is NLOSv
163 *
164 * \return true if the channel condition is NLOSv
165 */
166 bool IsNlosv() const;
167
168 /**
169 * Return true if the channel is outdoor-to-indoor
170 *
171 * \return true if the channel is outdoor-to-indoor
172 */
173 bool IsO2i() const;
174
175 /**
176 * Return true if the channel is outdoor-to-outdoor
177 *
178 * \return true if the channel is outdoor-to-outdoor
179 */
180 bool IsO2o() const;
181
182 /**
183 * Return true if the channel is indoor-to-indoor
184 *
185 * \return true if the channel is indoor-to-indoor
186 */
187 bool IsI2i() const;
188
189 /**
190 * Return true if this instance is equivalent to the one passed as argument
191 *
192 * \param losCondition the LOS condition of the other channel condition instance
193 * \param o2iCondition the 02I condition of the other channel condition instance
194 * \return true if the channel LOS and O2i conditions of the instance are equivalent to those
195 * passed as arguments
196 */
197 bool IsEqual(LosConditionValue losCondition, O2iConditionValue o2iCondition) const;
198
199 private:
200 LosConditionValue
201 m_losCondition; //!< contains the information about the LOS state of the channel
203 m_o2iCondition; //!< contains the information about the O2I state of the channel
204 O2iLowHighConditionValue m_o2iLowHighCondition; //!< contains the information about the O2I
205 //!< low-high building penetration losses
206
207 /**
208 * Prints a LosConditionValue to output
209 * \param os the output stream
210 * \param cond the LosConditionValue
211 *
212 * \return a reference to the output stream
213 */
214 friend std::ostream& operator<<(std::ostream& os, LosConditionValue cond);
215};
216
217/**
218 * \ingroup propagation
219 *
220 * \brief Models the channel condition
221 *
222 * Computes the condition of the channel between the transmitter and the
223 * receiver
224 */
226{
227 public:
228 /**
229 * Get the type ID.
230 * \brief Get the type ID.
231 * \return the object TypeId
232 */
233 static TypeId GetTypeId();
234
235 /**
236 * Constructor for the ChannelConditionModel class
237 */
239
240 /**
241 * Destructor for the ChannelConditionModel class
242 */
243 ~ChannelConditionModel() override;
244
245 // Delete copy constructor and assignment operator to avoid misuse
248
249 /**
250 * Computes the condition of the channel between a and b
251 *
252 * \param a mobility model
253 * \param b mobility model
254 * \return the condition of the channel between a and b
255 */
257 Ptr<const MobilityModel> b) const = 0;
258
259 /**
260 * If this model uses objects of type RandomVariableStream,
261 * set the stream numbers to the integers starting with the offset
262 * 'stream'. Return the number of streams (possibly zero) that
263 * have been assigned.
264 *
265 * \param stream the offset used to set the stream numbers
266 * \return the number of stream indices assigned by this model
267 */
268 virtual int64_t AssignStreams(int64_t stream) = 0;
269};
270
271/**
272 * \ingroup propagation
273 *
274 * \brief Models an always in-LoS condition model
275 */
277{
278 public:
279 /**
280 * Get the type ID.
281 * \brief Get the type ID.
282 * \return the object TypeId
283 */
284 static TypeId GetTypeId();
285
286 /**
287 * Constructor
288 */
290
291 /**
292 * Destructor
293 */
295
296 // Delete copy constructor and assignment operator to avoid misuse
299
300 /**
301 * Computes the condition of the channel between a and b, that will be always LoS
302 *
303 * \param a mobility model
304 * \param b mobility model
305 * \return the condition of the channel between a and b, that will be always LoS
306 */
308 Ptr<const MobilityModel> b) const override;
309
310 /**
311 * If this model uses objects of type RandomVariableStream,
312 * set the stream numbers to the integers starting with the offset
313 * 'stream'. Return the number of streams (possibly zero) that
314 * have been assigned.
315 *
316 * \param stream the offset used to set the stream numbers
317 * \return the number of stream indices assigned by this model
318 */
319 int64_t AssignStreams(int64_t stream) override;
320};
321
322/**
323 * \ingroup propagation
324 *
325 * \brief Models a never in-LoS condition model
326 */
328{
329 public:
330 /**
331 * Get the type ID.
332 * \brief Get the type ID.
333 * \return the object TypeId
334 */
335 static TypeId GetTypeId();
336
337 /**
338 * Constructor
339 */
341
342 /**
343 * Destructor
344 */
346
347 // Delete copy constructor and assignment operator to avoid misuse
350
351 /**
352 * Computes the condition of the channel between a and b, that will be always non-LoS
353 *
354 * \param a mobility model
355 * \param b mobility model
356 * \return the condition of the channel between a and b, that will be always non-LoS
357 */
359 Ptr<const MobilityModel> b) const override;
360
361 /**
362 * If this model uses objects of type RandomVariableStream,
363 * set the stream numbers to the integers starting with the offset
364 * 'stream'. Return the number of streams (possibly zero) that
365 * have been assigned.
366 *
367 * \param stream the offset used to set the stream numbers
368 * \return the number of stream indices assigned by this model
369 */
370 int64_t AssignStreams(int64_t stream) override;
371};
372
373/**
374 * \ingroup propagation
375 *
376 * \brief Models a never in-LoS condition model caused by a blocking vehicle
377 */
379{
380 public:
381 /**
382 * Get the type ID.
383 * \brief Get the type ID.
384 * \return the object TypeId
385 */
386 static TypeId GetTypeId();
387
388 /**
389 * Constructor
390 */
392
393 /**
394 * Destructor
395 */
397
398 // Delete copy constructor and assignment operator to avoid misuse
401 delete;
402
403 /**
404 * Computes the condition of the channel between a and b, that will be always NLOSv
405 *
406 * \param a mobility model
407 * \param b mobility model
408 * \return the condition of the channel between a and b, that will be always NLOSv
409 */
411 Ptr<const MobilityModel> b) const override;
412
413 /**
414 * If this model uses objects of type RandomVariableStream,
415 * set the stream numbers to the integers starting with the offset
416 * 'stream'. Return the number of streams (possibly zero) that
417 * have been assigned.
418 *
419 * \param stream the offset used to set the stream numbers
420 * \return the number of stream indices assigned by this model
421 */
422 int64_t AssignStreams(int64_t stream) override;
423};
424
425/**
426 * \ingroup propagation
427 *
428 * \brief Base class for the 3GPP channel condition models
429 *
430 */
432{
433 public:
434 /**
435 * Get the type ID.
436 * \brief Get the type ID.
437 * \return the object TypeId
438 */
439 static TypeId GetTypeId();
440
441 /**
442 * Constructor for the ThreeGppRmaChannelConditionModel class
443 */
445
446 /**
447 * Destructor for the ThreeGppRmaChannelConditionModel class
448 */
450
451 /**
452 * \brief Retrieve the condition of the channel between a and b.
453 *
454 * If the channel condition does not exists, the method computes it by calling
455 * ComputeChannelCondition and stores it in a local cache, that will be updated
456 * following the "UpdatePeriod" parameter.
457 *
458 * \param a mobility model
459 * \param b mobility model
460 * \return the condition of the channel between a and b
461 */
463 Ptr<const MobilityModel> b) const override;
464
465 /**
466 * If this model uses objects of type RandomVariableStream,
467 * set the stream numbers to the integers starting with the offset
468 * 'stream'. Return the number of streams (possibly zero) that
469 * have been assigned.
470 *
471 * \param stream the offset used to set the stream numbers
472 * \return the number of stream indices assigned by this model
473 */
474 int64_t AssignStreams(int64_t stream) override;
475
476 /**
477 * Computes and quantizes the elevation angle to a two-digits integer in [10, 90].
478 * Asserts that the provided mobility models are of the expected type, i.e.,
479 * GeocentricConstantPositionMobilityModel, and that the quantized
480 * angle is in the expected range [10, 90].
481 *
482 * \param a mobility model
483 * \param b mobility model
484 * \return the tuple [elevation angle, quantized elevation angle] between a and b
485 */
486 static std::tuple<double, double> GetQuantizedElevationAngle(Ptr<const MobilityModel> a,
488
489 /**
490 * \brief Computes the 2D distance between two 3D vectors
491 * \param a the first 3D vector
492 * \param b the second 3D vector
493 * \return the 2D distance between a and b
494 */
495 static double Calculate2dDistance(const Vector& a, const Vector& b);
496
497 protected:
498 void DoDispose() override;
499
500 /**
501 * Determine the density of vehicles in a V2V scenario.
502 */
510
511 Ptr<UniformRandomVariable> m_uniformVar; //!< uniform random variable
512
513 private:
514 /**
515 * This method computes the channel condition based on a probabilistic model
516 * that is specific for the scenario of interest
517 *
518 * \param a tx mobility model
519 * \param b rx mobility model
520 * \return the channel condition
521 */
524
525 /**
526 * Compute the LOS probability.
527 *
528 * \param a tx mobility model
529 * \param b rx mobility model
530 * \return the LOS probability
531 */
533
534 /**
535 * Determines whether the channel condition is O2I or O2O
536 *
537 * \param a tx mobility model
538 * \param b rx mobility model
539 * \return the O2I channelcondition
540 */
543
544 /**
545 * Compute the NLOS probability. By default returns 1 - PLOS
546 *
547 * \param a tx mobility model
548 * \param b rx mobility model
549 * \return the LOS probability
550 */
552
553 /**
554 * \brief Returns a unique and reciprocal key for the channel between a and b.
555 * \param a tx mobility model
556 * \param b rx mobility model
557 * \return channel key
558 */
560
561 /**
562 * Struct to store the channel condition in the m_channelConditionMap
563 */
564 struct Item
565 {
566 Ptr<ChannelCondition> m_condition; //!< the channel condition
567 Time m_generatedTime; //!< the time when the condition was generated
568 };
569
570 std::unordered_map<uint32_t, Item>
571 m_channelConditionMap; //!< map to store the channel conditions
572 Time m_updatePeriod; //!< the update period for the channel condition
573
575 0}; //!< the threshold for determining what is the ratio of channels with O2I
576 double m_o2iLowLossThreshold{0}; //!< the threshold for determining what is the ratio of low -
577 //!< high O2I building penetration losses
579 false}; //!< the indicator that determines whether the O2I/O2O condition is determined based
580 //!< on the UE height
581 Ptr<UniformRandomVariable> m_uniformVarO2i; //!< uniform random variable that is used for the
582 //!< generation of the O2i conditions
584 m_uniformO2iLowHighLossVar; //!< a uniform random variable for the calculation of the
585 //!< low/high losses, see TR38.901 Table 7.4.3-2
586};
587
588/**
589 * \ingroup propagation
590 *
591 * \brief Computes the channel condition for the RMa scenario
592 *
593 * Computes the channel condition following the specifications for the RMa
594 * scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
595 */
597{
598 public:
599 /**
600 * Get the type ID.
601 * \brief Get the type ID.
602 * \return the object TypeId
603 */
604 static TypeId GetTypeId();
605
606 /**
607 * Constructor for the ThreeGppRmaChannelConditionModel class
608 */
610
611 /**
612 * Destructor for the ThreeGppRmaChannelConditionModel class
613 */
615
616 private:
617 /**
618 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
619 * for the RMa scenario.
620 *
621 * \param a tx mobility model
622 * \param b rx mobility model
623 * \return the LOS probability
624 */
626};
627
628/**
629 * \ingroup propagation
630 *
631 * \brief Computes the channel condition for the UMa scenario
632 *
633 * Computes the channel condition following the specifications for the UMa
634 * scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
635 */
637{
638 public:
639 /**
640 * Get the type ID.
641 * \brief Get the type ID.
642 * \return the object TypeId
643 */
644 static TypeId GetTypeId();
645
646 /**
647 * Constructor for the ThreeGppUmaChannelConditionModel class
648 */
650
651 /**
652 * Destructor for the ThreeGppUmaChannelConditionModel class
653 */
655
656 private:
657 /**
658 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
659 * for the UMa scenario.
660 *
661 * \param a tx mobility model
662 * \param b rx mobility model
663 * \return the LOS probability
664 */
666};
667
668/**
669 * \ingroup propagation
670 *
671 * \brief Computes the channel condition for the UMi-Street canyon scenario
672 *
673 * Computes the channel condition following the specifications for the
674 * UMi-Street canyon scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
675 */
677{
678 public:
679 /**
680 * Get the type ID.
681 * \brief Get the type ID.
682 * \return the object TypeId
683 */
684 static TypeId GetTypeId();
685
686 /**
687 * Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class
688 */
690
691 /**
692 * Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class
693 */
695
696 private:
697 /**
698 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
699 * for the UMi-Street Canyon scenario.
700 *
701 * \param a tx mobility model
702 * \param b rx mobility model
703 * \return the LOS probability
704 */
706};
707
708/**
709 * \ingroup propagation
710 *
711 * \brief Computes the channel condition for the Indoor Mixed Office scenario
712 *
713 * Computes the channel condition following the specifications for the
714 * Indoor Mixed Office scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
715 */
717{
718 public:
719 /**
720 * Get the type ID.
721 * \brief Get the type ID.
722 * \return the object TypeId
723 */
724 static TypeId GetTypeId();
725
726 /**
727 * Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class
728 */
730
731 /**
732 * Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class
733 */
735
736 private:
737 /**
738 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
739 * for the Indoor Mixed Office scenario.
740 *
741 * \param a tx mobility model
742 * \param b rx mobility model
743 * \return the LOS probability
744 */
746};
747
748/**
749 * \ingroup propagation
750 *
751 * \brief Computes the channel condition for the Indoor Open Office scenario
752 *
753 * Computes the channel condition following the specifications for the
754 * Indoor Open Office scenario reported in Table 7.4.2-1 of 3GPP TR 38.901
755 */
757{
758 public:
759 /**
760 * Get the type ID.
761 * \brief Get the type ID.
762 * \return the object TypeId
763 */
764 static TypeId GetTypeId();
765
766 /**
767 * Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class
768 */
770
771 /**
772 * Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class
773 */
775
776 private:
777 /**
778 * Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901
779 * for the Indoor Open Office scenario.
780 *
781 * \param a tx mobility model
782 * \param b rx mobility model
783 * \return the LOS probability
784 */
786};
787
788/**
789 * \ingroup propagation
790 *
791 * \brief Computes the channel condition for the NTN Dense Urban Scenario
792 *
793 * Computes the channel condition following the specifications for the
794 * Indoor Mixed Office scenario reported in Table 6.6.1-1 of 3GPP TR 38.811
795 */
797{
798 public:
799 /**
800 * Register this type.
801 * \return The object TypeId.
802 */
803 static TypeId GetTypeId();
804
805 /**
806 * Constructor for the ThreeGppNTNDenseUrbanChannelConditionModel class
807 */
809
810 /**
811 * Destructor for the ThreeGppNTNDenseUrbanChannelConditionModel class
812 */
814
815 private:
816 /**
817 * \copydoc ThreeGppChannelConditionModel::ComputePlos
818 *
819 * Compute the LOS probability as specified in Table 6.6.1-1 of 3GPP TR 38.811
820 * for the NTN Dense Urban scenario.
821 */
823};
824
825/**
826 * \ingroup propagation
827 *
828 * \brief Computes the channel condition for the NTN Urban Scenario
829 *
830 * Computes the channel condition following the specifications for the
831 * Indoor Mixed Office scenario reported in Table 6.6.1-1 of 3GPP TR 38.811
832 */
834{
835 public:
836 /**
837 * Register this type.
838 * \return The object TypeId.
839 */
840 static TypeId GetTypeId();
841
842 /**
843 * Constructor for the ThreeGppNTNUrbanChannelConditionModel class
844 */
846
847 /**
848 * Destructor for the ThreeGppNTNUrbanChannelConditionModel class
849 */
851
852 private:
853 /**
854 * \copydoc ThreeGppChannelConditionModel::ComputePlos
855 *
856 * Compute the LOS probability as specified in Table 6.6.1-1 of 3GPP TR 38.811
857 * for the NTN Urban scenario.
858 */
860};
861
862/**
863 * \ingroup propagation
864 *
865 * \brief Computes the channel condition for the NTN Suburban Scenario
866 *
867 * Computes the channel condition following the specifications for the
868 * Indoor Mixed Office scenario reported in Table 6.6.1-1 of 3GPP TR 38.811
869 */
871{
872 public:
873 /**
874 * Register this type.
875 * \return The object TypeId.
876 */
877 static TypeId GetTypeId();
878
879 /**
880 * Constructor for the ThreeGppNTNSuburbanChannelConditionModel class
881 */
883
884 /**
885 * Destructor for the ThreeGppNTNSuburbanChannelConditionModel class
886 */
888
889 private:
890 /**
891 * \copydoc ThreeGppChannelConditionModel::ComputePlos
892 *
893 * Compute the LOS probability as specified in Table 6.6.1-1 of 3GPP TR 38.811
894 * for the NTN Suburban scenario.
895 */
897};
898
899/**
900 * \ingroup propagation
901 *
902 * \brief Computes the channel condition for the NTN Rural Scenario
903 *
904 * Computes the channel condition following the specifications for the
905 * Indoor Mixed Office scenario reported in Table 6.6.1-1 of 3GPP TR 38.811
906 */
908{
909 public:
910 /**
911 * Register this type.
912 * \return The object TypeId.
913 */
914 static TypeId GetTypeId();
915
916 /**
917 * Constructor for the ThreeGppNTNRuralChannelConditionModel class
918 */
920
921 /**
922 * Destructor for the ThreeGppNTNRuralChannelConditionModel class
923 */
925
926 private:
927 /**
928 * \copydoc ThreeGppChannelConditionModel::ComputePlos
929 *
930 * Compute the LOS probability as specified in Table 6.6.1-1 of 3GPP TR 38.811
931 * for the NTN Rural scenario.
932 */
934};
935
936} // namespace ns3
937
938#endif /* CHANNEL_CONDITION_MODEL_H */
Models an always in-LoS condition model.
AlwaysLosChannelConditionModel & operator=(const AlwaysLosChannelConditionModel &)=delete
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
AlwaysLosChannelConditionModel(const AlwaysLosChannelConditionModel &)=delete
static TypeId GetTypeId()
Get the type ID.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always LoS.
Carries information about the LOS/NLOS channel state.
LosConditionValue m_losCondition
contains the information about the LOS state of the channel
O2iLowHighConditionValue m_o2iLowHighCondition
contains the information about the O2I low-high building penetration losses
bool IsO2i() const
Return true if the channel is outdoor-to-indoor.
ChannelCondition()
Constructor for the ChannelCondition class.
void SetLosCondition(LosConditionValue losCondition)
Set the LosConditionValue with the information about the LOS/NLOS state of the channel.
LosConditionValue GetLosCondition() const
Get the LosConditionValue containing the information about the LOS/NLOS state of the channel.
bool IsNlos() const
Return true if the channel condition is NLOS.
bool IsEqual(LosConditionValue losCondition, O2iConditionValue o2iCondition) const
Return true if this instance is equivalent to the one passed as argument.
O2iConditionValue m_o2iCondition
contains the information about the O2I state of the channel
bool IsNlosv() const
Return true if the channel condition is NLOSv.
bool IsLos() const
Return true if the channel condition is LOS.
void SetO2iCondition(O2iConditionValue o2iCondition)
Set the O2iConditionValue containing the information about the O2I state of the channel.
~ChannelCondition() override
Destructor for the ChannelCondition class.
O2iLowHighConditionValue GetO2iLowHighCondition() const
Get the O2iLowHighConditionValue containing the information about the O2I building penetration losses...
friend std::ostream & operator<<(std::ostream &os, LosConditionValue cond)
Prints a LosConditionValue to output.
bool IsO2o() const
Return true if the channel is outdoor-to-outdoor.
bool IsI2i() const
Return true if the channel is indoor-to-indoor.
static TypeId GetTypeId()
Get the type ID.
O2iConditionValue
Possible values for Outdoor to Indoor condition.
@ O2I_ND
Outdoor to Indoor condition not defined.
O2iLowHighConditionValue
Possible values for Low-High Penetration Loss condition.
@ LOW
Low Penetration Losses.
@ LH_O2I_ND
Low-High Penetration Losses not defined.
@ HIGH
High Penetration Losses.
void SetO2iLowHighCondition(O2iLowHighConditionValue o2iLowHighCondition)
Set the O2iLowHighConditionValue containing the information about the O2I building penetration losses...
O2iConditionValue GetO2iCondition() const
Get the O2iConditionValue containing the information about the O2I state of the channel.
LosConditionValue
Possible values for Line-of-Sight condition.
@ NLOSv
Non Line of Sight due to a vehicle.
@ LC_ND
Los condition not defined.
Models the channel condition.
static TypeId GetTypeId()
Get the type ID.
virtual int64_t AssignStreams(int64_t stream)=0
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
ChannelConditionModel(const ChannelConditionModel &)=delete
ChannelConditionModel & operator=(const ChannelConditionModel &)=delete
ChannelConditionModel()
Constructor for the ChannelConditionModel class.
virtual Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Computes the condition of the channel between a and b.
~ChannelConditionModel() override
Destructor for the ChannelConditionModel class.
Models a never in-LoS condition model.
static TypeId GetTypeId()
Get the type ID.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always non-LoS.
NeverLosChannelConditionModel(const NeverLosChannelConditionModel &)=delete
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
NeverLosChannelConditionModel & operator=(const NeverLosChannelConditionModel &)=delete
Models a never in-LoS condition model caused by a blocking vehicle.
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the condition of the channel between a and b, that will be always NLOSv.
NeverLosVehicleChannelConditionModel(const NeverLosVehicleChannelConditionModel &)=delete
NeverLosVehicleChannelConditionModel & operator=(const NeverLosVehicleChannelConditionModel &)=delete
A base class which provides memory management and object aggregation.
Definition object.h:78
Smart pointer class similar to boost::intrusive_ptr.
Base class for the 3GPP channel condition models.
int64_t AssignStreams(int64_t stream) override
If this model uses objects of type RandomVariableStream, set the stream numbers to the integers start...
void DoDispose() override
Destructor implementation.
Ptr< UniformRandomVariable > m_uniformVarO2i
uniform random variable that is used for the generation of the O2i conditions
virtual ChannelCondition::O2iConditionValue ComputeO2i(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Determines whether the channel condition is O2I or O2O.
static uint32_t GetKey(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Returns a unique and reciprocal key for the channel between a and b.
Ptr< ChannelCondition > GetChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Retrieve the condition of the channel between a and b.
~ThreeGppChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
Ptr< UniformRandomVariable > m_uniformO2iLowHighLossVar
a uniform random variable for the calculation of the low/high losses, see TR38.901 Table 7....
VehicleDensity
Determine the density of vehicles in a V2V scenario.
double m_o2iLowLossThreshold
the threshold for determining what is the ratio of low - high O2I building penetration losses
static double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
virtual double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Compute the NLOS probability.
double m_o2iThreshold
the threshold for determining what is the ratio of channels with O2I
virtual double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const =0
Compute the LOS probability.
std::unordered_map< uint32_t, Item > m_channelConditionMap
map to store the channel conditions
Ptr< UniformRandomVariable > m_uniformVar
uniform random variable
static std::tuple< double, double > GetQuantizedElevationAngle(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Computes and quantizes the elevation angle to a two-digits integer in [10, 90].
ThreeGppChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
Ptr< ChannelCondition > ComputeChannelCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
This method computes the channel condition based on a probabilistic model that is specific for the sc...
bool m_linkO2iConditionToAntennaHeight
the indicator that determines whether the O2I/O2O condition is determined based on the UE height
Time m_updatePeriod
the update period for the channel condition
static TypeId GetTypeId()
Get the type ID.
Computes the channel condition for the Indoor Mixed Office scenario.
ThreeGppIndoorMixedOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
~ThreeGppIndoorMixedOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorMixedOfficeChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Mixed Offi...
Computes the channel condition for the Indoor Open Office scenario.
ThreeGppIndoorOpenOfficeChannelConditionModel()
Constructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the Indoor Open Offic...
~ThreeGppIndoorOpenOfficeChannelConditionModel() override
Destructor for the ThreeGppIndoorOpenOfficeChannelConditionModel class.
Computes the channel condition for the NTN Dense Urban Scenario.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
ThreeGppNTNDenseUrbanChannelConditionModel()=default
Constructor for the ThreeGppNTNDenseUrbanChannelConditionModel class.
~ThreeGppNTNDenseUrbanChannelConditionModel() override=default
Destructor for the ThreeGppNTNDenseUrbanChannelConditionModel class.
Computes the channel condition for the NTN Rural Scenario.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
~ThreeGppNTNRuralChannelConditionModel() override=default
Destructor for the ThreeGppNTNRuralChannelConditionModel class.
ThreeGppNTNRuralChannelConditionModel()=default
Constructor for the ThreeGppNTNRuralChannelConditionModel class.
Computes the channel condition for the NTN Suburban Scenario.
ThreeGppNTNSuburbanChannelConditionModel()=default
Constructor for the ThreeGppNTNSuburbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
~ThreeGppNTNSuburbanChannelConditionModel() override=default
Destructor for the ThreeGppNTNSuburbanChannelConditionModel class.
Computes the channel condition for the NTN Urban Scenario.
~ThreeGppNTNUrbanChannelConditionModel() override=default
Destructor for the ThreeGppNTNUrbanChannelConditionModel class.
ThreeGppNTNUrbanChannelConditionModel()=default
Constructor for the ThreeGppNTNUrbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
Computes the channel condition for the RMa scenario.
~ThreeGppRmaChannelConditionModel() override
Destructor for the ThreeGppRmaChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the RMa scenario.
ThreeGppRmaChannelConditionModel()
Constructor for the ThreeGppRmaChannelConditionModel class.
static TypeId GetTypeId()
Get the type ID.
Computes the channel condition for the UMa scenario.
static TypeId GetTypeId()
Get the type ID.
ThreeGppUmaChannelConditionModel()
Constructor for the ThreeGppUmaChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMa scenario.
~ThreeGppUmaChannelConditionModel() override
Destructor for the ThreeGppUmaChannelConditionModel class.
Computes the channel condition for the UMi-Street canyon scenario.
ThreeGppUmiStreetCanyonChannelConditionModel()
Constructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
~ThreeGppUmiStreetCanyonChannelConditionModel() override
Destructor for the ThreeGppUmiStreetCanyonChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table 7.4.2-1 of 3GPP TR 38.901 for the UMi-Street Canyon...
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct to store the channel condition in the m_channelConditionMap.
Ptr< ChannelCondition > m_condition
the channel condition
Time m_generatedTime
the time when the condition was generated