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