10#ifndef THREE_GPP_CHANNEL_H
11#define THREE_GPP_CHANNEL_H
15#include "ns3/angles.h"
16#include "ns3/deprecated.h"
17#include <ns3/boolean.h>
18#include <ns3/channel-condition-model.h>
21#include <unordered_map>
144 static std::pair<double, double>
WrapAngles(
double azimuthRad,
double inclinationRad);
244 NS_DEPRECATED_3_41(
"Use GetThreeGppTable(const Ptr<const MobilityModel>, const Ptr<const "
245 "MobilityModel>, Ptr<const ChannelCondition>) instead")
249 double distance2D) const;
Carries information about the LOS/NLOS channel state.
O2iConditionValue
Possible values for Outdoor to Indoor condition.
LosConditionValue
Possible values for Line-of-Sight condition.
Models the channel condition.
This is an interface for a channel model that can be described by a channel matrix,...
std::vector< double > DoubleVector
Type definition for vectors of doubles.
std::vector< Double2DVector > Double3DVector
Type definition for 3D matrices of doubles.
std::vector< DoubleVector > Double2DVector
Type definition for matrices of doubles.
Keep track of the current position and velocity of an object.
The normal (Gaussian) distribution Random Number Generator (RNG) that allows stream numbers to be set...
Class implementing the phased array model virtual base class.
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
Channel Matrix Generation following 3GPP TR 38.901.
DoubleVector CalcAttenuationOfBlockage(const Ptr< ThreeGppChannelModel::ThreeGppChannelParams > channelParams, const DoubleVector &clusterAOA, const DoubleVector &clusterZOA) const
Applies the blockage model A described in 3GPP TR 38.901.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
bool AntennaSetupChanged(Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna, Ptr< const ChannelMatrix > channelMatrix)
Check if the channel matrix has to be updated due to changes in the number of antenna ports.
bool m_portraitMode
true if portrait mode, false if landscape
bool ChannelParamsNeedsUpdate(Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ChannelCondition > channelCondition) const
Check if the channel params has to be updated.
Ptr< NormalRandomVariable > m_normalRv
normal random variable
static const uint8_t Y_INDEX
index of the Y value in the m_nonSelfBlocking array
bool m_blockage
enables the blockage model A
Ptr< const ChannelParams > GetParams(Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob) const override
Looks for the channel params associated to the aMob and bMob pair in m_channelParamsMap.
~ThreeGppChannelModel() override
Destructor.
bool ChannelMatrixNeedsUpdate(Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ChannelMatrix > channelMatrix)
Check if the channel matrix has to be updated (it needs update when the channel params generation tim...
static const uint8_t THETA_INDEX
index of the THETA value in the m_nonSelfBlocking array
std::unordered_map< uint64_t, Ptr< ThreeGppChannelParams > > m_channelParamsMap
map containing the common channel parameters per pair of nodes, the key of this map is reciprocal and...
static std::pair< double, double > WrapAngles(double azimuthRad, double inclinationRad)
Wrap an (azimuth, inclination) angle pair in a valid range.
ThreeGppChannelModel()
Constructor.
double m_blockerSpeed
the blocker speed
Ptr< const ChannelMatrix > GetChannel(Ptr< const MobilityModel > aMob, Ptr< const MobilityModel > bMob, Ptr< const PhasedArrayModel > aAntenna, Ptr< const PhasedArrayModel > bAntenna) override
Looks for the channel matrix associated to the aMob and bMob pair in m_channelMatrixMap.
void SetFrequency(double f)
Sets the center frequency of the model.
std::unordered_map< uint64_t, Ptr< ChannelMatrix > > m_channelMatrixMap
map containing the channel realizations per pair of PhasedAntennaArray instances, the key of this map...
Ptr< UniformRandomVariable > m_uniformRv
uniform random variable
void DoDispose() override
Destructor implementation.
void SetScenario(const std::string &scenario)
Sets the propagation scenario.
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model.
Ptr< UniformRandomVariable > m_uniformRvDoppler
uniform random variable, used to compute the additional Doppler contribution
uint16_t m_numNonSelfBlocking
number of non-self-blocking regions
Ptr< const ParamsTable > GetThreeGppTable(Ptr< const ChannelCondition > channelCondition, double hBS, double hUT, double distance2D) const
Get the parameters needed to apply the channel generation procedure.
std::string GetScenario() const
Returns the propagation scenario.
virtual Ptr< ChannelMatrix > GetNewChannel(Ptr< const ThreeGppChannelParams > channelParams, Ptr< const ParamsTable > table3gpp, const Ptr< const MobilityModel > sMob, const Ptr< const MobilityModel > uMob, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna) const
Compute the channel matrix between two nodes a and b, and their antenna arrays aAntenna and bAntenna ...
static const uint8_t PHI_INDEX
index of the PHI value in the m_nonSelfBlocking array
double m_frequency
the operating frequency
double m_vScatt
value used to compute the additional Doppler contribution for the delayed paths
Ptr< ChannelConditionModel > GetChannelConditionModel() const
Get the associated channel condition model.
Ptr< ChannelConditionModel > m_channelConditionModel
the channel condition model
std::string m_scenario
the 3GPP scenario
static const uint8_t R_INDEX
index of the R value in the m_nonSelfBlocking array
static TypeId GetTypeId()
Get the type ID.
void Shuffle(double *first, double *last) const
Shuffle the elements of a simple sequence container of type double.
Ptr< ThreeGppChannelParams > GenerateChannelParameters(const Ptr< const ChannelCondition > channelCondition, const Ptr< const ParamsTable > table3gpp, const Ptr< const MobilityModel > aMob, const Ptr< const MobilityModel > bMob) const
Prepare 3gpp channel parameters among the nodes a and b.
double GetFrequency() const
Returns the center frequency.
Time m_updatePeriod
the channel update period
static const uint8_t X_INDEX
index of the X value in the m_nonSelfBlocking array
Ptr< UniformRandomVariable > m_uniformRvShuffle
uniform random variable used to shuffle array in GetNewChannel
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
#define NS_DEPRECATED_3_41(msg)
Tag for things deprecated in version ns-3.41.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Data structure that stores a channel realization.
Data structure that stores channel parameters.
Data structure that stores the parameters of 3GPP TR 38.901, Table 7.5-6, for a certain scenario.
double m_sqrtC[7][7]
The square root matrix and follows the order of [SF, K, DS, ASD, ASA, ZSD, ZSA].
double m_sigLgZSD
Standard deviation of 10-base logarithm of zenith angle spread of departure.
double m_cASD
Cluster ASD (Azimuth angle Spread of Departure)
double m_uLgZSD
Mean value of 10-base logarithm of zenith angle spread of departure.
double m_uLgASA
Mean value of 10-base logarithm of azimuth angle spread of arrival.
double m_sigXpr
Standard deviation of Cross-Polarization Ratio.
double m_uK
Mean of K-factor.
double m_uLgASD
Mean value of 10-base logarithm of azimuth angle spread of departure.
double m_cASA
Cluster ASA (Azimuth angle Spread of Arrival)
double m_rTau
Delay scaling parameter.
uint8_t m_raysPerCluster
Number of rays per cluster.
double m_sigK
Standard deviation of K-factor.
double m_perClusterShadowingStd
Per cluster shadowing standard deviation.
double m_sigLgASD
Standard deviation of 10-base logarithm of azimuth angle spread of departure.
double m_offsetZOD
Offset of zenith angle of departure.
double m_uLgDS
Mean value of 10-base logarithm of delay spread.
double m_sigLgASA
Standard deviation of 10-base logarithm of azimuth angle spread of arrival.
double m_uLgZSA
Mean value of 10-base logarithm of zenith angle spread of arrival.
double m_cZSA
Cluster ZSA (Zenith angle Spread of Arrival)
uint8_t m_numOfCluster
Number of clusters.
double m_sigLgZSA
Standard deviation of 10-base logarithm of zenith angle spread of arrival.
double m_uXpr
Mean of Cross-Polarization Ratio.
double m_sigLgDS
Standard deviation value of 10-base logarithm of delay spread.
Extends the struct ChannelParams by including information that is used within the ThreeGppChannelMode...
MatrixBasedChannelModel::Double2DVector m_rayAoaRadian
the vector containing AOA angles
MatrixBasedChannelModel::Double3DVector m_clusterPhase
the initial random phases
MatrixBasedChannelModel::Double2DVector m_norRvAngles
stores the normal variable for random angles angle[cluster][id] generated for equation (7....
ChannelCondition::LosConditionValue m_losCondition
contains the information about the LOS state of the channel
Vector m_locUT
location of UT
MatrixBasedChannelModel::Double2DVector m_rayZodRadian
the vector containing ZOD angles
double m_dis3D
3D distance between tx and rx
ChannelCondition::O2iConditionValue m_o2iCondition
contains the information about the O2I state of the channel
uint8_t m_reducedClusterNumber
reduced cluster number;
MatrixBasedChannelModel::Double2DVector m_rayAodRadian
the vector containing AOD angles
DoubleVector m_attenuation_dB
vector that stores the attenuation of the blockage
Vector m_preLocUT
location of UT when generating the previous channel
MatrixBasedChannelModel::Double2DVector m_rayZoaRadian
the vector containing ZOA angles
DoubleVector m_clusterPower
cluster powers
double m_dis2D
2D distance between tx and rx
MatrixBasedChannelModel::Double2DVector m_nonSelfBlocking
store the blockages
uint8_t m_cluster1st
index of the first strongest cluster
MatrixBasedChannelModel::Double2DVector m_crossPolarizationPowerRatios
cross polarization power ratios
uint8_t m_cluster2nd
index of the second strongest cluster
double m_K_factor
K factor.