23 #include <ns3/double.h>
42 .AddConstructor<CosineAntennaModel> ()
43 .AddAttribute (
"Beamwidth",
44 "The 3dB beamwidth (degrees)",
48 MakeDoubleChecker<double> (0, 180))
49 .AddAttribute (
"Orientation",
50 "The angle (degrees) that expresses the orientation of the antenna on the x-y plane relative to the x axis",
54 MakeDoubleChecker<double> (-360, 360))
55 .AddAttribute (
"MaxGain",
56 "The gain (dB) at the antenna boresight (the direction of maximum gain)",
59 MakeDoubleChecker<double> ())
112 double ef = std::pow (std::cos (phi / 2.0),
m_exponent);
120 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 the class in the ns-3 factory.
double DegreesToRadians(double degrees)
converts degrees to radians
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
double GetBeamwidth() const
double m_beamwidthRadians
static TypeId GetTypeId()
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void SetOrientation(double orientationDegrees)
double RadiansToDegrees(double radians)
converts radians to degrees
double m_exponent
this is the variable "n" in the paper by Chunjian
double GetOrientation() const
double phi
the azimuth angle in radians
struct holding the azimuth and inclination angles of spherical coordinates.
Hold a floating point type.
interface for antenna radiation pattern models
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void SetBeamwidth(double beamwidthDegrees)