Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ns3/mmwave-helper.h"
- #include "ns3/core-module.h"
- #include "ns3/network-module.h"
- #include "ns3/mobility-module.h"
- #include "ns3/config-store.h"
- #include "ns3/mmwave-helper.h"
- #include "ns3/log.h"
- #include "ns3/nr-point-to-point-epc-helper.h"
- #include "ns3/network-module.h"
- #include "ns3/ipv4-global-routing-helper.h"
- #include "ns3/internet-module.h"
- #include "ns3/applications-module.h"
- #include "ns3/point-to-point-helper.h"
- #include "ns3/eps-bearer-tag.h"
- #include "ns3/abort.h"
- #include "ns3/object.h"
- #include "ns3/mmwave-mac-scheduler-ns3.h"
- #include "ns3/mmwave-mac-scheduler-ofdma.h"
- #include "ns3/mmwave-mac-scheduler-ofdma-rr.h"
- #include "ns3/mmwave-phy-mac-common.h"
- #include "ns3/basic-data-calculators.h"
- #include "ns3/antenna-array-3gpp-model.h"
- #include "ns3/netanim-module.h"
- #include <iostream>
- #include <cmath>
- using namespace ns3;
- using namespace std;
- enum AntennaModelEnum{
- _ISO,
- _3GPP,
- };
- NS_LOG_COMPONENT_DEFINE ("Nr3gppIndoorCalibration");
- static ns3::GlobalValue g_duration ("duration",
- "simulation duration in milliseconds, should be greater than 100 ms to allow the collection of traces",
- ns3::UintegerValue (150),
- ns3::MakeUintegerChecker<uint32_t>());
- static ns3::GlobalValue g_shadowing ("shadowing",
- "if true, shadowing is enabled in 3gpp propagation loss model;"
- "if false, shadowing is disabled",
- ns3::BooleanValue (true),
- ns3::MakeBooleanChecker ());
- static ns3::GlobalValue g_antennaOrientation ("antennaOrientation",
- "the orientation of the antenna on gNB and UE",
- ns3::EnumValue (AntennaArray3gppModel::Z0),
- ns3::MakeEnumChecker (AntennaArray3gppModel::Z0, "Z0",
- AntennaArray3gppModel::X0, "X0"));
- static ns3::GlobalValue g_antennaModelgNb ("antennaModelGnb",
- "the antenna model of gNb, can be ISO or 3GPP",
- ns3::EnumValue (_3GPP),
- ns3::MakeEnumChecker (_ISO, "ISO",
- _3GPP, "3GPP"));
- static ns3::GlobalValue g_antennaModelUe ("antennaModelUe",
- "the antenna model of Ue, can be ISO or 3GPP",
- ns3::EnumValue (_3GPP),
- ns3::MakeEnumChecker (_ISO, "ISO",
- _3GPP, "3GPP"));
- static ns3::GlobalValue g_resultsDir ("resultsDir",
- "directory where to store the simulation results",
- ns3::StringValue ("./"),
- ns3::MakeStringChecker ());
- static ns3::GlobalValue g_simTag ("simTag",
- "tag to be appended to the output filenames to distinguish different simulation campaign output files",
- ns3::StringValue (""),
- ns3::MakeStringChecker ());
- static ns3::GlobalValue g_indoorScenario ("indoorScenario",
- "the indoor scenario to be used can be: InH-OfficeMixed, InH-OfficeOpen or InH-ShoppingMall",
- ns3::StringValue ("InH-OfficeOpen"),
- ns3::MakeStringChecker ());
- static ns3::GlobalValue g_speed ("speed",
- "UE speed in km/h",
- ns3::DoubleValue (3.00),
- ns3::MakeDoubleChecker<double> (0.0, 10.0));
- static ns3::GlobalValue g_isBeamSearchMethod ("isBeamSearchMethod",
- "if true, beam search method will be used;"
- "if false, long term covariance matrix will be used",
- ns3::BooleanValue (true),
- ns3::MakeBooleanChecker ());
- static ns3::GlobalValue g_beamSearchMethodAngle ("beamSearchMethodAngle",
- "beam search method angle step",
- ns3::DoubleValue (30.00),
- ns3::MakeDoubleChecker<double> (0.0, 360.0));
- static ns3::GlobalValue g_gNbAntennaMount ("gnbAntennaMount",
- "gNb antenna mount type. Can be Wall mount or Sector mount. Doc: 38.802-e20. A.2.1-7",
- ns3::EnumValue (ns3::AntennaArray3gppModel::GnbWallMount),
- ns3::MakeEnumChecker (ns3::AntennaArray3gppModel::GnbWallMount, "WALL",
- ns3::AntennaArray3gppModel::GnbSingleSector, "SECT"));
- //######################################### Beginning of class
- class Nr3gppIndoorCalibration{
- public:
- void UeRssiPerProcessedChunk (double rssidBm);
- void Run (bool shadowing, AntennaArrayModel::AntennaOrientation antOrientation, TypeId gNbAntennaModel,
- TypeId ueAntennaModel, std::string scenario, double speed,
- std::string resultsDirPath, std::string tag,
- bool isBeamSearchMethod, double beamSearchMethodAngle,
- AntennaArray3gppModel::GnbAntennaMount gNbAntennaMount, uint32_t duration);
- ~Nr3gppIndoorCalibration ();
- private:
- std::ofstream m_outRssiFile; //!< the output file stream for the RSSI file
- std::ofstream m_outUePositionsFile; //!< the output file stream for the UE positions file
- std::ofstream m_outGnbPositionsFile; //!< the output file stream for the gNB positions file
- std::ofstream m_outDistancesFile; //!< the output file stream for the distances file
- };
- std::string BuildFileNameString (std::string directoryName, std::string filePrefix, std::string tag)
- {
- std::ostringstream oss;
- oss << directoryName << filePrefix<<tag;
- return oss.str ();
- }
- std::string BuildTag(bool shadowing, AntennaArrayModel::AntennaOrientation antOrientation,
- TypeId gNbAntennaModel, TypeId ueAntennaModel, std::string scenario,
- double speed, bool isBeamSearchMethod, double beamSearchMethodAngle,
- AntennaArray3gppModel::GnbAntennaMount gNbAntennaMount = AntennaArray3gppModel::GnbWallMount)
- {
- std::ostringstream oss;
- std::string ao;
- if (antOrientation == AntennaArrayModel::X0)
- {
- ao = "X0";
- }
- else if (antOrientation == AntennaArrayModel::Z0)
- {
- ao = "Z0";
- }
- else
- {
- NS_ABORT_MSG("unknown antenna orientation..");
- }
- std::string gnbAm;
- if (gNbAntennaModel == AntennaArrayModel::GetTypeId())
- {
- gnbAm = "ISO";
- }
- else if (gNbAntennaModel == AntennaArray3gppModel::GetTypeId())
- {
- gnbAm = "3GPP";
- }
- std::string ueAm;
- if (ueAntennaModel == AntennaArrayModel::GetTypeId())
- {
- ueAm = "ISO";
- }
- else if (ueAntennaModel == AntennaArray3gppModel::GetTypeId())
- {
- ueAm = "3GPP";
- }
- double angl = 0;
- if (isBeamSearchMethod)
- {
- angl = beamSearchMethodAngle;
- }
- std::string gm = "";
- if (gNbAntennaMount == AntennaArray3gppModel::GnbWallMount)
- {
- gm = "WALL";
- }
- else if (gNbAntennaMount == AntennaArray3gppModel::GnbSingleSector)
- {
- gm = "SECT";
- }
- else
- {
- NS_ABORT_MSG("unknown antenna orientation..");
- }
- oss <<"-sh"<<shadowing<<"-ao"<<ao<<"-amGnb"<<gnbAm<<"-amUE"<<ueAm<<
- "-sc"<<scenario<<"-sp"<<speed<<"-bs"<<isBeamSearchMethod<<"-angl"<<angl<<"-gm"<<gm;
- return oss.str ();
- }
- //######################################################3 class funcs
- void UeRssiPerProcessedChunkTrace (Nr3gppIndoorCalibration* scenario, double rssidBm)
- {
- scenario->UeRssiPerProcessedChunk (rssidBm);
- }
- void
- Nr3gppIndoorCalibration::UeRssiPerProcessedChunk (double rssidBm)
- {
- m_outRssiFile<<rssidBm<<std::endl;
- }
- Nr3gppIndoorCalibration::~Nr3gppIndoorCalibration ()
- {
- m_outRssiFile<<"#################################"<<std::endl;
- m_outRssiFile.close();
- }
- //########################################################### RUN
- void
- Nr3gppIndoorCalibration::Run (bool shadowing, AntennaArrayModel::AntennaOrientation antOrientation,
- TypeId gNbAntennaModel, TypeId ueAntennaModel, std::string scenario, double speed,
- std::string resultsDirPath, std::string tag,
- bool isBeamSearchMethod, double beamSearchMethodAngle,
- AntennaArray3gppModel::GnbAntennaMount gNbAntennaMount, uint32_t duration)
- {
- Time simTime = MilliSeconds (duration);
- Time udpAppStartTimeDl = MilliSeconds (100);
- Time udpAppStopTimeDl = MilliSeconds (duration);
- //uint32_t packetSize = 1000;
- DataRate udpRate = DataRate ("0.1kbps");
- // if simulation tag is not provided create one
- if (tag=="")
- {
- tag = BuildTag(shadowing, antOrientation, gNbAntennaModel, ueAntennaModel, scenario, speed, isBeamSearchMethod, beamSearchMethodAngle, gNbAntennaMount);
- }
- std::string filenameRssi = BuildFileNameString ( resultsDirPath , "rssi", tag);
- std::string filenameUePositions = BuildFileNameString ( resultsDirPath , "ue-positions", tag);
- std::string filenameGnbPositions = BuildFileNameString( resultsDirPath , "gnb-positions", tag);
- std::string filenameDistances = BuildFileNameString ( resultsDirPath , "distances", tag);
- m_outRssiFile.open (filenameRssi.c_str ());
- m_outRssiFile.setf (std::ios_base::fixed);
- if(!m_outRssiFile.is_open())
- {
- NS_ABORT_MSG("Can't open file " << filenameRssi);
- }
- m_outUePositionsFile.open (filenameUePositions.c_str ());
- m_outUePositionsFile.setf (std::ios_base::fixed);
- if(!m_outUePositionsFile.is_open())
- {
- NS_ABORT_MSG("Can't open file " << filenameUePositions);
- }
- m_outGnbPositionsFile.open (filenameGnbPositions.c_str ());
- m_outGnbPositionsFile.setf (std::ios_base::fixed);
- if(!m_outGnbPositionsFile.is_open())
- {
- NS_ABORT_MSG("Can't open file " << filenameGnbPositions);
- }
- m_outDistancesFile.open (filenameDistances.c_str ());
- m_outDistancesFile.setf (std::ios_base::fixed);
- if(!m_outDistancesFile.is_open())
- {
- NS_ABORT_MSG("Can't open file " << filenameDistances);
- }
- Config::SetDefault ("ns3::AntennaArray3gppModel::GnbAntennaMountType", EnumValue (gNbAntennaMount));
- Config::SetDefault ("ns3::AntennaArrayModel::AntennaOrientation", EnumValue (antOrientation));
- // configure antenna gain for the ISO antenna
- Config::SetDefault ("ns3::AntennaArrayModel::AntennaGain", DoubleValue (5));
- Config::SetDefault ("ns3::MmWave3gppPropagationLossModel::Scenario", StringValue(scenario));
- Config::SetDefault ("ns3::MmWave3gppPropagationLossModel::Shadowing", BooleanValue(shadowing));
- // we tried also with the optional nLos model and both 3gpp antennas, and it is not better calibrated
- Config::SetDefault ("ns3::MmWave3gppPropagationLossModel::OptionalNlos", BooleanValue(false));
- // Default scenario configuration that are summarised in to R1-1703534 3GPP TSG RAN WG1 Meeting #88
- Config::SetDefault ("ns3::MmWave3gppChannel::Speed", DoubleValue (speed*1000/3600));
- // Disable channel matrix update to speed up the simulation execution
- Config::SetDefault ("ns3::MmWave3gppChannel::UpdatePeriod", TimeValue (MilliSeconds(0)));
- Config::SetDefault ("ns3::MmWavePhyMacCommon::MacSchedulerType", TypeIdValue (TypeId::LookupByName("ns3::MmWaveMacSchedulerTdmaPF")));
- // Config::SetDefault ("ns3::LteRlcUm::MaxTxBufferSize", UintegerValue(999999999));
- // Config::SetDefault ("ns3::LteRlcUmLowLat::MaxTxBufferSize", UintegerValue(999999999));
- Config::SetDefault ("ns3::MmWave3gppChannel::CellScan", BooleanValue (isBeamSearchMethod));
- Config::SetDefault ("ns3::MmWave3gppChannel::BeamSearchAngleStep", DoubleValue (beamSearchMethodAngle));
- Config::SetDefault ("ns3::LteEnbRrc::SrsPeriodicity", UintegerValue (320));
- // Parameters according to R1-1703534 3GPP TSG RAN WG1 Meetging #88, 2017
- // Evaluation assumptions for Phase 1 NR MIMO system level calibration,
- Config::SetDefault ("ns3::MmWaveEnbPhy::TxPower", DoubleValue(23));
- Config::SetDefault ("ns3::MmWavePhyMacCommon::CenterFreq", DoubleValue(160e9));
- Config::SetDefault ("ns3::MmWavePhyMacCommon::Numerology", UintegerValue(2));
- Config::SetDefault ("ns3::MmWavePhyMacCommon::Bandwidth", DoubleValue(40e6));
- // Should be 4x8 = 32 antenna elements
- Config::SetDefault ("ns3::MmWaveEnbPhy::AntennaArrayType", TypeIdValue(gNbAntennaModel));
- Config::SetDefault ("ns3::MmWaveEnbPhy::AntennaNumDim1", UintegerValue(6));
- Config::SetDefault ("ns3::MmWaveEnbPhy::AntennaNumDim2", UintegerValue(8));
- // Should be 2x4 = 8 antenna elements
- Config::SetDefault ("ns3::MmWaveUePhy::AntennaArrayType", TypeIdValue(ueAntennaModel));
- Config::SetDefault ("ns3::MmWaveUePhy::AntennaNumDim1", UintegerValue(4));
- Config::SetDefault ("ns3::MmWaveUePhy::AntennaNumDim2", UintegerValue(8));
- // UE antenna gain shall be set to 5 dBi
- // gNB noise figure shall be set to 7 dB
- Config::SetDefault("ns3::MmWaveEnbPhy::NoiseFigure", DoubleValue (7));
- // UE noise figure shall be set to 10 dB
- Config::SetDefault("ns3::MmWaveUePhy::NoiseFigure", DoubleValue (10));
- // set LOS,NLOS condition
- Config::SetDefault ("ns3::MmWave3gppPropagationLossModel::ChannelCondition", StringValue("a"));
- // setup the mmWave simulation
- Ptr<MmWaveHelper> mmWaveHelper = CreateObject<MmWaveHelper> ();
- mmWaveHelper->SetAttribute ("PathlossModel", StringValue ("ns3::MmWave3gppPropagationLossModel"));
- mmWaveHelper->SetAttribute ("ChannelModel", StringValue ("ns3::MmWave3gppChannel"));
- Ptr<NrPointToPointEpcHelper> epcHelper = CreateObject<NrPointToPointEpcHelper> ();
- mmWaveHelper->SetEpcHelper (epcHelper);
- mmWaveHelper->Initialize();
- // create base stations and mobile terminals
- NodeContainer gNbNodes;
- NodeContainer ueNodes;
- MobilityHelper gnmobility, uemobility;
- gNbNodes.Create (3);
- ueNodes.Create (1);
- // Creating positions of the gNB according to the 3gpp TR 38.900 Figure 7.2.-1
- Ptr<ListPositionAllocator> gNbPositionAlloc = CreateObject<ListPositionAllocator> ();
- gNbPositionAlloc->Add(Vector( 76, 40, 3));
- gNbPositionAlloc->Add(Vector( 45 , 12 , 3));
- gNbPositionAlloc->Add(Vector( 20, 40, 3));
- gnmobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
- gnmobility.SetPositionAllocator (gNbPositionAlloc);
- gnmobility.Install (gNbNodes);
- Ptr<ListPositionAllocator> uEPositionAlloc = CreateObject<ListPositionAllocator> ();
- uEPositionAlloc->Add(Vector( 45, 40, 1.5));
- uemobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
- uemobility.SetPositionAllocator (uEPositionAlloc);
- uemobility.Install(ueNodes);
- Vector v = gNbNodes.Get(0)->GetObject<MobilityModel>()->GetPosition();
- m_outGnbPositionsFile<<0<<"\t"<<v.x<<"\t"<<v.y<<"\t"<<v.z<<" "<<std::endl;
- Vector v1 = gNbNodes.Get(1)->GetObject<MobilityModel>()->GetPosition();
- m_outGnbPositionsFile<<0<<"\t"<<v1.x<<"\t"<<v1.y<<"\t"<<v1.z<<" "<<std::endl;
- Vector v2 = gNbNodes.Get(2)->GetObject<MobilityModel>()->GetPosition();
- m_outGnbPositionsFile<<0<<"\t"<<v2.x<<"\t"<<v2.y<<"\t"<<v2.z<<" "<<std::endl;
- Vector ve = ueNodes.Get(0)->GetObject<MobilityModel>()->GetPosition();
- m_outUePositionsFile<<0<<"\t"<<ve.x<<"\t"<<ve.y<<"\t"<<ve.z<<" "<<std::endl;
- double x = ve.x - v.x;
- double y = ve.y - v.y;
- double distance = sqrt (x * x + y * y);
- m_outDistancesFile <<distance<<std::endl;
- double x1 = ve.x - v1.x;
- double y1 = ve.y - v1.y;
- double distance1 = sqrt (x1 * x1 + y1 * y1);
- m_outDistancesFile <<distance1<<std::endl;
- double x2 = ve.x - v2.x;
- double y2 = ve.y - v2.y;
- double distance2 = sqrt (x2 * x2 + y2* y2);
- m_outDistancesFile <<distance2<<std::endl;
- m_outUePositionsFile.close();
- m_outGnbPositionsFile.close();
- m_outDistancesFile.close();
- //mobility.SetPositionAllocator (ueRandomRectPosAlloc);
- //install mmWave net devices
- NetDeviceContainer gNbDevs = mmWaveHelper->InstallEnbDevice (gNbNodes);
- NetDeviceContainer ueNetDevs = mmWaveHelper->InstallUeDevice (ueNodes);
- // create the internet and install the IP stack on the UEs
- // get SGW/PGW and create a single RemoteHost
- Ptr<Node> pgw = epcHelper->GetPgwNode ();
- NodeContainer remoteHostContainer;
- remoteHostContainer.Create (1);
- Ptr<Node> remoteHost = remoteHostContainer.Get (0);
- InternetStackHelper internet;
- internet.Install (remoteHostContainer);
- // connect a remoteHost to pgw. Setup routing too
- PointToPointHelper p2ph;
- p2ph.SetDeviceAttribute ("DataRate", DataRateValue (DataRate ("100Gb/s")));
- p2ph.SetDeviceAttribute ("Mtu", UintegerValue (2500));
- p2ph.SetChannelAttribute ("Delay", TimeValue (Seconds (0.000)));
- NetDeviceContainer internetDevices = p2ph.Install (pgw, remoteHost);
- Ipv4AddressHelper ipv4h;
- ipv4h.SetBase ("1.0.0.0", "255.0.0.0");
- Ipv4InterfaceContainer internetIpIfaces = ipv4h.Assign (internetDevices);
- // in this container, interface 0 is the pgw, 1 is the remoteHost
- //Ipv4Address remoteHostAddr = internetIpIfaces.GetAddress (1);
- Ipv4StaticRoutingHelper ipv4RoutingHelper;
- Ptr<Ipv4StaticRouting> remoteHostStaticRouting = ipv4RoutingHelper.GetStaticRouting (remoteHost->GetObject<Ipv4> ());
- remoteHostStaticRouting->AddNetworkRouteTo (Ipv4Address ("7.0.0.0"), Ipv4Mask ("255.0.0.0"), 1);
- internet.Install (ueNodes);
- Ipv4InterfaceContainer ueIpIface;
- ueIpIface = epcHelper->AssignUeIpv4Address (NetDeviceContainer (ueNetDevs));
- // Set the default gateway for the UEs
- Ptr<Ipv4StaticRouting> ueStaticRouting = ipv4RoutingHelper.GetStaticRouting (ueNodes.Get(0)->GetObject<Ipv4> ());
- ueStaticRouting->SetDefaultRoute (epcHelper->GetUeDefaultGatewayAddress (), 1);
- Ptr<NetDevice> closestEnbDevice;
- for (NetDeviceContainer::Iterator i = gNbDevs.Begin (); i != gNbDevs.End (); ++i)
- {
- closestEnbDevice = *i;
- for (NetDeviceContainer::Iterator ue = ueNetDevs.Begin (); ue != ueNetDevs.End (); ue++)
- {
- mmWaveHelper->AttachToEnb (*ue, closestEnbDevice);
- uint16_t dlPort = 1234;
- ApplicationContainer clientAppsDl;
- ApplicationContainer serverAppsDl;
- Time udpInterval = Time::FromDouble((1000*8) / static_cast<double> (udpRate.GetBitRate ()), Time::S);
- UdpServerHelper dlPacketSinkHelper (dlPort);
- serverAppsDl.Add (dlPacketSinkHelper.Install (ueNodes));
- // configure UDP downlink traffic
- UdpClientHelper dlClient (ueIpIface.GetAddress (0), dlPort); //CHECK AFTER
- dlClient.SetAttribute ("MaxPackets", UintegerValue(0xFFFFFFFF));
- dlClient.SetAttribute("PacketSize", UintegerValue(1000));
- dlClient.SetAttribute ("Interval", TimeValue (udpInterval)); // we try to saturate, we just need to measure during a short time, how much traffic can handle each BWP
- clientAppsDl.Add (dlClient.Install (remoteHost));
- // start UDP server and client apps
- serverAppsDl.Start(udpAppStartTimeDl);
- clientAppsDl.Start(udpAppStartTimeDl);
- serverAppsDl.Stop(udpAppStopTimeDl);
- clientAppsDl.Stop(udpAppStopTimeDl);
- Ptr<MmWaveSpectrumPhy > ue1SpectrumPhy = DynamicCast<MmWaveUeNetDevice>
- (ueNetDevs.Get(0))->GetPhy(0)->GetSpectrumPhy();
- Ptr<mmWaveInterference> ue1SpectrumPhyInterference = ue1SpectrumPhy->GetMmWaveInterference();
- NS_ABORT_IF(!ue1SpectrumPhyInterference);
- ue1SpectrumPhyInterference->TraceConnectWithoutContext("RssiPerProcessedChunk", MakeBoundCallback (&UeRssiPerProcessedChunkTrace, this));
- }
- }
- AnimationInterface anim("g.xml");
- anim.SetConstantPosition(gNbNodes.Get(0), v.x,v.y,v.z);
- anim.SetConstantPosition(gNbNodes.Get(1), v1.x,v1.y,v1.z);
- anim.SetConstantPosition(gNbNodes.Get(2), v2.x,v2.y,v2.z);
- anim.SetConstantPosition(ueNodes.Get(0), ve.x,ve.y,ve.z);
- Simulator::Stop (simTime);
- Simulator::Run ();
- Simulator::Destroy ();
- }
- //##########################################################################################
- int main(int argc, char *argv[])
- {
- CommandLine cmd;
- cmd.Parse (argc, argv);
- ConfigStore inputConfig;
- inputConfig.ConfigureDefaults ();
- // parse again so you can override input file default values via command line
- cmd.Parse (argc, argv);
- EnumValue enumValue;
- DoubleValue doubleValue;
- BooleanValue booleanValue;
- StringValue stringValue;
- TypeIdValue typeIdValue;
- UintegerValue uintValue;
- GlobalValue::GetValueByName ("duration", uintValue);
- uint32_t duration = uintValue.Get ();
- GlobalValue::GetValueByName ("shadowing", booleanValue);
- bool shadowing = booleanValue.Get ();
- GlobalValue::GetValueByName ("antennaOrientation", enumValue);
- enum AntennaArray3gppModel::AntennaOrientation antennaOrientation = (AntennaArray3gppModel::AntennaOrientation) enumValue.Get ();
- GlobalValue::GetValueByName ("antennaModelGnb", enumValue);
- enum AntennaModelEnum antennaGnb = (AntennaModelEnum) enumValue.Get ();
- TypeId antennaModelGnb;
- if (antennaGnb == _3GPP)
- {
- antennaModelGnb = AntennaArray3gppModel::GetTypeId();
- }
- else
- {
- antennaModelGnb = AntennaArrayModel::GetTypeId();
- }
- GlobalValue::GetValueByName ("antennaModelUe", enumValue);
- enum AntennaModelEnum antennaUe = (AntennaModelEnum) enumValue.Get ();
- TypeId antennaModelUe;
- if (antennaUe == _3GPP)
- {
- antennaModelUe = AntennaArray3gppModel::GetTypeId();
- }
- else
- {
- antennaModelUe = AntennaArrayModel::GetTypeId();
- }
- GlobalValue::GetValueByName ("indoorScenario", stringValue);
- std::string indoorScenario = stringValue.Get ();
- GlobalValue::GetValueByName ("speed", doubleValue);
- double speed = doubleValue.Get ();
- GlobalValue::GetValueByName ("resultsDir", stringValue);
- std::string resultsDir = stringValue.Get ();
- GlobalValue::GetValueByName ("simTag", stringValue);
- std::string tag = stringValue.Get ();
- GlobalValue::GetValueByName ("isBeamSearchMethod", booleanValue);
- bool isBeamSearchMethod = booleanValue.Get ();
- GlobalValue::GetValueByName ("beamSearchMethodAngle", doubleValue);
- double beamSearchMethodAngle = doubleValue.Get ();
- GlobalValue::GetValueByName ("gnbAntennaMount", enumValue);
- enum AntennaArray3gppModel::GnbAntennaMount gnbAntennaMount = (AntennaArray3gppModel::GnbAntennaMount) enumValue.Get ();
- Nr3gppIndoorCalibration phase1CalibrationScenario;
- phase1CalibrationScenario.Run(shadowing, antennaOrientation, antennaModelGnb, antennaModelUe,
- indoorScenario, speed, resultsDir, tag, isBeamSearchMethod, beamSearchMethodAngle, gnbAntennaMount, duration);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement