Files
astronomy/source/kotlin/doc/search-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

1006 B

//astronomy/io.github.cosinekitty.astronomy/searchTransit

searchTransit

fun searchTransit(body: Body, startTime: Time): TransitInfo

Searches for the first transit of Mercury or Venus after a given date.

Finds the first transit of Mercury or Venus after a specified date. A transit is when an inferior planet passes between the Sun and the Earth so that the silhouette of the planet is visible against the Sun in the background. To continue the search, pass the finish time in the returned object to nextTransit.

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.
startTime The date and time for starting the search for a transit.