12#include "ns3/double.h" 
   15#include "ns3/mobility-model.h" 
   30        TypeId(
"ns3::ItuR1411LosPropagationLossModel")
 
   32            .SetGroupName(
"Propagation")
 
   34            .AddAttribute(
"Frequency",
 
   35                          "The propagation frequency in Hz",
 
 
   56    double dist = a->GetDistanceFrom(b);
 
   59    NS_ASSERT_MSG(a->GetPosition().z > 0 && b->GetPosition().z > 0,
 
   60                  "nodes' height must be greater than 0");
 
   62                                           (8 * M_PI * a->GetPosition().z * b->GetPosition().z)));
 
   63    double Rbp = (4 * a->GetPosition().z * b->GetPosition().z) / 
m_lambda;
 
   67        lossLow = Lbp + 20 * std::log10(dist / Rbp);
 
   68        lossUp = Lbp + 20 + 25 * std::log10(dist / Rbp);
 
   72        lossLow = Lbp + 40 * std::log10(dist / Rbp);
 
   73        lossUp = Lbp + 20 + 40 * std::log10(dist / Rbp);
 
   76    double loss = (lossUp + lossLow) / 2;
 
 
   93    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.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
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 AttributeChecker > MakeDoubleChecker()
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.