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

The only problem is that the last two elements; the

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 |

Since the Argument of Perihelion and the Longitude of the Ascending Node are given on the JPL webpage, we can calculate the

```
//LONG. PERIHELION(W) =
//ARG. PERIHELION(w) + LONG. ASC. NODE(☊)
function calcLPeri(argPeri, longAscNode) {
return (argPeri + longAscNode) % 360;
}
```

And we can also calculate the

```
//MEAN LONGITUDE(L) =
//ARG. PERIHELION(w) + LONG. ASC. NODE(☊) + MEAN ANOMALY(M)
function calcMeanL(argPeri, longAscNode, meanAnom){
return (argPeri + longAscNode + meanAnom) % 360;
}
```

After doing these calculations, see below the complete set of Keplerian Elements for the moon Titan:

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 |

As you can see, we do not know the rates for the

Next to that, to convert the rates for

```
//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;
}
```

Finally, to calculate the

Now see below the complete set of Keplerian Rates for the moon Titan:

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 |

Saturn takes roughly 29.45 years to complete a full orbit around the sun. Based on the formula given above, when the Gregorian date is January 1, 2000, this

The finished JS Moon Simulation with all seven major moons of the Saturnian System can be seen on the right.
The moons in order:

You can also verify the positions of the Saturnian Moons using NASA's Solar System Simulator.

- MIMAS
- ENCELADUS
- TETHYS
- DIONE
- RHEA
- TITAN
- IAPETUS

You can also verify the positions of the Saturnian Moons using NASA's Solar System Simulator.