Functions: DE Ephemeris
Optional high-precision function variants that use JPL DE440/441 ephemeris files when configured via the pg_orrery.ephemeris_path GUC. Each function mirrors an existing VSOP87/ELP2000-82B counterpart with identical parameters and return types.
All DE functions are STABLE STRICT PARALLEL SAFE (except pg_orrery_ephemeris_info which is STABLE PARALLEL SAFE, not STRICT). When DE is unavailable, they fall back to their VSOP87/ELP2000-82B equivalents.
See the DE Ephemeris guide for setup and configuration.
planet_heliocentric_de
Section titled “planet_heliocentric_de”Computes the heliocentric ecliptic J2000 position of a planet using DE positions when available, falling back to VSOP87.
Signature
Section titled “Signature”planet_heliocentric_de(body_id int4, t timestamptz) → heliocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier: 0 (Sun), 1-8 (Mercury through Neptune) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”A heliocentric position in AU (ecliptic J2000 frame). Identical return type to planet_heliocentric().
Example
Section titled “Example”-- Compare DE vs VSOP87 heliocentric distancesSELECT body_id, round(helio_distance(planet_heliocentric(body_id, '2024-06-21 12:00:00+00'))::numeric, 10) AS vsop87, round(helio_distance(planet_heliocentric_de(body_id, '2024-06-21 12:00:00+00'))::numeric, 10) AS deFROM generate_series(1, 8) AS body_id;planet_observe_de
Section titled “planet_observe_de”Computes the topocentric position of a planet using DE ephemeris for both the target and Earth positions.
Signature
Section titled “Signature”planet_observe_de(body_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, excluding 3/Earth) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”-- Mars position from Boulder using DESELECT 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 planet_observe_de(4, '40.0N 105.3W 1655m'::observer, now()) AS t;sun_observe_de
Section titled “sun_observe_de”Computes the topocentric position of the Sun using DE positions.
Signature
Section titled “Signature”sun_observe_de(obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”SELECT round(topo_azimuth(t)::numeric, 2) AS az, round(topo_elevation(t)::numeric, 2) AS elFROM sun_observe_de('40.0N 105.3W 1655m'::observer, now()) AS t;moon_observe_de
Section titled “moon_observe_de”Computes the topocentric position of the Moon using DE positions. Falls back to ELP2000-82B when DE is unavailable.
Signature
Section titled “Signature”moon_observe_de(obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”SELECT round(topo_azimuth(t)::numeric, 2) AS az, round(topo_elevation(t)::numeric, 2) AS el, round(topo_range(t)::numeric, 0) AS range_kmFROM moon_observe_de('40.0N 105.3W 1655m'::observer, now()) AS t;lambert_transfer_de
Section titled “lambert_transfer_de”Computes a Lambert transfer orbit using DE-precision planet positions.
Signature
Section titled “Signature”lambert_transfer_de( dep_body_id int4, arr_body_id int4, dep_time timestamptz, arr_time timestamptz) → RECORD(c3_departure float8, c3_arrival float8, v_inf_dep float8, v_inf_arr float8, tof_days float8)Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
dep_body_id | int4 | Departure planet (1-8) |
arr_body_id | int4 | Arrival planet (1-8, different from departure) |
dep_time | timestamptz | Departure epoch |
arr_time | timestamptz | Arrival epoch (must be after departure) |
Returns
Section titled “Returns”Transfer orbit parameters including departure and arrival C3 (km^2/s^2), v-infinity magnitudes, and time of flight.
Example
Section titled “Example”-- Earth-Mars transfer window with DE positionsSELECT round(c3_departure::numeric, 2) AS c3_dep, round(c3_arrival::numeric, 2) AS c3_arr, round(tof_days::numeric, 1) AS tofFROM lambert_transfer_de(3, 4, '2026-05-01 00:00:00+00', '2027-01-15 00:00:00+00');lambert_c3_de
Section titled “lambert_c3_de”Returns only the departure C3 (km^2/s^2) from a Lambert transfer computation using DE positions. A convenience wrapper around lambert_transfer_de().
Signature
Section titled “Signature”lambert_c3_de(dep_body_id int4, arr_body_id int4, dep_time timestamptz, arr_time timestamptz) → float8Example
Section titled “Example”-- Pork chop grid with DE accuracySELECT dep::date AS departure, arr::date AS arrival, round(lambert_c3_de(3, 4, dep, arr)::numeric, 2) AS c3FROM generate_series('2026-04-01'::timestamptz, '2026-08-01'::timestamptz, '14 days') dep, generate_series('2026-12-01'::timestamptz, '2027-04-01'::timestamptz, '14 days') arrWHERE arr > dep + interval '90 days';galilean_observe_de
Section titled “galilean_observe_de”Computes the topocentric position of a Galilean moon of Jupiter. Uses DE for Jupiter’s heliocentric position and L1.2 theory for the moon’s offset.
Signature
Section titled “Signature”galilean_observe_de(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Io, 1=Europa, 2=Ganymede, 3=Callisto |
obs | observer | Observer location |
t | timestamptz | Observation time |
Example
Section titled “Example”-- All four Galilean moons with DE-precision JupiterSELECT 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_elevation(galilean_observe_de(moon_id, '40.0N 105.3W 1655m'::observer, now()))::numeric, 2) AS elFROM generate_series(0, 3) AS moon_id;saturn_moon_observe_de
Section titled “saturn_moon_observe_de”Computes the topocentric position of a Saturn moon. Uses DE for Saturn’s heliocentric position and TASS17 theory for the moon’s offset.
Signature
Section titled “Signature”saturn_moon_observe_de(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Mimas, 1=Enceladus, 2=Tethys, 3=Dione, 4=Rhea, 5=Titan, 6=Iapetus, 7=Hyperion |
obs | observer | Observer location |
t | timestamptz | Observation time |
uranus_moon_observe_de
Section titled “uranus_moon_observe_de”Computes the topocentric position of a Uranus moon. Uses DE for Uranus’s heliocentric position and GUST86 theory for the moon’s offset.
Signature
Section titled “Signature”uranus_moon_observe_de(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Miranda, 1=Ariel, 2=Umbriel, 3=Titania, 4=Oberon |
obs | observer | Observer location |
t | timestamptz | Observation time |
mars_moon_observe_de
Section titled “mars_moon_observe_de”Computes the topocentric position of a Mars moon. Uses DE for Mars’s heliocentric position and MarsSat theory for the moon’s offset.
Signature
Section titled “Signature”mars_moon_observe_de(moon_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Phobos, 1=Deimos |
obs | observer | Observer location |
t | timestamptz | Observation time |
planet_equatorial_de
Section titled “planet_equatorial_de”Computes the geocentric apparent equatorial coordinates (RA/Dec) of a planet using JPL DE ephemeris. Falls back to VSOP87 plus the equatorial conversion when DE is unavailable.
Signature
Section titled “Signature”planet_equatorial_de(body_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, excluding 0 and 3) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”-- Compare DE vs VSOP87 equatorial coordinates for MarsSELECT round(eq_ra(planet_equatorial(4, now()))::numeric, 6) AS ra_vsop87, round(eq_ra(planet_equatorial_de(4, now()))::numeric, 6) AS ra_de, round(eq_dec(planet_equatorial(4, now()))::numeric, 6) AS dec_vsop87, round(eq_dec(planet_equatorial_de(4, now()))::numeric, 6) AS dec_de;moon_equatorial_de
Section titled “moon_equatorial_de”Computes the geocentric apparent equatorial coordinates (RA/Dec) of the Moon using JPL DE ephemeris. Falls back to ELP2000-82B plus the equatorial conversion when DE is unavailable.
Signature
Section titled “Signature”moon_equatorial_de(t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”-- Moon RA/Dec via DESELECT round(eq_ra(e)::numeric, 4) AS ra_hours, round(eq_dec(e)::numeric, 4) AS dec_deg, round(eq_distance(e)::numeric, 0) AS dist_kmFROM moon_equatorial_de(now()) AS e;galilean_equatorial_de
Section titled “galilean_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Galilean moon using JPL DE ephemeris for Jupiter’s position. Falls back to VSOP87 for both Jupiter and Earth when DE is unavailable. Moon offsets always come from Lieske L1.2 theory.
Signature
Section titled “Signature”galilean_equatorial_de(moon_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Io, 1=Europa, 2=Ganymede, 3=Callisto |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”-- All 4 Galilean moons via DESELECT moon_id, round(eq_ra(galilean_equatorial_de(moon_id, now()))::numeric, 4) AS ra, round(eq_dec(galilean_equatorial_de(moon_id, now()))::numeric, 4) AS decFROM generate_series(0, 3) AS moon_id;saturn_moon_equatorial_de
Section titled “saturn_moon_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Saturn moon using JPL DE ephemeris for Saturn’s position. Falls back to VSOP87 when DE is unavailable. Moon offsets come from TASS 1.7 theory.
Signature
Section titled “Signature”saturn_moon_equatorial_de(moon_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Mimas, 1=Enceladus, 2=Tethys, 3=Dione, 4=Rhea, 5=Titan, 6=Iapetus, 7=Hyperion |
t | timestamptz | Evaluation time |
Example
Section titled “Example”-- Titan's position via DESELECT round(eq_ra(saturn_moon_equatorial_de(5, now()))::numeric, 4) AS ra, round(eq_dec(saturn_moon_equatorial_de(5, now()))::numeric, 4) AS dec;uranus_moon_equatorial_de
Section titled “uranus_moon_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Uranus moon using JPL DE ephemeris for Uranus’s position. Falls back to VSOP87 when DE is unavailable. Moon offsets come from GUST86 theory.
Signature
Section titled “Signature”uranus_moon_equatorial_de(moon_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Miranda, 1=Ariel, 2=Umbriel, 3=Titania, 4=Oberon |
t | timestamptz | Evaluation time |
Example
Section titled “Example”-- Titania's position via DESELECT round(eq_ra(uranus_moon_equatorial_de(3, now()))::numeric, 4) AS ra, round(eq_dec(uranus_moon_equatorial_de(3, now()))::numeric, 4) AS dec;mars_moon_equatorial_de
Section titled “mars_moon_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Mars moon using JPL DE ephemeris for Mars’s position. Falls back to VSOP87 when DE is unavailable. Moon offsets come from MarsSat analytical theory.
Signature
Section titled “Signature”mars_moon_equatorial_de(moon_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
moon_id | int4 | 0=Phobos, 1=Deimos |
t | timestamptz | Evaluation time |
Example
Section titled “Example”-- Both Mars moons via DESELECT moon_id, round(eq_ra(mars_moon_equatorial_de(moon_id, now()))::numeric, 4) AS ra, round(eq_dec(mars_moon_equatorial_de(moon_id, now()))::numeric, 4) AS decFROM generate_series(0, 1) AS moon_id;pg_orrery_ephemeris_info
Section titled “pg_orrery_ephemeris_info”Returns diagnostic information about the current ephemeris provider.
Signature
Section titled “Signature”pg_orrery_ephemeris_info() → RECORD(provider text, file_path text, start_jd float8, end_jd float8, version int4, au_km float8)Returns
Section titled “Returns”| Column | Type | Description |
|---|---|---|
provider | text | 'VSOP87' or 'JPL_DE' |
file_path | text | Path to the DE file (empty string if no DE) |
start_jd | float8 | First Julian Date covered by the DE file |
end_jd | float8 | Last Julian Date covered by the DE file |
version | int4 | DE version number (440, 441, etc.) |
au_km | float8 | Astronomical Unit in km from the DE header |
Example
Section titled “Example”-- Check current providerSELECT (pg_orrery_ephemeris_info()).provider;
-- Full diagnosticSELECT * FROM pg_orrery_ephemeris_info();lagrange_heliocentric_de
Section titled “lagrange_heliocentric_de”Computes the heliocentric ecliptic J2000 position of a Sun-planet Lagrange point using DE planet positions. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_heliocentric_de(body_id int4, point_id int4, t timestamptz) → heliocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”A heliocentric position in AU (ecliptic J2000 frame). Identical return type to lagrange_heliocentric().
Example
Section titled “Example”-- Compare DE vs VSOP87 for Sun-Earth L1SELECT round(helio_distance(lagrange_heliocentric(3, 1, now()))::numeric, 6) AS vsop87, round(helio_distance(lagrange_heliocentric_de(3, 1, now()))::numeric, 6) AS de;lagrange_observe_de
Section titled “lagrange_observe_de”Computes the topocentric position of a Sun-planet Lagrange point using DE planet positions. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_observe_de(body_id int4, point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”SELECT round(topo_elevation(lagrange_observe_de(3, 2, '40.0N 105.3W 1655m'::observer, now()))::numeric, 2) AS el;lagrange_equatorial_de
Section titled “lagrange_equatorial_de”Computes the geocentric apparent equatorial coordinates (RA/Dec) of a Sun-planet Lagrange point using DE planet positions. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_equatorial_de(body_id int4, point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”SELECT round(eq_ra(lagrange_equatorial_de(3, 2, now()))::numeric, 4) AS ra, round(eq_dec(lagrange_equatorial_de(3, 2, now()))::numeric, 4) AS dec;lagrange_distance_de
Section titled “lagrange_distance_de”Computes the distance in AU between a given heliocentric position and a Sun-planet Lagrange point, using DE planet positions. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_distance_de(body_id int4, point_id int4, pos heliocentric, t timestamptz) → float8Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
pos | heliocentric | Position to measure distance from |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”Distance in AU between the given position and the Lagrange point.
Example
Section titled “Example”SELECT round(lagrange_distance_de( 5, 4, lagrange_heliocentric_de(5, 4, now()), now())::numeric, 10) AS self_distance;lagrange_distance_oe_de
Section titled “lagrange_distance_oe_de”Computes the distance in AU between an object described by orbital elements and a Sun-planet Lagrange point, using DE planet positions. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_distance_oe_de(body_id int4, point_id int4, oe orbital_elements, t timestamptz) → float8Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
oe | orbital_elements | Orbital elements of the object |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”Distance in AU between the object and the Lagrange point.
Example
Section titled “Example”-- Trojan proximity with DE accuracySELECT round(lagrange_distance_oe_de(5, 4, oe, now())::numeric, 4) AS dist_auFROM mpc_asteroids WHERE name = '(588) Achilles';lunar_lagrange_observe_de
Section titled “lunar_lagrange_observe_de”Computes the topocentric position of an Earth-Moon Lagrange point using DE positions. Falls back to ELP2000-82B if DE is unavailable.
Signature
Section titled “Signature”lunar_lagrange_observe_de(point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”SELECT round(topo_elevation(lunar_lagrange_observe_de(1, '40.0N 105.3W 1655m'::observer, now()))::numeric, 2) AS el;lunar_lagrange_equatorial_de
Section titled “lunar_lagrange_equatorial_de”Computes the geocentric apparent equatorial coordinates (RA/Dec) of an Earth-Moon Lagrange point using DE positions. Falls back to ELP2000-82B if DE is unavailable.
Signature
Section titled “Signature”lunar_lagrange_equatorial_de(point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”SELECT round(eq_distance(lunar_lagrange_equatorial_de(1, now()))::numeric, 0) AS dist_km;galilean_lagrange_observe_de
Section titled “galilean_lagrange_observe_de”Computes the topocentric position of a Galilean moon Lagrange point. Uses DE for Jupiter’s heliocentric position and L1.2 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”galilean_lagrange_observe_de(body_id int4, point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Io, 1=Europa, 2=Ganymede, 3=Callisto |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
Example
Section titled “Example”SELECT round(topo_elevation(galilean_lagrange_observe_de(0, 4, '40.0N 105.3W 1655m'::observer, now()))::numeric, 2) AS el;galilean_lagrange_equatorial_de
Section titled “galilean_lagrange_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Galilean moon Lagrange point. Uses DE for Jupiter’s heliocentric position and L1.2 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”galilean_lagrange_equatorial_de(body_id int4, point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Io, 1=Europa, 2=Ganymede, 3=Callisto |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”SELECT round(eq_ra(galilean_lagrange_equatorial_de(0, 4, now()))::numeric, 4) AS ra;saturn_moon_lagrange_observe_de
Section titled “saturn_moon_lagrange_observe_de”Computes the topocentric position of a Saturn moon Lagrange point. Uses DE for Saturn’s heliocentric position and TASS17 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”saturn_moon_lagrange_observe_de(body_id int4, point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Mimas, 1=Enceladus, 2=Tethys, 3=Dione, 4=Rhea, 5=Titan, 6=Iapetus, 7=Hyperion |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
saturn_moon_lagrange_equatorial_de
Section titled “saturn_moon_lagrange_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Saturn moon Lagrange point. Uses DE for Saturn’s heliocentric position and TASS17 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”saturn_moon_lagrange_equatorial_de(body_id int4, point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Mimas, 1=Enceladus, 2=Tethys, 3=Dione, 4=Rhea, 5=Titan, 6=Iapetus, 7=Hyperion |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”SELECT round(eq_ra(saturn_moon_lagrange_equatorial_de(5, 1, now()))::numeric, 4) AS titan_l1_ra;uranus_moon_lagrange_observe_de
Section titled “uranus_moon_lagrange_observe_de”Computes the topocentric position of a Uranus moon Lagrange point. Uses DE for Uranus’s heliocentric position and GUST86 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”uranus_moon_lagrange_observe_de(body_id int4, point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Miranda, 1=Ariel, 2=Umbriel, 3=Titania, 4=Oberon |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
uranus_moon_lagrange_equatorial_de
Section titled “uranus_moon_lagrange_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Uranus moon Lagrange point. Uses DE for Uranus’s heliocentric position and GUST86 theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”uranus_moon_lagrange_equatorial_de(body_id int4, point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Miranda, 1=Ariel, 2=Umbriel, 3=Titania, 4=Oberon |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
mars_moon_lagrange_observe_de
Section titled “mars_moon_lagrange_observe_de”Computes the topocentric position of a Mars moon Lagrange point. Uses DE for Mars’s heliocentric position and MarsSat theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”mars_moon_lagrange_observe_de(body_id int4, point_id int4, obs observer, t timestamptz) → topocentricParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Phobos, 1=Deimos |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
obs | observer | Observer location on Earth |
t | timestamptz | Observation time |
Returns
Section titled “Returns”A topocentric with azimuth, elevation, range (km), and range rate (km/s).
mars_moon_lagrange_equatorial_de
Section titled “mars_moon_lagrange_equatorial_de”Computes the geocentric equatorial coordinates (RA/Dec) of a Mars moon Lagrange point. Uses DE for Mars’s heliocentric position and MarsSat theory for the moon’s offset. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”mars_moon_lagrange_equatorial_de(body_id int4, point_id int4, t timestamptz) → equatorialParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | 0=Phobos, 1=Deimos |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”An equatorial with RA (hours), Dec (degrees), and distance (km) from Earth’s center.
Example
Section titled “Example”SELECT round(eq_ra(mars_moon_lagrange_equatorial_de(0, 4, now()))::numeric, 4) AS phobos_l4_ra;hill_radius_de
Section titled “hill_radius_de”Computes the Hill sphere radius in AU for a planet using DE ephemeris for the instantaneous heliocentric distance. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”hill_radius_de(body_id int4, t timestamptz) → float8Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”Hill sphere radius in AU.
Example
Section titled “Example”SELECT round(hill_radius_de(5, now())::numeric, 4) AS jupiter_hill_de;lagrange_zone_radius_de
Section titled “lagrange_zone_radius_de”Computes the effective zone radius around a Lagrange point using DE ephemeris for the planet’s instantaneous heliocentric distance. Falls back to VSOP87 if DE is unavailable.
Signature
Section titled “Signature”lagrange_zone_radius_de(body_id int4, point_id int4, t timestamptz) → float8Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
body_id | int4 | Planet identifier (1-8, Mercury through Neptune) |
point_id | int4 | Lagrange point (1-5, L1 through L5) |
t | timestamptz | Evaluation time |
Returns
Section titled “Returns”Zone radius in AU.
Example
Section titled “Example”SELECT round(lagrange_zone_radius_de(5, 4, now())::numeric, 4) AS jup_l4_zone_de;