23 #include "ns3/double.h"
45 TypeId(
"ns3::UanPropModelThorp")
49 .AddAttribute(
"SpreadCoef",
50 "Spreading coefficient used in calculation of Thorp's approximation.",
53 MakeDoubleChecker<double>());
87 double fsq = freqKhz * freqKhz;
92 atten = 0.11 * fsq / (1 + fsq) + 44 * fsq / (4100 + fsq) + 2.75 * 0.0001 * fsq + 0.003;
96 atten = 0.002 + 0.11 * (freqKhz / (1 + freqKhz)) + 0.011 * freqKhz;
This class can be used to hold variables of floating point type such as 'double' or 'float'.
double GetDistanceFrom(Ptr< const MobilityModel > position) const
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
The power delay profile returned by propagation models.
static UanPdp CreateImpulsePdp()
Get a unit impulse PDP at time 0.
Base class for implemented underwater propagation models.
Uses Thorp's approximation to compute pathloss.
~UanPropModelThorp() override
Destructor.
UanPropModelThorp()
Default constructor.
double GetAttenDbKm(double freqKhz)
Get the attenuation in dB / km.
UanPdp GetPdp(Ptr< MobilityModel > a, Ptr< MobilityModel > b, UanTxMode mode) override
Get the PDP for the path between two nodes.
double GetPathLossDb(Ptr< MobilityModel > a, Ptr< MobilityModel > b, UanTxMode mode) override
Computes pathloss between nodes a and b.
double m_SpreadCoef
Spreading coefficient used in calculation of Thorp's approximation.
static TypeId GetTypeId()
Register this type.
double GetAttenDbKyd(double freqKhz)
Get the attenuation in dB / 1000 yards.
Time GetDelay(Ptr< MobilityModel > a, Ptr< MobilityModel > b, UanTxMode mode) override
Finds propagation delay between nodes a and b.
Abstraction of packet modulation information.
uint32_t GetCenterFreqHz() const
Get the transmission center frequency.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)