21 #include <ns3/config-store-module.h>
22 #include <ns3/core-module.h>
23 #include <ns3/internet-module.h>
24 #include <ns3/network-module.h>
25 #include <ns3/satellite-module.h>
26 #include <ns3/traffic-module.h>
39 NS_LOG_COMPONENT_DEFINE(
"sat-beam-position-tracer");
44 Ptr<SatAntennaGainPatternContainer> antennaGainPatterns = satHelper->GetAntennaGainPatterns();
45 NodeContainer satNodes = Singleton<SatTopology>::Get()->GetOrbiterNodes();
46 uint32_t beamCount = satHelper->GetBeamCount();
47 for (uint32_t satId = 0; satId < satNodes.GetN(); satId++)
49 Ptr<SatMobilityModel> mobility = antennaGainPatterns->GetAntennaMobility(satId);
50 for (uint32_t beamId = 0; beamId < beamCount; beamId++)
52 Ptr<SatAntennaGainPattern> pattern =
53 antennaGainPatterns->GetAntennaGainPattern(beamId + 1);
54 std::cout << Simulator::Now().GetSeconds() <<
";" << satId <<
";" << beamId <<
";"
55 << pattern->GetCenterLatitude(mobility) <<
";"
56 << pattern->GetCenterLongitude(mobility) << std::endl;
62 main(
int argc,
char* argv[])
64 std::string scenario =
"constellation-leo-2-satellites";
65 uint32_t simLength_s = 1000;
66 uint32_t simTraceStep_s = 10;
68 Config::SetDefault(
"ns3::SatConf::ForwardLinkRegenerationMode",
70 Config::SetDefault(
"ns3::SatConf::ReturnLinkRegenerationMode",
73 Config::SetDefault(
"ns3::SatGwMac::DisableSchedulingIfNoDeviceConnected", BooleanValue(
true));
74 Config::SetDefault(
"ns3::SatOrbiterMac::DisableSchedulingIfNoDeviceConnected",
77 Ptr<SimulationHelper> simulationHelper =
78 CreateObject<SimulationHelper>(
"sat-beam-position-tracer");
81 cmd.AddValue(
"Scenario",
"Scenario to load", scenario);
82 simulationHelper->AddDefaultUiArguments(cmd);
83 cmd.Parse(argc, argv);
85 simulationHelper->LoadScenario(scenario);
86 simulationHelper->SetSimulationTime(simLength_s);
87 simulationHelper->SetUserCountPerUt(1);
89 Ptr<SatHelper> satHelper = simulationHelper->CreateSatScenario(
SatHelper::FULL);
92 while (t <= simLength_s)
95 t = t + simTraceStep_s;
98 std::cout <<
"time;satId;beamId;latitude;longitude" << std::endl;
100 simulationHelper->RunSimulation();
@ FULL
FULL Full scenario used as base.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
void GetBeamPositions(Ptr< SatHelper > satHelper)