23 #include "ns3/double.h"
25 #include "ns3/mobility-model.h"
39 static TypeId tid =
TypeId (
"ns3::ItuR1411LosPropagationLossModel")
41 .SetGroupName (
"Propagation")
43 .AddAttribute (
"Frequency",
44 "The propagation frequency in Hz",
47 MakeDoubleChecker<double> ());
74 lossLow = Lbp + 20 * std::log10 (dist / Rbp);
75 lossUp = Lbp + 20 + 25 * std::log10 (dist / Rbp);
79 lossLow = Lbp + 40 * std::log10 (dist / Rbp);
80 lossUp = Lbp + 20 + 40 * std::log10 (dist / Rbp);
83 double loss = (lossUp + lossLow) / 2;
102 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.
virtual ~ItuR1411LosPropagationLossModel()
void SetFrequency(double freq)
Set the operating frequency.
static TypeId GetTypeId(void)
Get the type ID.
double m_lambda
wavelength
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
PropagationLossModel.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
Vector GetPosition(void) 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...
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#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.