Files
astronomy/source/kotlin/doc/next-transit.md
Don Cross 5676049596 Kotlin: added iterator helper functions
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.
2022-05-06 21:52:27 -04:00

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.