Solar System model (planetary n-body modelling)

From initial positions and velocities, the motion of planets, comets and spacecraft can be modeled.
4.9K Downloads
Updated 16 Dec 2009

View License

Using a table of initial positions and velocities derived from JPL's "Horisons" System (http://ssd.jpl.nasa.gov/?horizons) , it is possible to predict the motion of all of the elements in the table.
The default table (supplied) contains 25 bodies - the planets of the Solar System (including the moons of Earth, Jupiter and Saturn), Voyager 1 and 2 as well as Halley's Comet. "trajectory_sim.m'' generates a data file, "trajectory_player.m" and ''trajectory_player-animate.m"' will play back the data file.
I welcome any feedback on improving this code.
Best Wishes,
Stephen

Cite As

Stephen Walker (2026). Solar System model (planetary n-body modelling) (https://au.mathworks.com/matlabcentral/fileexchange/26114-solar-system-model-planetary-n-body-modelling), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0