//astronomy/io.github.cosinekitty.astronomy/LocalSolarEclipseInfo
class LocalSolarEclipseInfo(kind: EclipseKind, obscuration: Double, partialBegin: EclipseEvent, totalBegin: EclipseEvent?, peak: EclipseEvent, totalEnd: EclipseEvent?, partialEnd: EclipseEvent)
Information about a solar eclipse as seen by an observer at a given time and geographic location.
Returned by searchLocalSolarEclipse or nextLocalSolarEclipse to report information about a solar eclipse as seen at a given geographic location.
When a solar eclipse is found, it is classified as partial, annular, or total. The kind field thus holds EclipseKind.Partial, EclipseKind.Annular, or EclipseKind.Total. A partial solar eclipse is when the Moon does not line up directly enough with the Sun to completely block the Sun's light from reaching the observer. An annular eclipse occurs when the Moon's disc is completely visible against the Sun but the Moon is too far away to completely block the Sun's light; this leaves the Sun with a ring-like appearance. A total eclipse occurs when the Moon is close enough to the Earth and aligned with the Sun just right to completely block all sunlight from reaching the observer.
The obscuration field reports what fraction of the Sun's disc appears blocked by the Moon when viewed by the observer at the peak eclipse time. This is a value that ranges from 0 (no blockage) to 1 (total eclipse). The obscuration value will be between 0 and 1 for partial eclipses and annular eclipses. The value will be exactly 1 for total eclipses. Obscuration gives an indication of how dark the eclipse appears.
There are 5 "event" fields, each of which contains a time and a solar altitude. Field peak holds the date and time of the center of the eclipse, when it is at its peak. The fields partialBegin and partialEnd are always set, and indicate when the eclipse begins/ends. If the eclipse reaches totality or becomes annular, totalBegin and totalEnd indicate when the total/annular phase begins/ends. When an event field is valid, the caller must also check its altitude field to see whether the Sun is above the horizon at the time indicated by the time field.
LocalSolarEclipseInfo fun LocalSolarEclipseInfo(kind: EclipseKind, obscuration: Double, partialBegin: EclipseEvent, totalBegin: EclipseEvent?, peak: EclipseEvent, totalEnd: EclipseEvent?, partialEnd: EclipseEvent) |
Name | Summary |
---|---|
kind val kind: EclipseKind The type of solar eclipse: EclipseKind.Partial, EclipseKind.Annular, or EclipseKind.Total. |
|
obscuration val obscuration: Double The fraction of the Sun's apparent disc area obscured by the Moon at the eclipse peak. |
|
partialBegin val partialBegin: EclipseEvent The time and Sun altitude at the beginning of the eclipse. |
|
partialEnd val partialEnd: EclipseEvent The time and Sun altitude at the end of the eclipse. |
|
peak val peak: EclipseEvent The time and Sun altitude when the eclipse reaches its peak. |
|
totalBegin val totalBegin: EclipseEvent? If this is an annular or a total eclipse, the time and Sun altitude when annular/total phase begins; otherwise null. |
|
totalEnd val totalEnd: EclipseEvent? If this is an annular or a total eclipse, the time and Sun altitude when annular/total phase ends; otherwise null. |