Files
astronomy/source/kotlin/doc/next-local-solar-eclipse.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

1.2 KiB

//astronomy/io.github.cosinekitty.astronomy/nextLocalSolarEclipse

nextLocalSolarEclipse

fun nextLocalSolarEclipse(prevEclipseTime: Time, observer: Observer): LocalSolarEclipseInfo

Searches for the next local solar eclipse in a series.

After using searchLocalSolarEclipse to find the first solar eclipse in a series, you can call this function to find the next consecutive solar eclipse. Pass in the peak value from the LocalSolarEclipseInfo returned by the previous call to searchLocalSolarEclipse or nextLocalSolarEclipse to find the next solar eclipse.

See localSolarEclipsesAfter for convenient iteration of consecutive eclipses.

Return

Information about the next solar eclipse visible at the specified observer location.

Parameters

prevEclipseTime A date and time near a new moon. Solar eclipse search will start at the next new moon.
observer The geographic location of the observer.