mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-21 05:50:29 -05:00
Added the following iterator functions that wrap
search/next pairs of functions:
globalSolarEclipsesAfter
localSolarEclipsesAfter
lunarApsidesAfter
lunarEclipsesAfter
moonNodesAfter
moonQuartersAfter
planetApsidesAfter
transitsAfter
I updated the following Kotlin demos:
MoonPhase.kt ==> moonQuartersAfter
LunarEclipse.kt ==> lunarEclipsesAfter
However, I have not yet figured out how to use these
functions in the corresponding Java demos.
1.1 KiB
1.1 KiB
//astronomy/io.github.cosinekitty.astronomy/nextPlanetApsis
nextPlanetApsis
fun nextPlanetApsis(body: Body, apsis: ApsisInfo): ApsisInfo
Finds the next planetary perihelion or aphelion event in a series.
This function requires an ApsisInfo value obtained from a call to searchPlanetApsis or nextPlanetApsis. Given an aphelion event, this function finds the next perihelion event, and vice versa.
See searchPlanetApsis for more details. See planetApsidesAfter for convenient iteration of consecutive apsides.
Parameters
| body | The planet for which to find the next perihelion/aphelion event. Not allowed to be Body.Sun or Body.Moon. Must match the body passed into the call that produced the apsis parameter. |
| apsis | An apsis event obtained from a call to searchPlanetApsis or nextPlanetApsis. |