Skip to content

jim-tooker/orbits

Repository files navigation

Orbit Simulator

(Package orbits)

This program simulates the rotation and orbital physics of celestial bodies. For each celestial body, the following are visualized:

  • Rotation period around its axis
  • Axial tilt with respect to its orbit
  • Orbital inclination
  • Orbital period
  • Orbital radius
  • Path of the orbit, including direction and semi-major, semi-minor axis, and eccentricity

Here are the runtime options: python orbit_simulator.py -h:

options:
  -h, --help            show this help message and exit
  -t TIME_SCALE_FACTOR, --time_scale_factor TIME_SCALE_FACTOR
                        How much to scale up the sense of time. 0 means use best-fit time scaling. (default: 0)
  -r RUNTIME, --runtime RUNTIME
                        How many secs to run the simulation. 0 means run indefinitely. (default: 0)
  -m {sun_earth_moon,earth_moon}, --mode {sun_earth_moon,earth_moon}
                        Simulation mode to use. (default: sun_earth_moon)
  --no_gui              Run without GUI (default: False)

Modules:

  • orbit_simulator: Main module responsible for setting up and running the orbit simulation.
  • simulation_mode: Handles what simulation mode we are in and all the corresponding GUI components.
  • motion_tracker: Defines classes that keep track of the motion of the celestial bodies.
  • celestial_body: Defines classes and data structures for representing celestial bodies.
  • orbit: Defines classes and data structures for representing orbits.
  • config: Stores the configuration information shared among the modules.
  • constants: Constants for the orbits package.

Documentation

For detailed API documentation, see: Orbit Simulator API Documentation

To Use

  1. Clone this repository.
  2. Run the setup script: setup.sh. (This will install needed dependencies)
  3. Run python orbit_simulator.py. (With or without command line options)

Sample Screenshots

orbits-screenshot Orbits with Sun-Screenshot

About

Simulates orbits of Celestial Bodies in our Solar System.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors