diff --git a/kosmorrolib/enum.py b/kosmorrolib/enum.py index e9420cd..9bf4e0d 100644 --- a/kosmorrolib/enum.py +++ b/kosmorrolib/enum.py @@ -25,7 +25,7 @@ class EventType(Enum): MAXIMAL_ELONGATION = 4 MOON_PERIGEE = 5 MOON_APOGEE = 6 - + EARTH_SEASON_CHANGE = 7 class ObjectType(Enum): """An enumeration of object types""" diff --git a/kosmorrolib/events.py b/kosmorrolib/events.py index 20d5d03..2506dae 100644 --- a/kosmorrolib/events.py +++ b/kosmorrolib/events.py @@ -245,6 +245,13 @@ def _search_moon_perigee(start_time: Time, end_time: Time, timezone: int) -> [Ev return events +def _earth_change_season(start_time: Time, end_time: Time, timezone: int): + event = [] + t, y = almanac.find_discrete(start_time,end_time,almanac.seasons(eph)) + for yi, ti in zip(y,t): + event.appendn(EventType.EARTH_SEASON_CHANGE,almanac.SEASON_EVENT[yi],ti.utc_iso(' ')) + return event + def get_events(for_date: date = date.today(), timezone: int = 0) -> [Event]: """Calculate and return a list of events for the given date, adjusted to the given timezone if any.