arda-guler / orbitSim3D

Sophisticated astrodynamics and space mission simulator. Calculate n-body trajectories, perform orbital maneuvers, apply various perturbations, generate plots, and more! Minimal dependencies.
https://arda-guler.github.io/OrbitSim3D-web/
MIT License
62 stars 9 forks source link

Output extraction #4

Open PieDema96 opened 1 year ago

PieDema96 commented 1 year ago

Hi there! Nice tool. I have two questions.

  1. is there a test suite already implemented or a validation procedure for the tool?
  2. how to dump results from simulations? (e.g. position and velocity of satellites in time...)

Thank you in advance

arda-guler commented 1 year ago

Thank you.

  1. I usually recrate scenarios in GMAT (https://opensource.gsfc.nasa.gov/projects/GMAT/index.php), or integrate state vectors obtained from JPL Horizons (https://ssd.jpl.nasa.gov/horizons/) and check them against a later state, obtained again from JPL Horizons system. However, the error measurements are not documented just yet, as I'm yet to compile a set of results.
  2. That's not implemented yet. You could implement that yourself, wait for me to implement it when I can make time to work more on the project, or for a quick "fix" you could use the plotting tool and export the matplotlib graphs, although it is not the ideal solution.
arda-guler commented 1 year ago

Also, about question 1, if you wish to easily create Solar System scenarios yourself using JPL Horizons data, I have this utility here that does it for you: https://github.com/arda-guler/orbitSim3D/blob/master/utilities/JPL_SolarSystem.py.

arda-guler commented 1 year ago

I've sat down and documented how I like to do validations, including a test case using the Solar System: https://github.com/arda-guler/orbitSim3D/blob/master/docs/validation.md

It is not automated still, and so requires quite a lot of work. Now, to be able to dump position and velocity history... I'm yet to work on that :)

PieDema96 commented 1 year ago

Thank you @arda-guler ! Please notify here when also dumping will be ready for use. I am really looking for that!

arda-guler commented 1 year ago

I made it so that plots dump their data (at the end of their assigned data recording time) into csv files into an /exported_data directory with the same name as the given plot title. In the current state, each plot can only record one variable against time at a time, so unfortunately, if you want to dump all x, y, z coordinates of position, you'll have to create three plots. Then you can copy the columns of the csv files into one file manually.

I'll look into the possibility of recording all three components of vectors into one plot, but that requires modifying the plot class, so I'll do that later.

PieDema96 commented 1 year ago

Hi @arda-guler ! Great! I am testing it right. Thanks

arda-guler commented 6 months ago

Sorry about the slow progress... I've implemented a laborless test method directly accessible from the main menu. There is still some work to do to make it more configurable and all-encompassing than its current situation, as it currently only tests the n-body point-mass gravitational model on a Solar System simulation. I'm not going to close the issue yet since there is still a whole bunch of work left, but I wanted to give a small update.

Edit: Oh, and it requires the skyfield package now.