52 karma · joined November 30, 2018
Many thanks for your feedback! Implementing an integrator with an adaptive time step is on my bucket list of features that I intend to implement, as tweaking the time step manually, especially with the freaking slider, is somewhat of a pain in the neck. Another reason for why I want to implement an adaptive time step is that collisions don't really work with a fixed one as sometimes a mass will travel farther in one time step than the radius (I use a simple radius check for collisions since it doesn't require that much computing power) of the body it is smacking into, and as such the hit won't get registered, which looks kind of shoddy (implemented collisions but removed them for this reason).I've had an eye on the RK45 method, but I'm definitely going to give implementing the Bulirsch-Stoer Integrator a go as I want the user to be able to select the integrator they want to run a scenario with (right now I've just implemented Euler and RK4). As for using spherical or cylindrical coordinates, the thing is that the intention is for the user to be able to, for instance, add another sun to our solar system to marvel at all the cosmic shenanigans that would take place, so while a lot of the scenarios start out with a single large mass, that might not be the case for long if the user has a penchant for destruction.
Every body in the simulation start out with a set of initial position and velocity vectors. For the solar system scenarios, I got these vectors from NASA JPL's Horizon System (https://ssd.jpl.nasa.gov/horizons.cgi#top), so the orbit of Juno that you are observing is its actual orbit... Its eccentricity (the extent to which the shape of the orbit departs from a perfect circle) is extremely high; at its closest point, the orbit brings Juno right above the cloud tops of Jupiter, and at its furthest point Juno finds itself beyond Themisto (one of Jupiter's irregular Moons which I should perhaps add to the scenario). Juno was meant to have a less eccentric orbit, but as technical problems were encountered when they were going to fire Juno's thrusters to reduce the eccentricity of the orbit, NASA played it safe and let Juno stay on its eccentric orbit. One of the advantages of this is that Juno only spends a very short amount of time in Jupiter's insanely powerful and to a spacecraft damaging magnetic field, so the technical mishap is probably one of the reasons JunoCam is still operating and giving us beautiful images of Jupiter's swirling clouds! Here's a gif from WikiPedia showing how stretched out Juno's orbit is https://en.wikipedia.org/wiki/Juno_(spacecraft)#/media/File:.... Sorry for the long rant, but I find these things to be awesomely fascinating.