A Discrete-Event Network Simulator
API
uniform-planar-array.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 University of Padova, Dep. of Information Engineering, SIGNET lab.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  */
17 
18 #ifndef UNIFORM_PLANAR_ARRAY_H
19 #define UNIFORM_PLANAR_ARRAY_H
20 
21 #include <ns3/object.h>
22 #include <ns3/phased-array-model.h>
23 
24 namespace ns3
25 {
26 
36 {
37  public:
42 
46  ~UniformPlanarArray() override;
47 
52  static TypeId GetTypeId();
53 
62  std::pair<double, double> GetElementFieldPattern(Angles a) const override;
63 
78  Vector GetElementLocation(uint64_t index) const override;
79 
84  size_t GetNumberOfElements() const override;
85 
86  private:
93  void SetNumColumns(uint32_t n);
94 
99  uint32_t GetNumColumns() const;
100 
107  void SetNumRows(uint32_t n);
108 
113  uint32_t GetNumRows() const;
114 
121  void SetAlpha(double alpha);
122 
129  void SetBeta(double beta);
130 
137  void SetPolSlant(double polSlant);
138 
145  void SetAntennaHorizontalSpacing(double s);
146 
151  double GetAntennaHorizontalSpacing() const;
152 
159  void SetAntennaVerticalSpacing(double s);
160 
165  double GetAntennaVerticalSpacing() const;
166 
167  uint32_t m_numColumns{1};
168  uint32_t m_numRows{1};
169  double m_disV{0.5};
170  double m_disH{0.5};
171  double m_alpha{0.0};
172  double m_cosAlpha{1.0};
173  double m_sinAlpha{0.0};
174  double m_beta{0.0};
175  double m_cosBeta{1.0};
176  double m_sinBeta{0.0};
177  double m_polSlant{0.0};
178  double m_cosPolSlant{1.0};
179  double m_sinPolSlant{0.0};
180 };
181 
182 } /* namespace ns3 */
183 
184 #endif /* UNIFORM_PLANAR_ARRAY_H */
Class holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:118
Class implementing the phased array model virtual base class.
a unique identifier for an interface.
Definition: type-id.h:60
Class implementing Uniform Planar Array (UPA) model.
double m_cosPolSlant
the cosine of polarization slant angle
double m_disV
antenna spacing in the vertical direction in multiples of wave length
double m_sinAlpha
the sine of alpha
uint32_t GetNumRows() const
Get the number of rows of the phased array.
void SetPolSlant(double polSlant)
Set the polarization slant angle This method sets the polarization slant angle and computes its cosin...
size_t GetNumberOfElements() const override
Returns the number of antenna elements.
double m_disH
antenna spacing in the horizontal direction in multiples of wave length
void SetBeta(double beta)
Set the downtilt angle This method sets the downtilt angle and computes its cosine and sine.
double m_sinPolSlant
the sine polarization slant angle
uint32_t GetNumColumns() const
Get the number of columns of the phased array.
static TypeId GetTypeId()
Get the type ID.
void SetAlpha(double alpha)
Set the bearing angle This method sets the bearing angle and computes its cosine and sine.
double GetAntennaVerticalSpacing() const
Get the vertical spacing for the antenna elements of the phased array.
std::pair< double, double > GetElementFieldPattern(Angles a) const override
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...
double m_polSlant
the polarization slant angle in radians
double m_cosBeta
the cosine of Beta
void SetAntennaVerticalSpacing(double s)
Set the vertical spacing for the antenna elements of the phased array This method resets the stored b...
double GetAntennaHorizontalSpacing() const
Get the horizontal spacing for the antenna elements of the phased array.
~UniformPlanarArray() override
Destructor.
void SetNumRows(uint32_t n)
Set the number of rows of the phased array This method resets the stored beamforming vector to a Comp...
uint32_t m_numRows
number of rows
Vector GetElementLocation(uint64_t index) const override
Returns the location of the antenna element with the specified index assuming the left bottom corner ...
uint32_t m_numColumns
number of columns
double m_alpha
the bearing angle in radians
void SetNumColumns(uint32_t n)
Set the number of columns of the phased array This method resets the stored beamforming vector to a C...
double m_sinBeta
the sine of Beta
void SetAntennaHorizontalSpacing(double s)
Set the horizontal spacing for the antenna elements of the phased array This method resets the stored...
double m_beta
the downtilt angle in radians
double m_cosAlpha
the cosine of alpha
Every class exported by the ns3 library is enclosed in the ns3 namespace.