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.
galilean_observe
Section titled “galilean_observe”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).
Signature
Section titled “Signature”galilean_observe(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | Galilean moon identifier (see table below) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Moon IDs
Section titled “Moon IDs”| ID | Moon | Orbital Period |
|---|---|---|
| 0 | Io | 1.769 days |
| 1 | Europa | 3.551 days |
| 2 | Ganymede | 7.155 days |
| 3 | Callisto | 16.689 days |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”-- Current positions of all four Galilean moonsSELECT 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_kmFROM 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 elFROM 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;saturn_moon_observe
Section titled “saturn_moon_observe”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.
Signature
Section titled “Signature”saturn_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | Saturn moon identifier (see table below) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Moon IDs
Section titled “Moon IDs”| ID | Moon | Orbital Period | Approx. Magnitude |
|---|---|---|---|
| 0 | Mimas | 0.942 days | +12.9 |
| 1 | Enceladus | 1.370 days | +11.7 |
| 2 | Tethys | 1.888 days | +10.2 |
| 3 | Dione | 2.737 days | +10.4 |
| 4 | Rhea | 4.518 days | +9.7 |
| 5 | Titan | 15.945 days | +8.3 |
| 6 | Iapetus | 79.322 days | +10.2-11.9 |
| 7 | Hyperion | 21.277 days | +14.2 |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”-- All eight Saturn moons' current positionsSELECT 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_kmFROM 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 periodSELECT t, round(topo_azimuth(pos)::numeric, 4) AS az, round(topo_elevation(pos)::numeric, 4) AS elFROM 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;uranus_moon_observe
Section titled “uranus_moon_observe”Computes the topocentric position of a moon of Uranus as seen from an Earth-based observer. Uses the GUST86 theory (Laskar & Jacobson, 1987).
Signature
Section titled “Signature”uranus_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | Uranus moon identifier (see table below) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Moon IDs
Section titled “Moon IDs”| ID | Moon | Orbital Period | Approx. Magnitude |
|---|---|---|---|
| 0 | Miranda | 1.413 days | +16.5 |
| 1 | Ariel | 2.520 days | +14.2 |
| 2 | Umbriel | 4.144 days | +14.8 |
| 3 | Titania | 8.706 days | +13.9 |
| 4 | Oberon | 13.463 days | +14.1 |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”-- All five Uranus moons' current positionsSELECT 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_kmFROM generate_series(0, 4) AS moon_id, uranus_moon_observe(moon_id, '40.0N 105.3W 1655m'::observer, now()) AS t;mars_moon_observe
Section titled “mars_moon_observe”Computes the topocentric position of a moon of Mars as seen from an Earth-based observer. Uses the MarsSat analytical theory.
Signature
Section titled “Signature”mars_moon_observe(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | Mars moon identifier (see table below) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Moon IDs
Section titled “Moon IDs”| ID | Moon | Orbital Period | Approx. Magnitude |
|---|---|---|---|
| 0 | Phobos | 0.319 days (7.66 hours) | +11.4 |
| 1 | Deimos | 1.263 days | +12.5 |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”-- Phobos and Deimos positions from BoulderSELECT 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_kmFROM 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 elFROM 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;