22 #include <ns3/double.h> 23 #include <ns3/uinteger.h> 24 #include <ns3/boolean.h> 52 .AddConstructor<UniformPlanarArray> ()
53 .SetGroupName (
"Antenna")
54 .AddAttribute (
"AntennaHorizontalSpacing",
55 "Horizontal spacing between antenna elements, in multiples of wave length",
59 MakeDoubleChecker<double> (0.0))
60 .AddAttribute (
"AntennaVerticalSpacing",
61 "Vertical spacing between antenna elements, in multiples of wave length",
65 MakeDoubleChecker<double> (0.0))
66 .AddAttribute (
"NumColumns",
67 "Horizontal size of the array",
71 MakeUintegerChecker<uint32_t> (1))
72 .AddAttribute (
"NumRows",
73 "Vertical size of the array",
77 MakeUintegerChecker<uint32_t> (1))
78 .AddAttribute (
"BearingAngle",
79 "The bearing angle in radians",
82 MakeDoubleChecker<double> (-M_PI, M_PI))
83 .AddAttribute (
"DowntiltAngle",
84 "The downtilt angle in radians",
87 MakeDoubleChecker<double> (-M_PI, M_PI))
173 std::pair<double, double>
182 Angles aPrime (phiPrime, thetaPrime);
190 double fieldThetaPrime = pow (10, aPrimeDb / 20);
199 double fieldTheta = cos (psi) * fieldThetaPrime;
200 double fieldPhi = sin (psi) * fieldThetaPrime;
203 return std::make_pair (fieldPhi, fieldTheta);
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
bool m_isBfVectorValid
ensures the validity of the beamforming vector
Class holding the azimuth and inclination angles of spherical coordinates.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< AntennaModel > m_antennaElement
the model of the antenna element in use
double GetAzimuth(void) const
Getter for azimuth angle.
Hold an unsigned integer type.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Class implementing the phased array model virtual base class.
virtual double GetGainDb(Angles a)=0
this method is expected to be re-implemented by each antenna model
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...
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
double GetInclination(void) const
Getter for inclination angle.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.