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
27namespace ns3 {
28
29
39{
40public:
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
92private:
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
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 */
Class holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:119
Class implementing the phased array model virtual base class.
a unique identifier for an interface.
Definition: type-id.h:59
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
void SetPolSlant(double polSlant)
Set the polarization slant angle This method sets the polarization slant angle and computes its cosin...
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
void SetAlpha(double alpha)
Set the bearing angle This method sets the bearing angle and computes its cosine and sine.
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
static TypeId GetTypeId(void)
Get the type ID.
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...
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
double GetAntennaVerticalSpacing(void) const
Get the vertical spacing for the antenna elements of the phased array.
virtual ~UniformPlanarArray(void)
Destructor.
double GetAntennaHorizontalSpacing(void) const
Get the horizontal spacing for the antenna elements of the phased array.
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
uint32_t GetNumRows(void) const
Get the number of rows of the phased array.
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
uint32_t GetNumColumns(void) const
Get the number of columns of the phased array.
UniformPlanarArray(void)
Constructor.
uint64_t GetNumberOfElements(void) const override
Returns the number of antenna elements.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
float alpha
Plot alpha value (transparency)