The test_Planets_RiseSet.m computes planetary positions using JPL_Eph_DE440.m. To compute the rising and setting times of a planet we first determine its geocentric equatorial coordinates (α and δ) for an arbitrary time on the given day. Then, from the declination and the geographical latitude, test_Planrise.m determines whether the planet is continuously above or below the horizon.
Year, month, day, lambda (Geographic east longitude of the observer in [deg]), phi (Geographic latitude of the observer in [deg]), and zone (local time - universal time in [hour]) are received, then rising and setting times of major planets, the Sun, and the Moon are computed.
east longitude and latitude of the observer can be found in:
local time - universal time is available here (daylight saving time is considered):
Montenbruck O., and Pfleger T., "Astronomy on the Personal Computer," Springer Verlag, Heidelberg, 4th edition, 2000.