This demo represents our Solar System in ortographic projection. It consists of 8 planets.Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune.Planets use real - life scale.
On the other hand Sun's scale had to be diminished a lot in order for planets to be visible in the simulation.
Planets use real mass and distances from Sun.Their orbits use real semi-major axis length, eccentricity, argument of periapsis, inclination and longtitude of ascending node of the orbit.
Initial planet positions are at their perihelio(Point on the orbit that is closest the the orbited object(Sun).
Velocity, centripetal force, and distance of planets are accurate with little deviations caused by rounding.
In order to calculate position of the planet, we have to calculate mean anomaly
MA=n*Time.time where
n is mean angular motion which is calculated as
n=SQRT(mu/a3) where
mu is standard gravitational parameter and
a is the length of semi-major axis.
Then we need eccentric anomaly which had to be estimated via Newthon's method from the formula
MA=E-e*sinE
where E is the eccentric anomaly and e is eccentricity.
After that we can calculate true anomaly
and distance
and with all this information we are able to calculate position of the planet on the orbit in relation to time