8#ifndef TWO_RAY_SPECTRUM_PROPAGATION_LOSS_H
9#define TWO_RAY_SPECTRUM_PROPAGATION_LOSS_H
14#include "ns3/channel-condition-model.h"
49 friend class ::FtrFadingModelAverageTest;
50 friend class ::ArrayResponseTest;
51 friend class ::OverallGainAverageTest;
72 FtrParams(
double m,
double sigma,
double k,
double delta)
121 std::map<std::string,
122 std::map<ChannelCondition::LosConditionValue, CarrierFrequencyFtrParamsTuple>>;
283 std::size_t
SearchClosestFc(
const std::vector<double>& frequencies,
double targetFc)
const;
Test case for the TwoRaySpectrumPropagationLossModel class.
Test case for the TwoRaySpectrumPropagationLossModel class.
Test case for the TwoRaySpectrumPropagationLossModel class.
LosConditionValue
Possible values for Line-of-Sight condition.
spectrum-aware propagation loss model that is compatible with PhasedArrayModel type of ns-3 antenna
Smart pointer class similar to boost::intrusive_ptr.
Two Ray Spectrum Propagation Loss Model.
std::map< std::string, std::map< ChannelCondition::LosConditionValue, CarrierFrequencyFtrParamsTuple > > FtrParamsLookupTable
Nested map associating 3GPP scenario and LosCondition to the corresponding tuple of carrier frequenci...
double CalcBeamformingGain(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const
Compute the beamforming gain by combining single-element and array gains.
double m_frequency
The operating frequency.
ChannelCondition::LosConditionValue GetLosCondition(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Retrieves the LOS condition associated to the specified mobility models.
FtrParams GetFtrParameters(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Retrieves the FTR fading model parameters related to the carrier frequency and LOS condition.
Ptr< NormalRandomVariable > m_normalRv
Random variable used to sample the normal distributed amplitudes of the FTR diffuse components.
Ptr< SpectrumSignalParameters > DoCalcRxPowerSpectralDensity(Ptr< const SpectrumSignalParameters > txPsd, Ptr< const MobilityModel > a, Ptr< const MobilityModel > b, Ptr< const PhasedArrayModel > aPhasedArrayModel, Ptr< const PhasedArrayModel > bPhasedArrayModel) const override
Compute the received PSD.
double GetFtrFastFading(const FtrParams ¶ms) const
Compute the stochastic power gain due to the fast fading, modeled according to the Fluctuating Two-Ra...
~TwoRaySpectrumPropagationLossModel() override
Destructor.
static TypeId GetTypeId()
Get the type ID.
void DoDispose() override
Destructor implementation.
TwoRaySpectrumPropagationLossModel()
Constructor.
std::tuple< std::vector< double >, std::vector< FtrParams > > CarrierFrequencyFtrParamsTuple
Tuple collecting vectors of carrier frequencies and FTR fading model parameters, encoded as a FtrPara...
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
Ptr< GammaRandomVariable > m_gammaRv
Random variable used to sample the Nakagami distributed amplitude of the FTR specular components.
Ptr< ChannelConditionModel > m_channelConditionModel
Channel condition model used to retrieve the LOS/NLOS condition of the communicating endpoints.
std::size_t SearchClosestFc(const std::vector< double > &frequencies, double targetFc) const
Get the index of the closest carrier frequency for which the FTR estimated parameters are available.
void SetFrequency(double f)
Sets the center frequency of the model.
Ptr< UniformRandomVariable > m_uniformRv
Random variable used to sample the uniform distributed phases of the FTR specular components.
std::string m_scenario
the 3GPP scenario
void SetScenario(const std::string &scenario)
Sets the propagation scenario.
a unique identifier for an interface.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct holding the Fluctuating Two Ray fast-fading model parameters.
FtrParams(double m, double sigma, double k, double delta)
Default constructor, requiring the Fluctuating Two Ray fading model parameters as arguments.
double m_delta
Parameter delta [0, 1].
double m_sigma
Parameter sigma.
FtrParams()=delete
Delete no-arguments default constructor.
double m_m
Parameter m for the Gamma variable.