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));
#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.
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
#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.
ItuR1411LosPropagationLossModel()
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Returns the Rx Power taking into account only the particular PropagationLossModel.
void SetFrequency(double freq)
Set the operating frequency.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
double m_lambda
wavelength
double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
virtual ~ItuR1411LosPropagationLossModel()
the ITU-R 1411 LOS propagation model
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Vector GetPosition(void) const
Models 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. ...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.