22 #include <ns3/double.h>
23 #include <ns3/uinteger.h>
24 #include <ns3/boolean.h>
46 .AddConstructor<UniformPlanarArray> ()
47 .SetGroupName (
"Antenna")
48 .AddAttribute (
"AntennaHorizontalSpacing",
49 "Horizontal spacing between antenna elements, in multiples of wave length",
53 MakeDoubleChecker<double> (0.0))
54 .AddAttribute (
"AntennaVerticalSpacing",
55 "Vertical spacing between antenna elements, in multiples of wave length",
59 MakeDoubleChecker<double> (0.0))
60 .AddAttribute (
"NumColumns",
61 "Horizontal size of the array",
65 MakeUintegerChecker<uint32_t> (1))
66 .AddAttribute (
"NumRows",
67 "Vertical size of the array",
71 MakeUintegerChecker<uint32_t> (1))
72 .AddAttribute (
"BearingAngle",
73 "The bearing angle in radians",
76 MakeDoubleChecker<double> (-M_PI, M_PI))
77 .AddAttribute (
"DowntiltAngle",
78 "The downtilt angle in radians",
81 MakeDoubleChecker<double> (-M_PI, M_PI))
82 .AddAttribute (
"PolSlantAngle",
83 "The polarization slant angle in radians",
86 MakeDoubleChecker<double> (-M_PI, M_PI))
195 std::pair<double, double>
207 double phiPrime = std::arg (std::complex<double> (
m_cosBeta * sinIncl * cosAzim -
m_sinBeta * cosIncl, sinAzim * sinIncl));
208 Angles aPrime (phiPrime, thetaPrime);
216 double fieldThetaPrime = pow (10, aPrimeDb / 20) *
m_cosPolSlant;
217 double fieldPhiPrime = pow (10, aPrimeDb / 20) *
m_sinPolSlant;
226 double fieldTheta = cos (psi) * fieldThetaPrime - sin (psi) * fieldPhiPrime;
227 double fieldPhi = sin (psi) * fieldThetaPrime + cos (psi) * fieldPhiPrime;
230 return std::make_pair (fieldPhi, fieldTheta);
Class holding the azimuth and inclination angles of spherical coordinates.
double GetInclination(void) const
Getter for inclination angle.
double GetAzimuth(void) const
Getter for azimuth angle.
virtual double GetGainDb(Angles a)=0
this method is expected to be re-implemented by each antenna model
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Class implementing the phased array model virtual base class.
Ptr< AntennaModel > m_antennaElement
the model of the antenna element in use
bool m_isBfVectorValid
ensures the validity of the beamforming vector
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Ptr< const AttributeAccessor > MakeUintegerAccessor(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_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double RadiansToDegrees(double radians)
converts radians to degrees
float alpha
Plot alpha value (transparency)