HP Forums

Full Version: Predicting Rise and Set of the Moon with the HP Prime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This HP PPL Prime program predicts the rise and set times of the moon for
a user-defined initial calendar date and geographic location. The user
can also specify the search duration in days.

The observer's coordinates should be "hard-wired" in the code using the
following "example" source code. Please note 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_deg := 28.0;
obslat_min := 23.0;
obslat_sec := 46.0;
.
.
.
// geographic longitude of the observer
// (0 <= degrees <= 360, 0 <= minutes <= 60, 0 <= seconds <= 60)
// (east longitude is positive, west longitude is negative)

obslong_deg := -80;
obslong_min := 35;
obslong_sec := 54;
.
.
.
// altitude of the observer (kilometers)
// (positive above sea level, negative below sea level)

obsalt := 16.0 / 1000.0;

The program will calculate and display the UTC time and topocentric
(azimuth and elevation) coordinates of the moon at rise, maximum
elevation and set.
Reference URL's