|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #ifndef THREE_GPP_CHANNEL_H
23 #define THREE_GPP_CHANNEL_H
26 #include "ns3/angles.h"
27 #include <ns3/object.h>
28 #include <ns3/nstime.h>
29 #include <ns3/random-variable-stream.h>
30 #include <ns3/boolean.h>
31 #include <unordered_map>
32 #include <ns3/channel-condition-model.h>
33 #include <ns3/matrix-based-channel-model.h>
145 static std::pair<double, double>
WrapAngles (
double azimuthRad,
double inclinationRad);
237 double dis2D,
double hBS,
double hUT)
const;
258 std::unordered_map<uint32_t, Ptr<ThreeGppChannelMatrix> >
m_channelMap;
Vector m_preLocUT
location of UT when generating the previous channel
a unique identifier for an interface.
Data structure that stores the parameters of 3GPP TR 38.901, Table 7.5-6, for a certain scenario.
static TypeId GetTypeId()
Get the type ID.
Ptr< ChannelConditionModel > GetChannelConditionModel() const
Get the associated channel condition model.
~ThreeGppChannelModel()
Destructor.
virtual 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.
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_channelMap.
std::string m_scenario
the 3GPP scenario
bool ChannelMatrixNeedsUpdate(Ptr< const ThreeGppChannelMatrix > channelMatrix, Ptr< const ChannelCondition > channelCondition) const
Check if the channel matrix has to be updated.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Channel Matrix Generation following 3GPP TR 38.901.
void Shuffle(double *first, double *last) const
Shuffle the elements of a simple sequence container of type double.
Extends the struct ChannelMatrix by including information that are used within the class ThreeGppChan...
void SetScenario(const std::string &scenario)
Sets the propagation scenario.
A template-based reference counting class.
std::vector< DoubleVector > Double2DVector
type definition for matrices of doubles
static const uint8_t PHI_INDEX
index of the PHI value in the m_nonSelfBlocking array
std::vector< Double2DVector > Double3DVector
type definition for 3D matrices of doubles
bool m_blockage
enables the blockage model A
static const uint8_t X_INDEX
index of the X value in the m_nonSelfBlocking array
bool m_portraitMode
true if potrait mode, false if landscape
double m_frequency
the operating frequency
This is an interface for a channel model that can be described by a channel matrix,...
uint8_t m_numCluster
reduced cluster number;
void SetChannelConditionModel(Ptr< ChannelConditionModel > model)
Set the channel condition model.
MatrixBasedChannelModel::Double2DVector m_norRvAngles
stores the normal variable for random angles angle[cluster][id] generated for equation (7....
MatrixBasedChannelModel::Double2DVector m_nonSelfBlocking
store the blockages
Smart pointer class similar to boost::intrusive_ptr.
Ptr< const ChannelCondition > m_channelCondition
the channel condition
std::string GetScenario(void) const
Returns the propagation scenario.
double m_blockerSpeed
the blocker speed
Ptr< NormalRandomVariable > m_normalRv
normal random variable
MatrixBasedChannelModel::Double3DVector m_clusterPhase
the initial random phases
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
DoubleVector CalcAttenuationOfBlockage(Ptr< ThreeGppChannelMatrix > params, const DoubleVector &clusterAOA, const DoubleVector &clusterZOA) const
Applies the blockage model A described in 3GPP TR 38.901.
Simulation virtual time values and global simulation resolution.
Ptr< UniformRandomVariable > m_uniformRv
uniform random variable
void SetFrequency(double f)
Sets the center frequency of the model.
double GetFrequency(void) const
Returns the center frequency.
Time m_updatePeriod
the channel update period
std::vector< double > DoubleVector
type definition for vectors of doubles
double m_dis2D
2D distance between tx and rx
Class holding the azimuth and inclination angles of spherical coordinates.
static const uint8_t Y_INDEX
index of the Y value in the m_nonSelfBlocking array
double m_perClusterShadowingStd
double f(double x, void *params)
uint16_t m_numNonSelfBlocking
number of non-self-blocking regions
Data structure that stores a channel realization.
Ptr< ChannelConditionModel > m_channelConditionModel
the channel condition model
std::unordered_map< uint32_t, Ptr< ThreeGppChannelMatrix > > m_channelMap
map containing the channel realizations
double m_dis3D
3D distance between tx and rx
Vector m_locUT
location of UT
Ptr< UniformRandomVariable > m_uniformRvShuffle
uniform random variable used to shuffle array in GetNewChannel
static const uint8_t R_INDEX
index of the R value in the m_nonSelfBlocking array
Ptr< ThreeGppChannelMatrix > GetNewChannel(Vector locUT, Ptr< const ChannelCondition > channelCondition, Ptr< const PhasedArrayModel > sAntenna, Ptr< const PhasedArrayModel > uAntenna, Angles &uAngle, Angles &sAngle, double dis2D, double hBS, double hUT) const
Compute the channel matrix between two devices using the procedure described in 3GPP TR 38....
static const uint8_t THETA_INDEX
index of the THETA value in the m_nonSelfBlocking array
ThreeGppChannelModel()
Constructor.
void DoDispose() override
Destructor implementation.
static std::pair< double, double > WrapAngles(double azimuthRad, double inclinationRad)
Wrap an (azimuth, inclination) angle pair in a valid range.