23 #include "ns3/double.h"
25 #include "ns3/mobility-model.h"
39 static TypeId tid =
TypeId (
"ns3::ItuR1411LosPropagationLossModel")
42 .AddConstructor<ItuR1411LosPropagationLossModel> ()
44 .AddAttribute (
"Frequency",
45 "The propagation frequency in Hz",
48 MakeDoubleChecker<double> ());
72 NS_LOG_LOGIC (
this <<
" Lbp " << Lbp <<
" Rbp " << Rbp <<
" lambda " << m_lambda);
75 lossLow = Lbp + 20 * std::log10 (dist / Rbp);
76 lossUp = Lbp + 20 + 25 * std::log10 (dist / Rbp);
80 lossLow = Lbp + 40 * std::log10 (dist / Rbp);
81 lossUp = Lbp + 20 + 40 * std::log10 (dist / Rbp);
84 double loss = (lossUp + lossLow) / 2;
103 return (txPowerDbm -
GetLoss (a, b));
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
double GetDistanceFrom(Ptr< const MobilityModel > position) const
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register the class in the ns-3 factory.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Vector GetPosition(void) const
ItuR1411LosPropagationLossModel()
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
void SetFrequency(double freq)
Set the operating frequency.
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
static TypeId GetTypeId(void)
virtual ~ItuR1411LosPropagationLossModel()
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Modelize the propagation loss through a transmission medium.
virtual int64_t DoAssignStreams(int64_t stream)
Subclasses must implement this; those not using random variables can return zero. ...
Hold a floating point type.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
double z
z coordinate of vector