22 #ifndef THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
23 #define THREE_GPP_SPECTRUM_PROPAGATION_LOSS_H
25 #include "ns3/spectrum-propagation-loss-model.h"
28 #include <unordered_map>
29 #include "ns3/matrix-based-channel-model.h"
30 #include "ns3/random-variable-stream.h"
35 class ChannelConditionModel;
36 class ChannelCondition;
189 const Vector &sSpeed,
const Vector &uSpeed)
const;
Hold a value for an Attribute.
std::vector< std::complex< double > > ComplexVector
type definition for complex vectors
Smart pointer class similar to boost::intrusive_ptr.
A template-based reference counting class.
spectrum-aware propagation loss model
3GPP Spectrum Propagation Loss Model
void GetChannelModelAttribute(const std::string &name, AttributeValue &value) const
Returns the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > m_channelModel
the model to generate the channel matrix
double m_vScatt
value used to compute the additional Doppler contribution for the delayed paths
Ptr< SpectrumValue > CalcBeamformingGain(Ptr< SpectrumValue > txPsd, PhasedArrayModel::ComplexVector longTerm, Ptr< const MatrixBasedChannelModel::ChannelMatrix > params, const Vector &sSpeed, const Vector &uSpeed) const
Computes the beamforming gain and applies it to the tx PSD.
void SetChannelModel(Ptr< MatrixBasedChannelModel > channel)
Set the channel model object.
double GetFrequency() const
Get the operating frequency.
void SetChannelModelAttribute(const std::string &name, const AttributeValue &value)
Sets the value of an attribute belonging to the associated MatrixBasedChannelModel instance.
Ptr< MatrixBasedChannelModel > GetChannelModel() const
Get the channel model object.
PhasedArrayModel::ComplexVector CalcLongTerm(Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &sW, const PhasedArrayModel::ComplexVector &uW) const
Computes the long term component.
std::unordered_map< uint32_t, Ptr< const LongTerm > > m_longTermMap
map containing the long term components
void DoDispose() override
Destructor implementation.
void AddDevice(Ptr< NetDevice > n, Ptr< const PhasedArrayModel > a)
Add a device-antenna pair.
Ptr< UniformRandomVariable > m_uniformRv
uniform random variable, used to compute the additional Doppler contribution
PhasedArrayModel::ComplexVector GetLongTerm(uint32_t aId, uint32_t bId, Ptr< const MatrixBasedChannelModel::ChannelMatrix > channelMatrix, const PhasedArrayModel::ComplexVector &aW, const PhasedArrayModel::ComplexVector &bW) const
Looks for the long term component in m_longTermMap.
static TypeId GetTypeId()
Get the type ID.
ThreeGppSpectrumPropagationLossModel()
Constructor.
std::unordered_map< uint32_t, Ptr< const PhasedArrayModel > > m_deviceAntennaMap
map containig the <node, antenna> associations
~ThreeGppSpectrumPropagationLossModel()
Destructor.
Ptr< SpectrumValue > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumValue > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Computes the received PSD.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Data structure that stores the long term component for a tx-rx pair.
PhasedArrayModel::ComplexVector m_uW
the beamforming vector for the node u used to compute the long term
Ptr< const MatrixBasedChannelModel::ChannelMatrix > m_channel
pointer to the channel matrix used to compute the long term
PhasedArrayModel::ComplexVector m_longTerm
vector containing the long term component for each cluster
PhasedArrayModel::ComplexVector m_sW
the beamforming vector for the node s used to compute the long term