A library that computes the ephemerides.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

86 lines
1.9 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 = 0
  21. WAXING_CRESCENT = 1
  22. FIRST_QUARTER = 2
  23. WAXING_GIBBOUS = 3
  24. FULL_MOON = 4
  25. WANING_GIBBOUS = 5
  26. LAST_QUARTER = 6
  27. WANING_CRESCENT = 7
  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. PERIGEE = 5
  40. APOGEE = 6
  41. SEASON_CHANGE = 7
  42. LUNAR_ECLIPSE = 8
  43. class LunarEclipseType(Enum):
  44. """An enumeration of lunar eclipse types"""
  45. PENUMBRAL = 0
  46. PARTIAL = 1
  47. TOTAL = 2
  48. class ObjectType(Enum):
  49. """An enumeration of object types"""
  50. STAR = 0
  51. PLANET = 1
  52. DWARF_PLANET = 11
  53. SATELLITE = 2
  54. class ObjectIdentifier(Enum):
  55. """An enumeration of identifiers for objects"""
  56. SUN = 0
  57. EARTH = 1
  58. MOON = 11
  59. MERCURY = 2
  60. VENUS = 3
  61. MARS = 4
  62. JUPITER = 5
  63. SATURN = 6
  64. URANUS = 7
  65. NEPTUNE = 8
  66. PLUTO = 9