mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-01-13 10:00:17 -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.
866 B
866 B
//astronomy/io.github.cosinekitty.astronomy/nextTransit
nextTransit
fun nextTransit(body: Body, prevTransitTime: Time): TransitInfo
Searches for another transit of Mercury or Venus.
After calling searchTransit to find a transit of Mercury or Venus, this function finds the next transit after that. Keep calling this function as many times as you want to keep finding more transits.
See transitsAfter for convenient iteration of consecutive transits.
Parameters
| body | The planet whose transit is to be found. Must be Body.Mercury or Body.Venus. |
| prevTransitTime | A date and time near the previous transit. |