This second tutorial explains how you can create your own Saturnian System simulation or "orrery" using simple JavaScript. The end result will feature all the major Saturnian moons (including Titan) in their orbits around Saturn based on a Gregorian input date.
And the concepts tought here can also be applied to create a simulation for the Jovian System or even one for our own Moon. The only difference is swapping out the Keplerian Elements and Rates.
This Saturian System tutorial builds upon the first tutorial, which explains how to create your own JavaScript Solar System simulation.
If you haven't followed that JS tutorial yet, we recommend to do that first: TUTORIAL - PLANETS
I. ORBIT SIZE (a0) | II. ORBIT SHAPE (e0) | III. ORBIT INCLINATION (i0) | IV. LONGITUDE OF ASCENDING NODE (Ω0) | V. LONGITUDE OF PERIHELION (ϖ0) | VI. MEAN LONGITUDE (L0) |
1,221,865km | 0.0288 | 0.306° | 28.060° | CALCULATE | CALCULATE |
//LONG. PERIHELION(W) =
//ARG. PERIHELION(w) + LONG. ASC. NODE(☊)
function calcLPeri(argPeri, longAscNode) {
return (argPeri + longAscNode) % 360;
}
//MEAN LONGITUDE(L) =
//ARG. PERIHELION(w) + LONG. ASC. NODE(☊) + MEAN ANOMALY(M)
function calcMeanL(argPeri, longAscNode, meanAnom){
return (argPeri + longAscNode + meanAnom) % 360;
}
I. ORBIT SIZE (a0) | II. ORBIT SHAPE (e0) | III. ORBIT INCLINATION (i0) | IV. LONGITUDE OF ASCENDING NODE (Ω0) | V. LONGITUDE OF PERIHELION (ϖ0) | VI. MEAN LONGITUDE (L0) |
1,221,865km | 0.0288 | 0.306° | 28.060° | 208.592° | 11.902° |
I. ORBIT SIZE (a1) | II. ORBIT SHAPE (e1) | III. ORBIT INCLINATION (i1) | IV. LONGITUDE OF ASCENDING NODE (Ω1) | V. LONGITUDE OF PERIHELION (ϖ1) | VI. MEAN LONGITUDE (L1) |
#N/A | #N/A | #N/A | 704.60 yr | 352.12 yr | 22.58 deg/day |
//LONG. PERIHELION RATE = (100 YEARS / ARG. PERIHELION RATE (YEARS)) * 360 DEGREES
//LONG. ASC. NODE RATE = (100 YEARS / LONG. ASC. NODE RATE (YEARS)) * 360 DEGREES
function calcCenturyRate(rate){
return (100/rate) * 360;
}
I. ORBIT SIZE (a1) | II. ORBIT SHAPE (e1) | III. ORBIT INCLINATION (i1) | IV. LONGITUDE OF ASCENDING NODE (Ω1) | V. LONGITUDE OF PERIHELION (ϖ1) | VI. MEAN LONGITUDE (L1) |
0km/cty | 0/cty | 0°/cty | 51.09°/cty | 102.24°/cty | 824,624°/cty |