HP Forums
An ephemeris for the inner planets - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: HP Prime Software Library (/forum-15.html)
+--- Thread: An ephemeris for the inner planets (/thread-18875.html)



An ephemeris for the inner planets - cdeaglejr - 09-25-2022 09:47 AM

Updated October 16, 2022

This HP Prime program can be used to calculate an ephemeris of the inner planets. The code is based on "Planetary Programs and Tables from -4000 to +2800" written by Pierre Bretagnon and Jean-Louis Simon.

For a user specified UTC calendar date, the software provides the "true-of-date" geocentric and heliocentric position vectors of each planet. It also includes the geocentric right ascension and declination of each planet.

The main subroutine is called ephem with inputs of the body number (ibody) and the TDB Julian day (jed).

ephem(ibody, jed)

// sun and inner planet ephemeris

// input

// ibody = celestial body index
// (1 = mercury, 2 = venus, 3 = sun, 4 = mars)
// jed = ephemeris time julian day

// output

// rpg = geocentric position vector (au)
// rph = heliocentric position vector (au)
// rasc = geocentric right ascension (radians)
// decl = geocentric declination (radians)

// Celestial Computing with the HP Prime