sotos82 / SolarSystemSimulatorGame

A simulation of our Solar System and a game at the same time made mainly for educational purposes (it gives a good sense of the time and space scale of out Solar System). The planets the moon and the Space Crafts follow realistic (elliptical) orbits in phase space and the relative sizes of planets and moon are correct. For the orbital elements of the planets I used values according to the NASA planetary fact sheet. The radius of all planets and moon is increased by a factor of 30 to avoid floating point errors since the GPU internally is using single precision arithmetics. The planetary orbits are pre-computed at start time using a 4rth-order Runge-Kutta integrator. Specifically the 2nd Kepler-law (which is a differential equation) is solved for the values according to the Nasa Fact-Sheet for the planets of our solar system and the moon. The trajectories of the Space-Crafts are calculated at run time using a 2nd order Leapfrog Integrator with initial conditions based on user input and Earth's position and velocity at the time the Space Craft is launched. The goal of the game is to launch Space Crafts and complete the missions. Check out the video in the right for gameplay footage. Note that in order to play the game you need a mouse with a wheel. Programmed with C# and powered by Unity.
https://www.youtube.com/watch?v=1qL-AhrCbQ8
GNU General Public License v2.0
137 stars 30 forks source link

Reference of formulas and algorithm used in PlanetaryOrbit script. #4

Open anuroop18 opened 4 years ago

anuroop18 commented 4 years ago

Hey, From where did you refer all the formulas and algorithms used in PlanetaryOrbit script. I want to understand that script but it is very difficult to deduce the real formulas from code. So if you could guide me to proper reference sources, it will be helpful. Thanks https://github.com/sotos82/SolarSystemSimulatorGame/blob/master/Assets/Scripts/Planet/PlanetaryOrbit.cs

sotos82 commented 4 years ago

Hi, For the parametric orbit and parametric velocity I deduced the formulas myself starting from Kepler laws and Newton parametric orbit formula for the Runge method it is just a 4rth order Runge kutta method, you can find info in Wikipedia. Στις Πέμπτη, 16 Ιανουαρίου 2020, 12:01:55 μ.μ. EET, ο χρήστης Anuroop Singh notifications@github.com έγραψε:

Hey, From where did you refer all the formulas and algorithms used in PlanetaryOrbit script. I want to understand that script but it is very difficult to deduce the real formulas from code. So if you could guide me to proper reference sources, it will be helpful. Thanks https://github.com/sotos82/SolarSystemSimulatorGame/blob/master/Assets/Scripts/Planet/PlanetaryOrbit.cs

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.