23 #include <ns3/double.h> 42 .SetGroupName(
"Antenna")
44 .AddAttribute (
"Beamwidth",
45 "The 3dB beamwidth (degrees)",
49 MakeDoubleChecker<double> (0, 180))
50 .AddAttribute (
"Orientation",
51 "The angle (degrees) that expresses the orientation of the antenna on the x-y plane relative to the x axis",
55 MakeDoubleChecker<double> (-360, 360))
56 .AddAttribute (
"MaxGain",
57 "The gain (dB) at the antenna boresight (the direction of maximum gain)",
60 MakeDoubleChecker<double> ())
113 double ef = std::pow (std::cos (phi / 2.0),
m_exponent);
121 double gainDb = 20 * std::log10 (ef);
virtual double GetGainDb(Angles a)
this method is expected to be re-implemented by each antenna model
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
double m_orientationRadians
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
double GetOrientation() const
double DegreesToRadians(double degrees)
converts degrees to radians
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
double m_beamwidthRadians
static TypeId GetTypeId()
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetOrientation(double orientationDegrees)
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
double RadiansToDegrees(double radians)
converts radians to degrees
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
double m_exponent
this is the variable "n" in the paper by Chunjian
double GetBeamwidth() const
double phi
the azimuth angle in radians
struct holding the azimuth and inclination angles of spherical coordinates.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
interface for antenna radiation pattern models
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void SetBeamwidth(double beamwidthDegrees)