mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 01:53:58 +02:00
Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2cde1ba266 | ||
![]() |
a82e22aab7 | ||
![]() |
54709ae1fb | ||
![]() |
0a7f41818d |
6 changed files with 14 additions and 6 deletions
5
data/orbits/starlink.csv
Normal file
5
data/orbits/starlink.csv
Normal file
|
@ -0,0 +1,5 @@
|
|||
1150.0:53.0:32:50
|
||||
1110.0:53.8:32:50
|
||||
1130.0:74.0:8:50
|
||||
1275.0:81.0:5:75
|
||||
1325.0:70.0:6:75
|
|
2
data/orbits/telesat.csv
Normal file
2
data/orbits/telesat.csv
Normal file
|
@ -0,0 +1,2 @@
|
|||
1000.0:99.5:6:12
|
||||
1248.0:37.4:5:9
|
|
|
@ -84,7 +84,7 @@ int main (int argc, char *argv[])
|
|||
|
||||
LeoOrbitNodeHelper orbit;
|
||||
NodeContainer satellites;
|
||||
if (orbitFile.empty())
|
||||
if (!orbitFile.empty())
|
||||
{
|
||||
satellites = orbit.Install (orbitFile);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ int main(int argc, char *argv[])
|
|||
CommandLine cmd;
|
||||
std::string orbitFile;
|
||||
std::string traceFile;
|
||||
double duration = 60;
|
||||
std::string duration = "60s";
|
||||
cmd.AddValue("orbitFile", "CSV file with orbit parameters", orbitFile);
|
||||
cmd.AddValue("traceFile", "CSV file to store mobility trace in", traceFile);
|
||||
cmd.AddValue("precision", "ns3::LeoCircularOrbitMobilityModel::Precision");
|
||||
|
@ -47,7 +47,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
LeoOrbitNodeHelper orbit;
|
||||
NodeContainer satellites;
|
||||
if (orbitFile.empty())
|
||||
if (!orbitFile.empty())
|
||||
{
|
||||
satellites = orbit.Install (orbitFile);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
std::cout << "Time,Satellite,x,y,z,Speed" << std::endl;
|
||||
|
||||
Simulator::Stop (Seconds (duration));
|
||||
Simulator::Stop (Time (duration));
|
||||
Simulator::Run ();
|
||||
Simulator::Destroy ();
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ int main (int argc, char *argv[])
|
|||
|
||||
LeoOrbitNodeHelper orbit;
|
||||
NodeContainer satellites;
|
||||
if (orbitFile.empty())
|
||||
if (!orbitFile.empty())
|
||||
{
|
||||
satellites = orbit.Install (orbitFile);
|
||||
}
|
||||
|
|
|
@ -123,7 +123,8 @@ LeoCircularOrbitMobilityModel::GetProgress (Time t) const
|
|||
{
|
||||
sign = -1;
|
||||
}
|
||||
return sign * (2 * M_PI * ((GetSpeed () * t.GetSeconds ()) / LEO_EARTH_RAD_KM)) + m_offset;
|
||||
// 2pi * (distance travelled / circumference of earth) + offset
|
||||
return sign * (((GetSpeed () * t.GetSeconds ()) / (LEO_EARTH_RAD_KM * 1000))) + m_offset;
|
||||
}
|
||||
|
||||
Vector3D
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue