12#include "ns3/double.h"
34 TypeId(
"ns3::UanPropModelThorp")
38 .AddAttribute(
"SpreadCoef",
39 "Spreading coefficient used in calculation of Thorp's approximation.",
49 double dist = a->GetDistanceFrom(b);
64 return Seconds(a->GetDistanceFrom(b) / 1500.0);
76 double fsq = freqKhz * freqKhz;
81 atten = 0.11 * fsq / (1 + fsq) + 44 * fsq / (4100 + fsq) + 2.75 * 0.0001 * fsq + 0.003;
85 atten = 0.002 + 0.11 * (fsq / (1 + fsq)) + 0.011 * fsq;
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Smart pointer class similar to boost::intrusive_ptr.
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 AttributeChecker > MakeDoubleChecker()
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)