Skip to content

MarkDGraham/Python-2D-Orbital-Sim

Repository files navigation

flatearth_projectile_sim

Simulation of a projectile on a Flat Earth written in Python.

Viewing Graphs and Plots

  To view graphs and plots specifically using VS Code, the "# %%"
in the code allows for VS Code to use the Jypter Notebook extension to
display the plots. To run them, click "Run Cell" right above "# %%".

Saving Graphs

  To save the graphs for viewing, remove '#' character on code
that contains "mpl.savefig(..." This will save the graphs/plots
to graph representation.

Packages:

"numpy" is the numerical library allowing for numerical conversions.
"matplotlib" is the MatLab ploting style for graphs and plots.
"scipy" is a science tool box which comes with integration included.

To run code:

  1. Enter the Virtual environment.
  • Widnows: "..venv\Scripts\activate"
  • Mac: "source .venv/bin/activate"
  1. Run "pip install -r requirements.txt"
  2. Run python code:
  • Windows: "(py or python) projectile.py"
  • Mac: "python projectile.py"
  1. Run Newtonian Calculations:
  • Windows: "(py or python) projectile_newtonian.py"
  • Mac: "python projectile_newtonian.py"
  1. Run 2D Model:
  • Windows: "(py or python) projectile_2D_newtonian.py"
  • Mac: "python projectile_newtonian.py"
  1. Run Single Stage Rocket Model:
  • Windows: "(py or python) single_stage_rocket.py"
  • Mac: "python single_stage_rocket.py"
  1. Run Second Stage Rocket Model (for Kerbin):
  • Windows: "(py or python) second_stage_rocket.py"
  • Mac: "python second_stage_rocket.py"
  1. Run Aerodynamic 2 Stage Rocket (for Kerbin):
  • Windows: "(py or python) aerodynamic_2_stage.py"
  • Mac: "python aerodynamic_2_stage.py"

About

Simulation of a projectile on a Flat Earth written in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages