It seems like you want to generate some Monte Carlo trajectories. I would recommend a tool which is designed for Monte Carlo analyzes: such a tool would allow you to write a script which quickly changes the inputs and run the scenario without any human intervention.
nyx: a mission design, orbit determination and Monte-Carlo tool
Important disclaimer: I am the author of nyx.
Specifically, I would recommend using nyx, whose API documentation is here and source code here. I wrote it because I was unsatisfied with the tools I used at work. Nyx is used on an upcoming mission to the Moon, and for numerous trade studies. It's extremely fast compared to other tools out there.
It has been validated against NASA GMAT for the most part, JPL Monte for some other parts, and the algorithms come from books by Vallado or Schaub. One of advantages of nyx is that you can execute a scenario simply by providing a TOML configuration file. The disadvantage is that, for the time being, you still need to compile the code yourself (but fear not, this should only require a few steps!).
Install
- Install the Rust programming language: https://www.rust-lang.org/learn/get-started
- Download the source code from gitlab (either via
git clone
or by downloading a ZIP file).
- Build nyx by typing the following in a command line:
cargo run --release -- -h
. This step will take a few minutes to build all of the dependencies.
Setting up a scenario
Scenarios in nyx are defined in a TOML file. You can define the initial state in Cartesian, the spacecraft mass, the dynamics it is subjected to, the output file, and the data stored in the output file.
As nyx is in heavy development, I have not had time to produce quality documentation yet. Apologies for that.
A list of valid output headers form the API documentation is found here and the valid date time formats are here.
ISS TOML example
In this example, the headers are set to latitude (degrees), longitude (degree), altitude (meters) and time in Gregorian UTC.
sequence = ["iss"]
[state.iss_init]
x = 8.59072560e2
y = -4.13720368e3
z = 5.29556871e3
vx = 7.37289205
vy = 2.08223573
vz = 4.39999794e-1
frame = "EME2000"
epoch = "2013-03-18T12:00:00.0 UTC"
unit_position = "km" # Default value if unspecified
unit_velocity = "km/s" # Default value if unspecified
[orbital_dynamics.iss]
integration_frame = "EME2000"
initial_state = "iss_init"
point_masses = ["Earth"]
accel_models = ["my_models"]
[spacecraft.iss]
dry_mass = 100.0
fuel_mass = 20.0
orbital_dynamics = "iss"
[propagator.iss]
dynamics = "iss"
stop_cond = "1.0 days"
output = "my_csv"
[accel_models.my_models.harmonics.jgm3_70x70]
frame = "EME2000"
degree = 70
order = 70
file = "data/JGM3.cof.gz"
[output.my_csv]
filename = "./data/iss.csv"
headers = ["geodetic_latitude", "geodetic_longitude", "geodetic_height", "epoch:GregorianUtc"]
Execution
Executing the scenario above outputted this for me:
cargo run --release -- data/iss-example.toml
Finished release [optimized] target(s) in 0.06s
Running `target/release/nyx data/iss-example.toml`
INFO nyx > Loaded scenario `data/iss-example.toml`
INFO nyx_space::celestia::cosm > Loaded 14 ephemerides in 0 seconds.
INFO nyx_space::celestia::cosm > Loaded frame iau moon
INFO nyx_space::celestia::cosm > Loaded frame iau neptune
INFO nyx_space::celestia::cosm > Loaded frame iau sun
INFO nyx_space::celestia::cosm > Loaded frame iau jupiter
INFO nyx_space::celestia::cosm > Loaded frame iau mars
INFO nyx_space::celestia::cosm > Loaded frame iau saturn
INFO nyx_space::celestia::cosm > Loaded frame iau earth
INFO nyx_space::celestia::cosm > Loaded frame iau uranus
INFO nyx_space::celestia::cosm > Loaded frame iau venus
INFO nyx_space::io::gravity > data/JGM3.cof.gz loaded with (degree, order) = (70, 70)
INFO nyx > Executing sequence `iss`
INFO nyx_space::md::ui > Saving output to ./data/iss.csv
INFO nyx_space::md::ui > Propagating for 86400 seconds (~ 1.000 days)
INFO nyx_space::md::ui > Done in 1.060 seconds
Output data
The first few lines of the CSV output file are the following:
geodetic_latitude,geodetic_longitude,geodetic_height,Epoch:GregorianUtc
5.1743091733434703e1,2.8555208350652231e2,4.1005867561649302e2,2013-03-18T12:00:36.738469123 UTC
5.1773299102335201e1,2.8928957847423612e2,4.1036548039617810e2,2013-03-18T12:01:12.527183055 UTC
5.1684646521754630e1,2.9302878309228544e2,4.1065234870355107e2,2013-03-18T12:01:48.381568908 UTC
How to generate your data set
That's up to you ;-)
From what I understand, you need lots of data. So I would write a simple script (in Python for example) to modify the X, Y and Z coordinates of the TOML above using a random normal variable with a 1-sigma of 20 km. If you modify by more than that, the velocity components could be quite wrong, and you might not have a truly representative orbit. I would then code another script which would launch several subprocesses to run cargo run --release ...
for each of the TOML files you generated.