HP Forums

Full Version: An ephemeris for the inner planets
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Reference URL's