22 #include "ns3/simulator.h"
24 #include "ns3/string.h"
25 #include "ns3/double.h"
27 #include "ns3/mobility-helper.h"
28 #include "ns3/lte-helper.h"
30 #include "ns3/lte-ue-phy.h"
31 #include "ns3/lte-ue-net-device.h"
32 #include "ns3/lte-enb-phy.h"
33 #include "ns3/lte-enb-net-device.h"
46 static std::string
BuildNameString (
double orientationDegrees,
double beamwidthDegrees,
double x,
double y);
47 LteEnbAntennaTestCase (
double orientationDegrees,
double beamwidthDegrees,
double x,
double y,
double antennaGainDb);
52 virtual void DoRun (
void);
66 std::ostringstream oss;
67 oss <<
"o=" << orientationDegrees
68 <<
", bw=" << beamwidthDegrees
76 :
TestCase (BuildNameString (orientationDegrees, beamwidthDegrees, x, y)),
77 m_orientationDegrees (orientationDegrees),
78 m_beamwidthDegrees (beamwidthDegrees),
81 m_antennaGainDb (antennaGainDb)
109 positionAlloc->Add (
Vector (0.0, 0.0, 0.0));
129 lteHelper->
Attach (ueDevs, enbDevs.
Get (0));
151 const double enbTxPowerDbm = 30;
152 const double ueTxPowerDbm = 10;
153 const double ktDbm = -174;
154 const double noisePowerDbm = ktDbm + 10 * log10 (25 * 180000);
155 const double ueNoiseFigureDb = 9.0;
156 const double enbNoiseFigureDb = 5.0;
158 double calculatedSinrDbDl = -INFINITY;
159 if (testDlSinr->GetSinr () != 0)
161 calculatedSinrDbDl = 10.0 * log10 (testDlSinr->GetSinr ()->operator[] (0));
163 double calculatedSinrDbUl = -INFINITY;
164 if (testUlSinr->GetSinr () != 0)
166 calculatedSinrDbUl = 10.0 * log10 (testUlSinr->GetSinr ()->operator[] (0));
170 double calculatedAntennaGainDbDl = - (enbTxPowerDbm - calculatedSinrDbDl - noisePowerDbm - ueNoiseFigureDb);
171 double calculatedAntennaGainDbUl = - (ueTxPowerDbm - calculatedSinrDbUl - noisePowerDbm - enbNoiseFigureDb);