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();
59 cmd.AddValue(
"PosCount",
"Amount of positions to generate per beam", posCount);
60 simulationHelper->AddDefaultUiArguments(cmd, inputFileNameWithPath);
61 cmd.Parse(argc, argv);
62 simulationHelper->ConfigureAttributesFromFile(inputFileNameWithPath);
64 Ptr<SatHelper> satHelper = simulationHelper->GetSatelliteHelper();
65 for (uint32_t beamId : simulationHelper->GetBeamSet())
67 for (uint32_t posId = 0; posId < posCount; ++posId)
69 Ptr<SatSpotBeamPositionAllocator> positions = satHelper->GetBeamAllocator(beamId);
71 std::cout <<
"[" << beamId <<
"] " << coords << std::endl;
75 simulationHelper->SetSimulationTime(0.1);
76 simulationHelper->RunSimulation();
GeoCoordinate class is used to store and operate with geodetic coordinates.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.