HP Forums
Predicting Solar Eclipses with the HP Prime - 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: Predicting Solar Eclipses with the HP Prime (/thread-18822.html)



Predicting Solar Eclipses with the HP Prime - cdeaglejr - 09-15-2022 09:39 AM

This HP Prime program can be used to predict the local circumstances of solar eclipses.

The solar_eclipse software provides the universal times and topocentric coordinates of the Sun and Moon at the beginning and end of the penumbra phases, and the time and coordinates at maximum eclipse. It will also report the total eclipse duration.

The program will interactively request an initial calendar date at which to start the eclipse search along with a search duration in days.

The user's geographic coordinates should be provided in the following section of the main program source code starting at line 153. Please note the valid range of inputs and the sign conventions.

//////////////////////////
// observer coordinates
//////////////////////////

// geographic latitude of the observer
// (-90 <= degrees <= +90, 0 <= minutes <= 60, 0 <= seconds <= 60)
// (north latitude is positive, south latitude is negative)

obslat := dtr * (39.0 + 40.0 / 60.0 + 36 / 3600.0);

// geographic longitude of the observer
// (0 <= degrees <= 360, 0 <= minutes <= 60, 0 <= seconds <= 60)
// (east longitude is positive, west longitude is negative)

obslong := -dtr * (104.0 + 57.0 / 60.0 + 12.0 / 3600.0);

// altitude of the observer (meters)
// (positive above sea level, negative below sea level)

obsalt := 1644.0;

A PDF document describing the geometry and numerical method used to solve this classic astronomy problem is included in the attached zip archive.