A Discrete-Event Network Simulator
API
uniform-planar-array.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3 * Copyright (c) 2020 University of Padova, Dep. of Information Engineering, SIGNET lab.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18 
19 #ifndef UNIFORM_PLANAR_ARRAY_H
20 #define UNIFORM_PLANAR_ARRAY_H
21 
22 
23 #include <ns3/object.h>
24 #include <ns3/phased-array-model.h>
25 
26 
27 namespace ns3 {
28 
29 
39 {
40 public:
44  UniformPlanarArray (void);
45 
46 
50  virtual ~UniformPlanarArray (void);
51 
56  static TypeId GetTypeId (void);
57 
58 
67  std::pair<double, double> GetElementFieldPattern (Angles a) const override;
68 
69 
84  Vector GetElementLocation (uint64_t index) const override;
85 
90  uint64_t GetNumberOfElements (void) const override;
91 
92 private:
99  void SetNumColumns (uint32_t n);
100 
101 
106  uint32_t GetNumColumns (void) const;
107 
108 
115  void SetNumRows (uint32_t n);
116 
117 
122  uint32_t GetNumRows (void) const;
123 
130  void SetAlpha (double alpha);
131 
138  void SetBeta (double beta);
139 
146  void SetPolSlant (double polSlant);
147 
154  void SetAntennaHorizontalSpacing (double s);
155 
156 
161  double GetAntennaHorizontalSpacing (void) const;
162 
163 
170  void SetAntennaVerticalSpacing (double s);
171 
172 
177  double GetAntennaVerticalSpacing (void) const;
178 
179  uint32_t m_numColumns {1};
180  uint32_t m_numRows {1};
181  double m_disV {0.5};
182  double m_disH {0.5};
183  double m_alpha {0.0};
184  double m_cosAlpha {1.0};
185  double m_sinAlpha {0.0};
186  double m_beta {0.0};
187  double m_cosBeta {1.0};
188  double m_sinBeta {0.0};
189  double m_polSlant {0.0};
190  double m_cosPolSlant {1.0};
191  double m_sinPolSlant {0.0};
192 };
193 
194 } /* namespace ns3 */
195 
196 #endif /* UNIFORM_PLANAR_ARRAY_H */
ns3::TypeId
a unique identifier for an interface.
Definition: type-id.h:59
ns3::UniformPlanarArray::m_disV
double m_disV
antenna spacing in the vertical direction in multiples of wave length
Definition: uniform-planar-array.h:181
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::UniformPlanarArray::m_cosBeta
double m_cosBeta
the cosine of Beta
Definition: uniform-planar-array.h:187
ns3::UniformPlanarArray::GetNumRows
uint32_t GetNumRows(void) const
Get the number of rows of the phased array.
Definition: uniform-planar-array.cc:124
ns3::UniformPlanarArray
Class implementing Uniform Planar Array (UPA) model.
Definition: uniform-planar-array.h:39
ns3::UniformPlanarArray::GetNumberOfElements
uint64_t GetNumberOfElements(void) const override
Returns the number of antenna elements.
Definition: uniform-planar-array.cc:255
ns3::UniformPlanarArray::m_disH
double m_disH
antenna spacing in the horizontal direction in multiples of wave length
Definition: uniform-planar-array.h:182
ns3::UniformPlanarArray::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition: uniform-planar-array.cc:42
ns3::UniformPlanarArray::GetAntennaHorizontalSpacing
double GetAntennaHorizontalSpacing(void) const
Get the horizontal spacing for the antenna elements of the phased array.
Definition: uniform-planar-array.cc:168
ns3::UniformPlanarArray::m_numRows
uint32_t m_numRows
number of rows
Definition: uniform-planar-array.h:180
ns3::UniformPlanarArray::~UniformPlanarArray
virtual ~UniformPlanarArray(void)
Destructor.
Definition: uniform-planar-array.cc:38
ns3::UniformPlanarArray::m_beta
double m_beta
the downtilt angle in radians
Definition: uniform-planar-array.h:186
ns3::UniformPlanarArray::SetNumRows
void SetNumRows(uint32_t n)
Set the number of rows of the phased array This method resets the stored beamforming vector to a Comp...
Definition: uniform-planar-array.cc:112
ns3::UniformPlanarArray::m_polSlant
double m_polSlant
the polarization slant angle in radians
Definition: uniform-planar-array.h:189
ns3::UniformPlanarArray::GetNumColumns
uint32_t GetNumColumns(void) const
Get the number of columns of the phased array.
Definition: uniform-planar-array.cc:105
ns3::UniformPlanarArray::m_sinBeta
double m_sinBeta
the sine of Beta
Definition: uniform-planar-array.h:188
ns3::UniformPlanarArray::UniformPlanarArray
UniformPlanarArray(void)
Constructor.
Definition: uniform-planar-array.cc:34
ns3::UniformPlanarArray::m_numColumns
uint32_t m_numColumns
number of columns
Definition: uniform-planar-array.h:179
ns3::UniformPlanarArray::SetBeta
void SetBeta(double beta)
Set the downtilt angle This method sets the downtilt angle and computes its cosine and sine.
Definition: uniform-planar-array.cc:138
sample-rng-plot.alpha
alpha
Definition: sample-rng-plot.py:37
ns3::UniformPlanarArray::GetElementLocation
Vector GetElementLocation(uint64_t index) const override
Returns the location of the antenna element with the specified index assuming the left bottom corner ...
Definition: uniform-planar-array.cc:235
ns3::UniformPlanarArray::m_sinAlpha
double m_sinAlpha
the sine of alpha
Definition: uniform-planar-array.h:185
ns3::UniformPlanarArray::SetAntennaVerticalSpacing
void SetAntennaVerticalSpacing(double s)
Set the vertical spacing for the antenna elements of the phased array This method resets the stored b...
Definition: uniform-planar-array.cc:175
ns3::UniformPlanarArray::m_sinPolSlant
double m_sinPolSlant
the sine polarization slant angle
Definition: uniform-planar-array.h:191
ns3::UniformPlanarArray::GetElementFieldPattern
std::pair< double, double > GetElementFieldPattern(Angles a) const override
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...
Definition: uniform-planar-array.cc:196
ns3::UniformPlanarArray::m_cosPolSlant
double m_cosPolSlant
the cosine of polarization slant angle
Definition: uniform-planar-array.h:190
ns3::UniformPlanarArray::SetAlpha
void SetAlpha(double alpha)
Set the bearing angle This method sets the bearing angle and computes its cosine and sine.
Definition: uniform-planar-array.cc:130
ns3::Angles
Class holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:119
ns3::UniformPlanarArray::SetPolSlant
void SetPolSlant(double polSlant)
Set the polarization slant angle This method sets the polarization slant angle and computes its cosin...
Definition: uniform-planar-array.cc:146
ns3::UniformPlanarArray::m_cosAlpha
double m_cosAlpha
the cosine of alpha
Definition: uniform-planar-array.h:184
ns3::UniformPlanarArray::m_alpha
double m_alpha
the bearing angle in radians
Definition: uniform-planar-array.h:183
ns3::UniformPlanarArray::SetAntennaHorizontalSpacing
void SetAntennaHorizontalSpacing(double s)
Set the horizontal spacing for the antenna elements of the phased array This method resets the stored...
Definition: uniform-planar-array.cc:154
sample-rng-plot.n
n
Definition: sample-rng-plot.py:37
ns3::PhasedArrayModel
Class implementing the phased array model virtual base class.
Definition: phased-array-model.h:36
ns3::UniformPlanarArray::SetNumColumns
void SetNumColumns(uint32_t n)
Set the number of columns of the phased array This method resets the stored beamforming vector to a C...
Definition: uniform-planar-array.cc:93
ns3::UniformPlanarArray::GetAntennaVerticalSpacing
double GetAntennaVerticalSpacing(void) const
Get the vertical spacing for the antenna elements of the phased array.
Definition: uniform-planar-array.cc:189