23 #include <ns3/double.h> 
   26 #include "antenna-model.h" 
   27 #include "parabolic-antenna-model.h" 
   34 NS_OBJECT_ENSURE_REGISTERED (ParabolicAntennaModel);
 
   38 ParabolicAntennaModel::GetTypeId ()
 
   40   static TypeId tid = TypeId (
"ns3::ParabolicAntennaModel")
 
   41     .SetParent<AntennaModel> ()
 
   42     .AddConstructor<ParabolicAntennaModel> ()
 
   43     .AddAttribute (
"Beamwidth",
 
   44                    "The 3dB beamwidth (degrees)",
 
   46                    MakeDoubleAccessor (&ParabolicAntennaModel::SetBeamwidth,
 
   47                                        &ParabolicAntennaModel::GetBeamwidth),
 
   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",
 
   52                    MakeDoubleAccessor (&ParabolicAntennaModel::SetOrientation,
 
   53                                        &ParabolicAntennaModel::GetOrientation),
 
   54                    MakeDoubleChecker<double> (-360, 360))
 
   55     .AddAttribute (
"MaxAttenuation",
 
   56                    "The maximum attenuation (dB) of the antenna radiation pattern.",
 
   58                    MakeDoubleAccessor (&ParabolicAntennaModel::m_maxAttenuation),
 
   59                    MakeDoubleChecker<double> ())
 
   65 ParabolicAntennaModel::SetBeamwidth (
double beamwidthDegrees)
 
   72 ParabolicAntennaModel::GetBeamwidth ()
 const 
   78 ParabolicAntennaModel::SetOrientation (
double orientationDegrees)
 
   85 ParabolicAntennaModel::GetOrientation ()
 const 
   95   double phi = a.
phi - m_orientationRadians;
 
  109   double gainDb = -std::min (12 * pow (phi / m_beamwidthRadians, 2), m_maxAttenuation);
 
#define NS_LOG_FUNCTION(parameters)
double DegreesToRadians(double degrees)
converts degrees to radians 
#define NS_LOG_COMPONENT_DEFINE(name)
virtual double GetGainDb(Angles a)
#define NS_LOG_LOGIC(msg)
double RadiansToDegrees(double radians)
converts radians to degrees