Skip to content

Functions: Moons

Functions for observing the natural satellites of Jupiter, Saturn, Uranus, and Mars. Each moon family uses a dedicated analytical theory for computing satellite positions relative to the parent planet, which is then transformed to Earth-based topocentric coordinates.


Computes the topocentric position of a Galilean moon of Jupiter as seen from an Earth-based observer. Uses the Lieske L1.2 theory (Lieske, 1998).

galilean_observe(moon_id int4, obs observer, t timestamptz) → topocentric
ParameterTypeDescription
moon_idint4Galilean moon identifier (see table below)
obsobserverObserver location on Earth
ttimestamptzObservation time
IDMoonOrbital Period
0Io1.769 days
1Europa3.551 days
2Ganymede7.155 days
3Callisto16.689 days

A topocentric with azimuth, elevation, range (km), and range rate (km/s).

-- Current positions of all four Galilean moons
SELECT moon_id,
CASE moon_id
WHEN 0 THEN 'Io' WHEN 1 THEN 'Europa'
WHEN 2 THEN 'Ganymede' WHEN 3 THEN 'Callisto'
END AS moon,
round(topo_azimuth(t)::numeric, 4) AS az,
round(topo_elevation(t)::numeric, 4) AS el,
round(topo_range(t)::numeric, 0) AS range_km
FROM generate_series(0, 3) AS moon_id,
galilean_observe(moon_id, '40.0N 105.3W 1655m'::observer, now()) AS t;
-- Track Io's position over one orbital period (1.769 days)
SELECT t,
round(topo_azimuth(pos)::numeric, 4) AS az,
round(topo_elevation(pos)::numeric, 4) AS el
FROM generate_series(
now(), now() + interval '1.769 days', interval '15 minutes'
) AS t,
galilean_observe(0, '40.0N 105.3W 1655m'::observer, t) AS pos;

Computes the topocentric position of a moon of Saturn as seen from an Earth-based observer. Uses the TASS17 theory (Vienne & Duriez, 1995) for the eight major Saturnian moons.

saturn_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentric
ParameterTypeDescription
moon_idint4Saturn moon identifier (see table below)
obsobserverObserver location on Earth
ttimestamptzObservation time
IDMoonOrbital PeriodApprox. Magnitude
0Mimas0.942 days+12.9
1Enceladus1.370 days+11.7
2Tethys1.888 days+10.2
3Dione2.737 days+10.4
4Rhea4.518 days+9.7
5Titan15.945 days+8.3
6Iapetus79.322 days+10.2-11.9
7Hyperion21.277 days+14.2

A topocentric with azimuth, elevation, range (km), and range rate (km/s).

-- All eight Saturn moons' current positions
SELECT moon_id,
CASE moon_id
WHEN 0 THEN 'Mimas' WHEN 1 THEN 'Enceladus'
WHEN 2 THEN 'Tethys' WHEN 3 THEN 'Dione'
WHEN 4 THEN 'Rhea' WHEN 5 THEN 'Titan'
WHEN 6 THEN 'Iapetus' WHEN 7 THEN 'Hyperion'
END AS moon,
round(topo_azimuth(t)::numeric, 4) AS az,
round(topo_elevation(t)::numeric, 4) AS el,
round(topo_range(t)::numeric, 0) AS range_km
FROM generate_series(0, 7) AS moon_id,
saturn_moon_observe(moon_id, '40.0N 105.3W 1655m'::observer, now()) AS t;
-- Track Titan over one orbital period
SELECT t,
round(topo_azimuth(pos)::numeric, 4) AS az,
round(topo_elevation(pos)::numeric, 4) AS el
FROM generate_series(
now(), now() + interval '15.945 days', interval '1 hour'
) AS t,
saturn_moon_observe(5, '40.0N 105.3W 1655m'::observer, t) AS pos;

Computes the topocentric position of a moon of Uranus as seen from an Earth-based observer. Uses the GUST86 theory (Laskar & Jacobson, 1987).

uranus_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentric
ParameterTypeDescription
moon_idint4Uranus moon identifier (see table below)
obsobserverObserver location on Earth
ttimestamptzObservation time
IDMoonOrbital PeriodApprox. Magnitude
0Miranda1.413 days+16.5
1Ariel2.520 days+14.2
2Umbriel4.144 days+14.8
3Titania8.706 days+13.9
4Oberon13.463 days+14.1

A topocentric with azimuth, elevation, range (km), and range rate (km/s).

-- All five Uranus moons' current positions
SELECT moon_id,
CASE moon_id
WHEN 0 THEN 'Miranda' WHEN 1 THEN 'Ariel'
WHEN 2 THEN 'Umbriel' WHEN 3 THEN 'Titania'
WHEN 4 THEN 'Oberon'
END AS moon,
round(topo_azimuth(t)::numeric, 4) AS az,
round(topo_elevation(t)::numeric, 4) AS el,
round(topo_range(t)::numeric, 0) AS range_km
FROM generate_series(0, 4) AS moon_id,
uranus_moon_observe(moon_id, '40.0N 105.3W 1655m'::observer, now()) AS t;

Computes the topocentric position of a moon of Mars as seen from an Earth-based observer. Uses the MarsSat analytical theory.

mars_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentric
ParameterTypeDescription
moon_idint4Mars moon identifier (see table below)
obsobserverObserver location on Earth
ttimestamptzObservation time
IDMoonOrbital PeriodApprox. Magnitude
0Phobos0.319 days (7.66 hours)+11.4
1Deimos1.263 days+12.5

A topocentric with azimuth, elevation, range (km), and range rate (km/s).

-- Phobos and Deimos positions from Boulder
SELECT moon_id,
CASE moon_id
WHEN 0 THEN 'Phobos'
WHEN 1 THEN 'Deimos'
END AS moon,
round(topo_azimuth(t)::numeric, 4) AS az,
round(topo_elevation(t)::numeric, 4) AS el,
round(topo_range(t)::numeric, 0) AS range_km
FROM generate_series(0, 1) AS moon_id,
mars_moon_observe(moon_id, '40.0N 105.3W 1655m'::observer, now()) AS t;
-- Track Phobos through one full orbit (~7.66 hours)
SELECT t,
round(topo_azimuth(pos)::numeric, 4) AS az,
round(topo_elevation(pos)::numeric, 4) AS el
FROM generate_series(
now(), now() + interval '7.66 hours', interval '5 minutes'
) AS t,
mars_moon_observe(0, '40.0N 105.3W 1655m'::observer, t) AS pos;