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 
52 
53  // inherited from Object
54  static TypeId GetTypeId (void);
55 
56 
65  std::pair<double, double> GetElementFieldPattern (Angles a) const override;
66 
67 
82  Vector GetElementLocation (uint64_t index) const override;
83 
88  uint64_t GetNumberOfElements (void) const override;
89 
90 private:
97  void SetNumColumns (uint32_t n);
98 
99 
104  uint32_t GetNumColumns (void) const;
105 
106 
113  void SetNumRows (uint32_t n);
114 
115 
120  uint32_t GetNumRows (void) const;
121 
122 
129  void SetAntennaHorizontalSpacing (double s);
130 
131 
136  double GetAntennaHorizontalSpacing (void) const;
137 
138 
145  void SetAntennaVerticalSpacing (double s);
146 
147 
152  double GetAntennaVerticalSpacing (void) const;
153 
154 
155  uint32_t m_numColumns;
156  uint32_t m_numRows;
157  double m_disV;
158  double m_disH;
159  double m_alpha;
160  double m_beta;
161 
162 };
163 
164 } /* namespace ns3 */
165 
166 #endif /* UNIFORM_PLANAR_ARRAY_H */
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 GetAntennaVerticalSpacing(void) const
Get the vertical spacing for the antenna elements of the phased array.
Class holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:118
std::pair< double, double > GetElementFieldPattern(Angles a) const override
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...
uint64_t GetNumberOfElements(void) const override
Returns the number of antenna elements.
double m_beta
the downtilt angle in radians
UniformPlanarArray(void)
Constructor.
uint32_t GetNumColumns(void) const
Get the number of columns of the phased array.
uint32_t m_numColumns
number of columns
Vector GetElementLocation(uint64_t index) const override
Returns the location of the antenna element with the specified index assuming the left bottom corner ...
void SetNumRows(uint32_t n)
Set the number of rows of the phased array This method resets the stored beamforming vector to a Comp...
static TypeId GetTypeId(void)
void SetAntennaHorizontalSpacing(double s)
Set the horizontal spacing for the antenna elements of the phased array This method resets the stored...
virtual ~UniformPlanarArray(void)
Destructor.
uint32_t GetNumRows(void) const
Get the number of rows of the phased array.
double m_disH
antenna spacing in the horizontal direction in multiples of wave length
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_numRows
number of rows
Class implementing Uniform Planar Array (UPA) model.
Class implementing the phased array model virtual base class.
double GetAntennaHorizontalSpacing(void) const
Get the horizontal spacing for the antenna elements of the phased array.
double m_alpha
the bearing angle in radians
double m_disV
antenna spacing in the vertical direction in multiples of wave length
a unique identifier for an interface.
Definition: type-id.h:58
void SetAntennaVerticalSpacing(double s)
Set the vertical spacing for the antenna elements of the phased array This method resets the stored b...