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>
42 NS_LOG_COMPONENT_DEFINE(
"sat-mobility-position-generator");
45 main(
int argc,
char* argv[])
47 std::string inputFileNameWithPath =
48 Singleton<SatEnvVariables>::Get()->LocateDirectory(
"contrib/satellite/examples") +
49 "/generic-input-attributes.xml";
50 uint32_t posCount = 1;
52 Ptr<SimulationHelper> simulationHelper =
53 CreateObject<SimulationHelper>(
"sat-mobility-position-generator");
54 simulationHelper->DisableAllCapacityAssignmentCategories();
55 simulationHelper->EnableCrdsa();
57 simulationHelper->LoadScenario(
"geo-33E");
61 cmd.AddValue(
"PosCount",
"Amount of positions to generate per beam", posCount);
62 simulationHelper->AddDefaultUiArguments(cmd, inputFileNameWithPath);
63 cmd.Parse(argc, argv);
64 simulationHelper->ConfigureAttributesFromFile(inputFileNameWithPath);
66 Ptr<SatHelper> satHelper = simulationHelper->GetSatelliteHelper();
67 for (uint32_t beamId : simulationHelper->GetBeamSet())
69 for (uint32_t posId = 0; posId < posCount; ++posId)
71 Ptr<SatSpotBeamPositionAllocator> positions = satHelper->GetBeamAllocator(beamId);
73 std::cout <<
"[" << beamId <<
"] " << coords << std::endl;
77 simulationHelper->SetSimulationTime(0.1);
78 simulationHelper->RunSimulation();
GeoCoordinate class is used to store and operate with geodetic coordinates.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.