twilights function
Dawns and dusks of twilight for a place at latitude and
longitude in startJdTT … endJdTT: moments when the centre of the
Sun is at Twilight.altitude. Dawn is a HorizonEventKind.rise, dusk
a HorizonEventKind.set; transits of the Sun are left out.
Implementation
List<HorizonEvent> twilights(
Ephemeris ephemeris,
Twilight twilight,
double latitude,
double longitude,
double startJdTT,
double endJdTT,
) => [
for (final e in horizonEvents(
ephemeris,
Naif.sun,
latitude,
longitude,
startJdTT,
endJdTT,
horizonAltitude: twilight.altitude,
))
if (e.kind == HorizonEventKind.rise || e.kind == HorizonEventKind.set) e,
];