# Multiple moons orbiting a gas giant: How would I calculate how long it appears for a closer moon to orbit the planet from a further-out moon?

I have a habitable moon orbiting a gas giant, and there is another moon orbiting the planet on a closer orbit. The cultures on the near-side of the further, habitable moon use the transit of the closer moon across the planet for timekeeping, but I don't know how to figure out how long it appears to take the closer moon to orbit the planet from the surface of the further moon. It takes the closer moon (161,600 km from planetary center) 19.85 hours to orbit the planet, and the further moon (340,800 km from planetary center) 60.57 hours to do the same. They orbit in the same direction and both have very low eccentricity. Is there some way to numerically model the two moons' orbits around the planet so that I can see how fast one moon appears to travel relative to the other?

• You may be better asking on astronomy.se. We will probably be able to answer but you might get a better answer there. – Bellerophon Oct 28 '16 at 21:03
• Why numerically? You can find a solution using normal math. Without numerical errors. – Mołot Oct 28 '16 at 21:06
• Are you asking how many hours pass in between 'high moons', the times at which the uninhabited moon is directly overhead for those on the inhabited moon, or are you asking how fast it moves across the sky while in view? – Mathily Oct 28 '16 at 21:21

You are looking for the synodic period.

Even if the moons had a significant eccentricity or inclination, the average "apparent" orbital period over time is still easily modelled analytically.

This is the relationship between the synodic period and the orbital period of the two moons:

$$\frac{1}{P_{syn}}=\frac{1}{P_1}-\frac{1}{P_2}$$

Alternatively, it may be more convinient to calculate it in this way:

$$P_{syn}=\frac{P_2P_1}{P_2-P_1}$$

Pseudo code:

function synodicPeriod(period1,period2){
inverseSynodic = 1/period1 - 1/period2;
return 1/inverseSynodic;
}


Alternatively, the relative velocity between the two moons varies, from $v_1-v_2$ when closest, to $v_1+v_2$ when on opposite sides. (assuming circular, coplanar orbits)

For any angle $\alpha$ between the position vectors, the relative velocity is

$$v_{rel}=\sqrt{(v_2 -v_1\cos \alpha)^2+(v_1\sin \alpha)^2}$$

Finally, just in case it turns out to be useful, there is another thing to consider if your point of view is the surface of the central planet. The apparent orbital period of the moon as viewed from the planet's surface is the synodic period between the moon and the rotational period for the planet. Apply the same formula as earlier