A library that computes the ephemerides.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

77 lines
1.8 KiB

  1. #!/usr/bin/env python3
  2. # Kosmorrolib - The Library To Compute Your Ephemerides
  3. # Copyright (C) 2021 Jérôme Deuchnord <jerome@deuchnord.fr>
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU Affero General Public License as
  7. # published by the Free Software Foundation, either version 3 of the
  8. # License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU Affero General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License
  16. # along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. from enum import Enum
  18. class MoonPhaseType(Enum):
  19. """An enumeration of moon phases."""
  20. NEW_MOON = 1
  21. WAXING_CRESCENT = 2
  22. FIRST_QUARTER = 3
  23. WAXING_GIBBOUS = 4
  24. FULL_MOON = 5
  25. WANING_GIBBOUS = 6
  26. LAST_QUARTER = 7
  27. WANING_CRESCENT = 8
  28. class SeasonType(Enum):
  29. MARCH_EQUINOX = 0
  30. JUNE_SOLSTICE = 1
  31. SEPTEMBER_EQUINOX = 2
  32. DECEMBER_SOLSTICE = 3
  33. class EventType(Enum):
  34. """An enumeration for the supported event types."""
  35. OPPOSITION = 1
  36. CONJUNCTION = 2
  37. OCCULTATION = 3
  38. MAXIMAL_ELONGATION = 4
  39. MOON_PERIGEE = 5
  40. MOON_APOGEE = 6
  41. SEASON_CHANGE = 7
  42. class ObjectType(Enum):
  43. """An enumeration of object types"""
  44. STAR = 0
  45. PLANET = 1
  46. DWARF_PLANET = 11
  47. SATELLITE = 2
  48. class ObjectIdentifier(Enum):
  49. """An enumeration of identifiers for objects"""
  50. SUN = 0
  51. EARTH = 1
  52. MOON = 11
  53. MERCURY = 2
  54. VENUS = 3
  55. MARS = 4
  56. JUPITER = 5
  57. SATURN = 6
  58. URANUS = 7
  59. NEPTUNE = 8
  60. PLUTO = 9