//astronomy/io.github.cosinekitty.astronomy/searchLunarApsis
fun searchLunarApsis(startTime: Time): ApsisInfo
Finds the date and time of the Moon's perigee or apogee.
Given a date and time to start the search in startTime, this function finds the next date and time that the center of the Moon reaches the closest or farthest point in its orbit with respect to the center of the Earth, whichever comes first after startTime.
The closest point is called perigee and the farthest point is called apogee. The word apsis refers to either event.
To iterate through consecutive alternating perigee and apogee events, call searchLunarApsis once, then use the return value to call nextLunarApsis. After that, keep feeding the previous return value from Astronomy.NextLunarApsis into another call of Astronomy.NextLunarApsis as many times as desired.
See lunarApsidesAfter for convenient iteration of consecutive lunar apsides.
startTime | The date and time at which to start searching for the next perigee or apogee. |