22 #include "ns3/double.h"
50 MakeDoubleChecker<double>(0))
51 .AddAttribute(
"Shipping",
52 "Shipping contribution to noise between 0 and 1.",
55 MakeDoubleChecker<double>(0, 1));
74 turbDb = 17.0 - 30.0 * std::log10(fKhz);
75 turb = std::pow(10.0, turbDb * 0.1);
78 40.0 + 20.0 * (
m_shipping - 0.5) + 26.0 * std::log10(fKhz) - 60.0 * std::log10(fKhz + 0.03);
79 ship = std::pow(10.0, (shipDb * 0.1));
81 windDb = 50.0 + 7.5 * std::pow(
m_wind, 0.5) + 20.0 * std::log10(fKhz) -
82 40.0 * std::log10(fKhz + 0.4);
83 wind = std::pow(10.0, windDb * 0.1);
85 thermalDb = -15 + 20 * std::log10(fKhz);
86 thermal = std::pow(10, thermalDb * 0.1);
88 noiseDb = 10 * std::log10(turb + ship + wind + thermal);
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.
Standard ambient acoustic noise model.
double m_wind
Wind speed in m/s.
double GetNoiseDbHz(double fKhz) const override
Compute the noise power at a given frequency.
static TypeId GetTypeId()
Register this type.
~UanNoiseModelDefault() override
Dummy destructor, DoDispose.
UanNoiseModelDefault()
Default constructor.
double m_shipping
Shipping contribution to noise between 0 and 1.
UAN Noise Model base class.
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_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.