A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
circular-aperture-antenna-model.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 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
* Author: Mattia Sandri <mattia.sandri@unipd.it>
18
*/
19
20
#ifndef CIRCULAR_APERTURE_ANTENNA_MODEL_H
21
#define CIRCULAR_APERTURE_ANTENNA_MODEL_H
22
23
#include "
antenna-model.h
"
24
25
#include <ns3/object.h>
26
27
/**
28
* \file
29
* \ingroup antenna
30
* Class CircularApertureAntennaModel declaration
31
*/
32
33
namespace
ns3
34
{
35
/**
36
* \brief Circular Aperture Antenna Model
37
*
38
* This class implements the circular aperture antenna as described in 3GPP 38.811 6.4.1
39
* https://www.3gpp.org/ftp/Specs/archive/38_series/38.811 without the cosine approximation, thanks
40
* to the Bessel functions introduced in C++17. Spherical coordinates are used, in particular of the
41
* azimuth and inclination angles. All working parameters can be set, namely: operating frequency,
42
* aperture radius, maximum and minimum gain.
43
* Since Clang libc++ does not support the Mathematical special functions (P0226R1) yet, this class
44
* falls back to Boost's implementation of cyl_bessel_j whenever the above standard library is in
45
* use. If neither is available in the host system, this class is not compiled.
46
*/
47
class
CircularApertureAntennaModel
:
public
AntennaModel
48
{
49
public
:
50
CircularApertureAntennaModel
() =
default
;
51
~CircularApertureAntennaModel
()
override
=
default
;
52
53
/**
54
* Register this type.
55
* \return The object TypeId.
56
*/
57
static
TypeId
GetTypeId
();
58
59
/**
60
* \brief Set the antenna aperture radius
61
*
62
* Sets the antenna operating frequency, asserting that
63
* the provided value is within the acceptable range [0, +inf[.
64
*
65
* \param aMeter the strictly positive antenna radius in meters
66
*/
67
void
SetApertureRadius
(
double
aMeter);
68
69
/**
70
* \brief Return the antenna aperture radius
71
*
72
* \return the antenna radius in meters
73
*/
74
double
GetApertureRadius
()
const
;
75
76
/**
77
* \brief Set the antenna operating frequency.
78
*
79
* Sets the antenna operating frequency, asserting that
80
* the provided value is within the acceptable range [0, +inf[.
81
*
82
* \param freqHz the strictly positive antenna operating frequency, in Hz
83
*/
84
void
SetOperatingFrequency
(
double
freqHz);
85
86
/**
87
* \brief Return the antenna operating frequency
88
*
89
* \return the antenna operating frequency, in Hz
90
*/
91
double
GetOperatingFrequency
()
const
;
92
93
/**
94
* \brief Set the antenna max gain
95
*
96
* \param gainDb the antenna max gain in dB
97
*/
98
void
SetMaxGain
(
double
gainDb);
99
100
/**
101
* \brief Return the antenna max gain
102
*
103
* \return the antenna max gain in dB
104
*/
105
double
GetMaxGain
()
const
;
106
107
/**
108
* \brief Set the antenna min gain
109
*
110
* \param gainDb the antenna min gain in dB
111
*/
112
void
SetMinGain
(
double
gainDb);
113
114
/**
115
* \brief Return the antenna min gain
116
*
117
* \return the antenna min gain in dB
118
*/
119
double
GetMinGain
()
const
;
120
121
/**
122
* \brief Get the gain in dB, using Bessel equation of first kind and first order.
123
*
124
* \param a the angle at which the gain need to be calculated with respect to the antenna
125
* bore sight
126
*
127
* \return the antenna gain at the specified Angles a
128
*/
129
double
GetGainDb
(
Angles
a)
override
;
130
131
private
:
132
double
m_apertureRadiusMeter
;
//!< antenna aperture radius in meters
133
double
m_operatingFrequencyHz
;
//!< antenna operating frequency in Hz
134
double
m_maxGain
;
//!< antenna gain in dB towards the main orientation
135
double
m_minGain
;
//!< antenna min gain in dB
136
};
137
138
}
// namespace ns3
139
140
#endif
// CIRCULAR_APERTURE_ANTENNA_MODEL_H
antenna-model.h
ns3::Angles
Class holding the azimuth and inclination angles of spherical coordinates.
Definition:
angles.h:118
ns3::AntennaModel
interface for antenna radiation pattern models
Definition:
antenna-model.h:55
ns3::CircularApertureAntennaModel
Circular Aperture Antenna Model.
Definition:
circular-aperture-antenna-model.h:48
ns3::CircularApertureAntennaModel::m_maxGain
double m_maxGain
antenna gain in dB towards the main orientation
Definition:
circular-aperture-antenna-model.h:134
ns3::CircularApertureAntennaModel::SetApertureRadius
void SetApertureRadius(double aMeter)
Set the antenna aperture radius.
Definition:
circular-aperture-antenna-model.cc:84
ns3::CircularApertureAntennaModel::SetOperatingFrequency
void SetOperatingFrequency(double freqHz)
Set the antenna operating frequency.
Definition:
circular-aperture-antenna-model.cc:98
ns3::CircularApertureAntennaModel::m_apertureRadiusMeter
double m_apertureRadiusMeter
antenna aperture radius in meters
Definition:
circular-aperture-antenna-model.h:132
ns3::CircularApertureAntennaModel::m_operatingFrequencyHz
double m_operatingFrequencyHz
antenna operating frequency in Hz
Definition:
circular-aperture-antenna-model.h:133
ns3::CircularApertureAntennaModel::SetMinGain
void SetMinGain(double gainDb)
Set the antenna min gain.
Definition:
circular-aperture-antenna-model.cc:125
ns3::CircularApertureAntennaModel::m_minGain
double m_minGain
antenna min gain in dB
Definition:
circular-aperture-antenna-model.h:135
ns3::CircularApertureAntennaModel::GetMaxGain
double GetMaxGain() const
Return the antenna max gain.
Definition:
circular-aperture-antenna-model.cc:119
ns3::CircularApertureAntennaModel::GetOperatingFrequency
double GetOperatingFrequency() const
Return the antenna operating frequency.
Definition:
circular-aperture-antenna-model.cc:106
ns3::CircularApertureAntennaModel::GetMinGain
double GetMinGain() const
Return the antenna min gain.
Definition:
circular-aperture-antenna-model.cc:132
ns3::CircularApertureAntennaModel::GetGainDb
double GetGainDb(Angles a) override
Get the gain in dB, using Bessel equation of first kind and first order.
Definition:
circular-aperture-antenna-model.cc:138
ns3::CircularApertureAntennaModel::SetMaxGain
void SetMaxGain(double gainDb)
Set the antenna max gain.
Definition:
circular-aperture-antenna-model.cc:112
ns3::CircularApertureAntennaModel::GetTypeId
static TypeId GetTypeId()
Register this type.
Definition:
circular-aperture-antenna-model.cc:53
ns3::CircularApertureAntennaModel::GetApertureRadius
double GetApertureRadius() const
Return the antenna aperture radius.
Definition:
circular-aperture-antenna-model.cc:92
ns3::CircularApertureAntennaModel::~CircularApertureAntennaModel
~CircularApertureAntennaModel() override=default
ns3::CircularApertureAntennaModel::CircularApertureAntennaModel
CircularApertureAntennaModel()=default
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
antenna
model
circular-aperture-antenna-model.h
Generated on Tue May 28 2024 23:33:58 for ns-3 by
1.9.6