Skip to content

Library I am using for testing how gravity acts between two objects

Notifications You must be signed in to change notification settings

lvm12/Two-Body-Problem

Repository files navigation

Simulation of the two body problem in kotlin. Was accurately able to simulate the movement of the ISS around the earth. image

Contains some, presets which you can feel free to mess around with.

Usage:

  1. Download project and open in intellij idea or an ide of your choice provided it has kotlin and jupyter notebook support
  2. Change the values in the list in Main.kt to try with different objects
  3. Change the condition used in Main.kt in the repeatUntil function, the default simulates 90 minutes
  4. Change time interval if neccesary
  5. Run Main.kt, you can choose between 3 options:
    Enter 0: Go step by step with extra logging information. Press enter to go to the next step
    Enter 1: Runs the program indefinitley, no real reason to do this
    Just hit enter: Runs the program untile the choosen condition becomes true
  6. This creates results in a "results.csv" file
  7. To graph the results open Plot.ipynb and run the cell

About

Library I am using for testing how gravity acts between two objects

Resources

Stars

Watchers

Forks

Packages

No packages published