Predicting Rise and Set of the Moon 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 Rise and Set of the Moon with the HP Prime (/thread-18749.html) |
Predicting Rise and Set of the Moon with the HP Prime - cdeaglejr - 09-02-2022 04:26 PM 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. |