Several Solar System bodies are used to calculate their orbits based on the following:
- Masses,
- Initial positions on specific date and
- Initial velocities.
The script makes use of a call to Python to retrieve real positions and velocities from JPL Horizons System. The positions are in Astronomical Units (AU) and the velocities in AU/day.
The procedures are as follows:
- Ensure a Python environment is accessible by Matlab as per instructions here: https://www.mathworks.com/support/search.html/answers/1750425-python-virtual-environments-with-python-interface.html?fq%5B%5D=asset_type_name:answer&page=1.
- Edit the date required in the python script. (Ensure the Python script is in the same directory)
- Run the nbody Matlab script.