23 #include "ns3/double.h"
26 #include "ns3/mobility-model.h"
41 TypeId(
"ns3::ItuR1411LosPropagationLossModel")
43 .SetGroupName(
"Propagation")
45 .AddAttribute(
"Frequency",
46 "The propagation frequency in Hz",
49 MakeDoubleChecker<double>());
71 "nodes' height must be greater than 0");
78 lossLow = Lbp + 20 * std::log10(dist / Rbp);
79 lossUp = Lbp + 20 + 25 * std::log10(dist / Rbp);
83 lossLow = Lbp + 40 * std::log10(dist / Rbp);
84 lossUp = Lbp + 20 + 40 * std::log10(dist / Rbp);
87 double loss = (lossUp + lossLow) / 2;
104 return (txPowerDbm -
GetLoss(a, b));
This class can be used to hold variables of floating point type such as 'double' or 'float'.
the ITU-R 1411 LOS propagation model
ItuR1411LosPropagationLossModel()
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
void SetFrequency(double freq)
Set the operating frequency.
~ItuR1411LosPropagationLossModel() override
double m_lambda
wavelength
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
static TypeId GetTypeId()
Get the type ID.
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
PropagationLossModel.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
Vector GetPosition() const
Models the propagation loss through a transmission medium.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)