18#include "ns3/circular-aperture-antenna-model.h"
19#include "ns3/double.h"
21#include "ns3/pointer.h"
22#include "ns3/simulator.h"
24#include "ns3/uinteger.h"
25#include "ns3/uniform-planar-array.h"
72 double antennaMinGainDb,
73 double antennaCircularApertureRadius,
74 double operatingFrequency,
76 double testInclination,
117 void DoRun()
override;
121 :
TestCase(
"Creating CircularApertureAntennaModelTestCase")
128 std::ostringstream oss;
142 CreateObjectWithAttributes<CircularApertureAntennaModel>(
147 "AntennaCircularApertureRadius",
149 "OperatingFrequency",
153 CreateObjectWithAttributes<UniformPlanarArray>(
"AntennaElement",
160 auto [fieldPhi, fieldTheta] =
164 double gainDb = 10 * log10(fieldPhi * fieldPhi + fieldTheta * fieldTheta);
174 std::vector<TestPoint> testPoints = {
178 {30, -30, 0.5, 2e9, 0, 90, 30},
179 {30, -30, 2, 20e9, 0, 90, 30},
182 {20, -30, 0.5, 2e9, 0, 90, 20},
183 {10, -30, 2, 20e9, 0, 90, 10},
186 {30, -100, 0.5, 2e9, 0, 0, -100},
187 {30, -100, 2, 20e9, 0, 0, -100},
190 {30, -100, 0.5, 2e9, 180, 90, -100},
191 {30, -100, 2, 20e9, -180, 90, -100},
194 {0, -50, 0.10707, 28000000000, -90, 90, -50},
195 {0, -50, 0.10707, 28000000000, -80, 90, -49.8022},
196 {0, -50, 0.10707, 28000000000, -70, 90, -49.1656},
197 {0, -50, 0.10707, 28000000000, -60, 90, -60.9132},
198 {0, -50, 0.10707, 28000000000, -50, 90, -59.2368},
199 {0, -50, 0.10707, 28000000000, -40, 90, -44.6437},
200 {0, -50, 0.10707, 28000000000, -30, 90, -43.9686},
201 {0, -50, 0.10707, 28000000000, -20, 90, -36.3048},
202 {0, -50, 0.10707, 28000000000, -10, 90, -30.5363},
203 {0, -50, 0.10707, 28000000000, 0, 90, 0},
206 {0, -50, 0.10707, 28e9, 0, 0, -50},
207 {0, -50, 0.10707, 28e9, 0, 9, -49.7256},
208 {0, -50, 0.10707, 28e9, 0, 18, -52.9214},
209 {0, -50, 0.10707, 28e9, 0, 27, -48.6077},
210 {0, -50, 0.10707, 28e9, 0, 36, -60.684},
211 {0, -50, 0.10707, 28e9, 0, 45, -55.1468},
212 {0, -50, 0.10707, 28e9, 0, 54, -42.9648},
213 {0, -50, 0.10707, 28e9, 0, 63, -45.6472},
214 {0, -50, 0.10707, 28e9, 0, 72, -48.6378},
215 {0, -50, 0.10707, 28e9, 0, 81, -35.1613},
216 {0, -50, 0.10707, 28e9, 0, 90, 0}};
219 for (
auto& point : testPoints)
CircularApertureAntennaModel Test Case.
static std::string BuildNameString(TestPoint testPoint)
Generate a string containing all relevant parameters.
CircularApertureAntennaModelTestCase()
void TestAntennaGain(TestPoint testPoint)
Test the antenna gain for a specific parameter configuration, by comparing the antenna gain obtained ...
void DoRun() override
Run the test.
UniformPlanarArray Test Suite.
CircularApertureAntennaModelTestSuite()
Class holding the azimuth and inclination angles of spherical coordinates.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
AttributeValue implementation for Pointer.
Smart pointer class similar to boost::intrusive_ptr.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
Hold an unsigned integer type.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#define NS_TEST_EXPECT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report if ...
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double DegreesToRadians(double degrees)
converts degrees to radians
double RadiansToDegrees(double radians)
converts radians to degrees
Description of a single test point.
double m_expectedGain
the expected gain value [dB]
TestPoint(double antennaMaxGainDb, double antennaMinGainDb, double antennaCircularApertureRadius, double operatingFrequency, double testAzimuth, double testInclination, double expectedGain)
Constructor.
double m_antennaCircularApertureRadius
the radius of the parabolic aperture [m]
double m_antennaMinGainDb
the antenna minimum possible gain [dB]
double m_testAzimuth
test azimuth [rad]
double m_testInclination
test inclination [rad]
double m_operatingFrequency
operating frequency [Hz]
double m_antennaMaxGainDb
the antenna maximum possible gain [dB]
static CircularApertureAntennaModelTestSuite staticCircularApertureAntennaModelTestSuiteInstance