A Discrete-Event Network Simulator
API
three-gpp-antenna-array-model.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3 * Copyright (c) 2019 SIGNET Lab, Department of Information Engineering,
4 * University of Padova
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20 
21 #ifndef THREE_GPP_ANTENNA_ARRAY_MODEL_H_
22 #define THREE_GPP_ANTENNA_ARRAY_MODEL_H_
23 
24 #include <ns3/antenna-model.h>
25 #include <complex>
26 
27 namespace ns3 {
28 
38 {
39 public:
40 
45 
49  virtual ~ThreeGppAntennaArrayModel (void);
50 
51  // inherited from Object
52  static TypeId GetTypeId (void);
53 
54  typedef std::vector<std::complex<double> > ComplexVector;
55 
64  std::pair<double, double> GetElementFieldPattern (Angles a) const;
65 
80  virtual Vector GetElementLocation (uint64_t index) const;
81 
86  virtual uint64_t GetNumberOfElements (void) const;
87 
92  bool IsOmniTx (void) const;
93 
97  void ChangeToOmniTx (void);
98 
103  void SetBeamformingVector (const ComplexVector &beamformingVector);
104 
109  const ComplexVector & GetBeamformingVector (void) const;
110 
111 private:
119  double GetRadiationPattern (double vAngleRadian, double hAngleRadian) const;
120 
121  bool m_isOmniTx;
123  uint32_t m_numColumns;
124  uint32_t m_numRows;
125  double m_disV;
126  double m_disH;
127  double m_alpha;
128  double m_beta;
129  double m_gE;
131 };
132 
133 } /* namespace ns3 */
134 
135 #endif /* SRC_THREE_GPP_ANTENNA_ARRAY_MODEL_H_ */
virtual uint64_t GetNumberOfElements(void) const
Returns the number of antenna elements.
std::vector< std::complex< double > > ComplexVector
type definition for complex vectors
double m_disH
antenna spacing in the horizontal direction in multiples of wave length
bool m_isOmniTx
true if the antenna is configured for omni transmissions
virtual Vector GetElementLocation(uint64_t index) const
Returns the location of the antenna element with the specified index assuming the left bottom corner ...
double m_disV
antenna spacing in the vertical direction in multiples of wave length
virtual ~ThreeGppAntennaArrayModel(void)
Destructor.
double m_alpha
the bearing angle in radians
void SetBeamformingVector(const ComplexVector &beamformingVector)
Sets the beamforming vector to be used.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double m_gE
directional gain of a single antenna element (dBi)
ComplexVector m_beamformingVector
the beamforming vector in use
const ComplexVector & GetBeamformingVector(void) const
Returns the beamforming vector that is currently being used.
double m_beta
the downtilt angle in radians
bool IsOmniTx(void) const
Returns true if the antenna is configured for omnidirectional transmissions.
double GetRadiationPattern(double vAngleRadian, double hAngleRadian) const
Returns the radiation power pattern of a single antenna element in dB, generated according to Table 7...
bool m_isIsotropic
if true, antenna elements are isotropic
void ChangeToOmniTx(void)
Change the antenna model to omnidirectional (ignoring the beams)
struct holding the azimuth and inclination angles of spherical coordinates.
Definition: angles.h:71
A base class which provides memory management and object aggregation.
Definition: object.h:87
Class implementing the antenna model defined in 3GPP TR 38.901 V15.0.0.
a unique identifier for an interface.
Definition: type-id.h:58
std::pair< double, double > GetElementFieldPattern(Angles a) const
Returns the horizontal and vertical components of the antenna element field pattern at the specified ...