astronoby 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/CHANGELOG.md +235 -0
  4. data/README.md +19 -1
  5. data/UPGRADING.md +270 -0
  6. data/docs/README.md +105 -16
  7. data/docs/altitude_crossings.md +92 -0
  8. data/docs/angles.md +1 -0
  9. data/docs/configuration.md +28 -17
  10. data/docs/coordinates.md +72 -12
  11. data/docs/deep_sky_bodies.md +46 -1
  12. data/docs/ephem.md +5 -2
  13. data/docs/equinoxes_solstices_times.md +4 -3
  14. data/docs/glossary.md +99 -1
  15. data/docs/iers.md +40 -0
  16. data/docs/instant.md +33 -21
  17. data/docs/lunar_eclipses.md +208 -0
  18. data/docs/lunar_observation.md +87 -0
  19. data/docs/moon_phases.md +4 -1
  20. data/docs/observer.md +20 -6
  21. data/docs/planetary_phenomena.md +78 -0
  22. data/docs/reference_frames.md +192 -34
  23. data/docs/rise_transit_set_times.md +6 -4
  24. data/docs/solar_system_bodies.md +26 -4
  25. data/docs/twilight_times.md +43 -24
  26. data/lib/astronoby/angle.rb +63 -2
  27. data/lib/astronoby/angles/dms.rb +18 -1
  28. data/lib/astronoby/angles/hms.rb +14 -1
  29. data/lib/astronoby/angular_velocity.rb +21 -0
  30. data/lib/astronoby/bodies/deep_sky_object.rb +6 -1
  31. data/lib/astronoby/bodies/deep_sky_object_position.rb +35 -38
  32. data/lib/astronoby/bodies/earth.rb +7 -44
  33. data/lib/astronoby/bodies/jupiter.rb +10 -0
  34. data/lib/astronoby/bodies/mars.rb +10 -0
  35. data/lib/astronoby/bodies/mercury.rb +10 -0
  36. data/lib/astronoby/bodies/moon.rb +158 -32
  37. data/lib/astronoby/bodies/neptune.rb +10 -0
  38. data/lib/astronoby/bodies/saturn.rb +10 -0
  39. data/lib/astronoby/bodies/solar_system_body.rb +240 -61
  40. data/lib/astronoby/bodies/sun.rb +79 -4
  41. data/lib/astronoby/bodies/uranus.rb +10 -0
  42. data/lib/astronoby/bodies/venus.rb +10 -0
  43. data/lib/astronoby/body.rb +6 -0
  44. data/lib/astronoby/cache.rb +13 -0
  45. data/lib/astronoby/center.rb +84 -0
  46. data/lib/astronoby/constants.rb +1 -2
  47. data/lib/astronoby/constellation.rb +9 -1
  48. data/lib/astronoby/constellations/data.rb +1 -1
  49. data/lib/astronoby/coordinates/ecliptic.rb +10 -1
  50. data/lib/astronoby/coordinates/equatorial.rb +79 -13
  51. data/lib/astronoby/coordinates/geodetic.rb +102 -0
  52. data/lib/astronoby/coordinates/horizontal.rb +13 -1
  53. data/lib/astronoby/delta_t.rb +44 -0
  54. data/lib/astronoby/distance.rb +35 -0
  55. data/lib/astronoby/duration.rb +116 -0
  56. data/lib/astronoby/earth_rotation.rb +70 -0
  57. data/lib/astronoby/equinox_solstice.rb +31 -8
  58. data/lib/astronoby/errors.rb +11 -0
  59. data/lib/astronoby/events/altitude_crossing.rb +29 -0
  60. data/lib/astronoby/events/altitude_crossing_calculator.rb +511 -0
  61. data/lib/astronoby/events/altitude_extreme.rb +31 -0
  62. data/lib/astronoby/events/conjunction.rb +51 -0
  63. data/lib/astronoby/events/conjunction_opposition_calculator.rb +84 -0
  64. data/lib/astronoby/events/extremum_calculator.rb +23 -176
  65. data/lib/astronoby/events/greatest_elongation.rb +58 -0
  66. data/lib/astronoby/events/greatest_elongation_calculator.rb +56 -0
  67. data/lib/astronoby/events/lunar_eclipse.rb +111 -0
  68. data/lib/astronoby/events/lunar_eclipse_calculator.rb +397 -0
  69. data/lib/astronoby/events/lunar_eclipse_geometry.rb +115 -0
  70. data/lib/astronoby/events/lunar_eclipse_phase.rb +45 -0
  71. data/lib/astronoby/events/lunar_eclipse_visibility.rb +296 -0
  72. data/lib/astronoby/events/opposition.rb +19 -0
  73. data/lib/astronoby/events/rise_transit_set_calculator.rb +9 -13
  74. data/lib/astronoby/events/rise_transit_set_event.rb +12 -1
  75. data/lib/astronoby/events/rise_transit_set_events.rb +12 -1
  76. data/lib/astronoby/events/twilight_calculator.rb +37 -147
  77. data/lib/astronoby/events/twilight_event.rb +24 -6
  78. data/lib/astronoby/events/twilight_events.rb +26 -6
  79. data/lib/astronoby/extremum_finder.rb +148 -0
  80. data/lib/astronoby/horizon.rb +40 -0
  81. data/lib/astronoby/horizontal_transformation.rb +112 -0
  82. data/lib/astronoby/instant.rb +56 -16
  83. data/lib/astronoby/libration.rb +25 -0
  84. data/lib/astronoby/mean_obliquity.rb +8 -0
  85. data/lib/astronoby/moon_orientation_ephemeris.rb +69 -0
  86. data/lib/astronoby/moon_physical_ephemeris.rb +263 -0
  87. data/lib/astronoby/nutation.rb +10 -20
  88. data/lib/astronoby/observer.rb +67 -49
  89. data/lib/astronoby/orientation.rb +107 -0
  90. data/lib/astronoby/position.rb +16 -0
  91. data/lib/astronoby/precession.rb +62 -61
  92. data/lib/astronoby/reference_frame.rb +80 -9
  93. data/lib/astronoby/reference_frames/apparent.rb +43 -12
  94. data/lib/astronoby/reference_frames/astrometric.rb +14 -1
  95. data/lib/astronoby/reference_frames/geometric.rb +7 -1
  96. data/lib/astronoby/reference_frames/mean_of_date.rb +19 -1
  97. data/lib/astronoby/reference_frames/teme.rb +159 -0
  98. data/lib/astronoby/reference_frames/topocentric.rb +36 -4
  99. data/lib/astronoby/refraction.rb +26 -5
  100. data/lib/astronoby/root_finder.rb +90 -0
  101. data/lib/astronoby/rotation.rb +49 -0
  102. data/lib/astronoby/time/greenwich_apparent_sidereal_time.rb +19 -8
  103. data/lib/astronoby/time/greenwich_mean_sidereal_time.rb +44 -5
  104. data/lib/astronoby/time/greenwich_sidereal_time.rb +21 -0
  105. data/lib/astronoby/time/local_apparent_sidereal_time.rb +21 -0
  106. data/lib/astronoby/time/local_mean_sidereal_time.rb +21 -0
  107. data/lib/astronoby/time/local_sidereal_time.rb +24 -0
  108. data/lib/astronoby/time/sidereal_time.rb +23 -1
  109. data/lib/astronoby/true_obliquity.rb +4 -0
  110. data/lib/astronoby/util/maths.rb +8 -0
  111. data/lib/astronoby/util/time.rb +0 -497
  112. data/lib/astronoby/vector.rb +10 -0
  113. data/lib/astronoby/velocity.rb +39 -0
  114. data/lib/astronoby/version.rb +1 -1
  115. data/lib/astronoby.rb +30 -0
  116. metadata +80 -5
@@ -1,7 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents the Earth. Provides ephemeris segments for computing Earth's
5
+ # geometric position.
4
6
  class Earth < SolarSystemBody
7
+ ORBITAL_PERIOD = 365.256
8
+
9
+ # @param ephem_source [Symbol] the ephemeris source type
10
+ # @return [Array<Array>] ephemeris segment identifiers
5
11
  def self.ephemeris_segments(ephem_source)
6
12
  if ephem_source == ::Ephem::SPK::JPL_DE
7
13
  [
@@ -15,52 +21,9 @@ module Astronoby
15
21
  end
16
22
  end
17
23
 
24
+ # @return [nil] Earth has no phase angle as seen from itself
18
25
  def phase_angle
19
26
  nil
20
27
  end
21
-
22
- private
23
-
24
- # Attributes that require Sun data like phase angle or magnitude are not
25
- # applicable for Earth.
26
- def requires_sun_data?
27
- true
28
- end
29
-
30
- def compute_astrometric(_ephem)
31
- Astrometric.new(
32
- position: Vector[
33
- Distance.zero,
34
- Distance.zero,
35
- Distance.zero
36
- ],
37
- velocity: Vector[
38
- Velocity.zero,
39
- Velocity.zero,
40
- Velocity.zero
41
- ],
42
- instant: @instant,
43
- center_identifier: EARTH,
44
- target_body: self.class
45
- )
46
- end
47
-
48
- def compute_mean_of_date(_ephem)
49
- MeanOfDate.new(
50
- position: Vector[
51
- Distance.zero,
52
- Distance.zero,
53
- Distance.zero
54
- ],
55
- velocity: Vector[
56
- Velocity.zero,
57
- Velocity.zero,
58
- Velocity.zero
59
- ],
60
- instant: @instant,
61
- center_identifier: EARTH,
62
- target_body: self.class
63
- )
64
- end
65
28
  end
66
29
  end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents Jupiter.
4
5
  class Jupiter < SolarSystemBody
5
6
  EQUATORIAL_RADIUS = Distance.from_meters(71_492_000)
6
7
  ABSOLUTE_MAGNITUDE = -9.395
8
+ ORBITAL_PERIOD = 4332.59
7
9
 
10
+ # @return [Boolean] true; Jupiter is a superior planet
11
+ def self.superior_planet?
12
+ true
13
+ end
14
+
15
+ # @param _ephem_source [Symbol] the ephemeris source type
16
+ # @return [Array<Array>] ephemeris segment identifiers
8
17
  def self.ephemeris_segments(_ephem_source)
9
18
  [[SOLAR_SYSTEM_BARYCENTER, JUPITER_BARYCENTER]]
10
19
  end
11
20
 
21
+ # @return [Float] absolute magnitude
12
22
  def self.absolute_magnitude
13
23
  ABSOLUTE_MAGNITUDE
14
24
  end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents Mars.
4
5
  class Mars < SolarSystemBody
5
6
  EQUATORIAL_RADIUS = Distance.from_meters(3_396_200)
6
7
  ABSOLUTE_MAGNITUDE = -1.601
8
+ ORBITAL_PERIOD = 686.98
7
9
 
10
+ # @return [Boolean] true; Mars is a superior planet
11
+ def self.superior_planet?
12
+ true
13
+ end
14
+
15
+ # @param _ephem_source [Symbol] the ephemeris source type
16
+ # @return [Array<Array>] ephemeris segment identifiers
8
17
  def self.ephemeris_segments(_ephem_source)
9
18
  [[SOLAR_SYSTEM_BARYCENTER, MARS_BARYCENTER]]
10
19
  end
11
20
 
21
+ # @return [Float] absolute magnitude
12
22
  def self.absolute_magnitude
13
23
  ABSOLUTE_MAGNITUDE
14
24
  end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents Mercury.
4
5
  class Mercury < SolarSystemBody
5
6
  EQUATORIAL_RADIUS = Distance.from_meters(2_439_700)
6
7
  ABSOLUTE_MAGNITUDE = -0.613
8
+ ORBITAL_PERIOD = 87.969
7
9
 
10
+ # @return [Boolean] true; Mercury is an inferior planet
11
+ def self.inferior_planet?
12
+ true
13
+ end
14
+
15
+ # @param _ephem_source [Symbol] the ephemeris source type
16
+ # @return [Array<Array>] ephemeris segment identifiers
8
17
  def self.ephemeris_segments(_ephem_source)
9
18
  [[SOLAR_SYSTEM_BARYCENTER, MERCURY_BARYCENTER]]
10
19
  end
11
20
 
21
+ # @return [Float] absolute magnitude
12
22
  def self.absolute_magnitude
13
23
  ABSOLUTE_MAGNITUDE
14
24
  end
@@ -1,11 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents the Moon. Provides phase events, apoapsis/periapsis events,
5
+ # and phase fraction.
4
6
  class Moon < SolarSystemBody
5
7
  SEMIDIAMETER_VARIATION = 0.7275
6
8
  EQUATORIAL_RADIUS = Distance.from_meters(1_737_400)
7
9
  ABSOLUTE_MAGNITUDE = 0.28
10
+ ORBITAL_PERIOD = 27.504339
8
11
 
12
+ # @param ephem_source [Symbol] the ephemeris source type
13
+ # @return [Array<Array>] ephemeris segment identifiers
9
14
  def self.ephemeris_segments(ephem_source)
10
15
  if ephem_source == ::Ephem::SPK::JPL_DE
11
16
  [
@@ -33,38 +38,155 @@ module Astronoby
33
38
  Events::MoonPhases.phases_for(year: year, month: month)
34
39
  end
35
40
 
41
+ # @return [Float] absolute magnitude
36
42
  def self.absolute_magnitude
37
43
  ABSOLUTE_MAGNITUDE
38
44
  end
39
45
 
46
+ # Finds all apoapsis events between two times
47
+ # @param ephem [::Ephem::SPK] Ephemeris data source
48
+ # @param start_time [Time] Start time
49
+ # @param end_time [Time] End time
50
+ # @return [Array<Astronoby::ExtremumEvent>] Array of apoapsis events
51
+ def self.apoapsis_events(
52
+ ephem:,
53
+ start_time:,
54
+ end_time:,
55
+ samples_per_period: 60
56
+ )
57
+ ExtremumCalculator.new(
58
+ body: self,
59
+ primary_body: Earth,
60
+ ephem: ephem,
61
+ samples_per_period: samples_per_period
62
+ ).apoapsis_events_between(start_time, end_time)
63
+ end
64
+
65
+ # Finds all periapsis events between two times
66
+ # @param ephem [::Ephem::SPK] Ephemeris data source
67
+ # @param start_time [Time] Start time
68
+ # @param end_time [Time] End time
69
+ # @return [Array<Astronoby::ExtremumEvent>] Array of periapsis events
70
+ def self.periapsis_events(
71
+ ephem:,
72
+ start_time:,
73
+ end_time:,
74
+ samples_per_period: 60
75
+ )
76
+ ExtremumCalculator.new(
77
+ body: self,
78
+ primary_body: Earth,
79
+ ephem: ephem,
80
+ samples_per_period: samples_per_period
81
+ ).periapsis_events_between(start_time, end_time)
82
+ end
83
+
84
+ # Finds all lunar eclipses whose greatest instant falls between two times
85
+ # @param ephem [::Ephem::SPK] Ephemeris data source
86
+ # @param start_time [Time] Start time
87
+ # @param end_time [Time] End time
88
+ # @return [Array<Astronoby::LunarEclipse>] Lunar eclipses in the range
89
+ def self.eclipse_events(ephem:, start_time:, end_time:)
90
+ LunarEclipseCalculator
91
+ .new(ephem: ephem)
92
+ .events_between(start_time, end_time)
93
+ end
94
+
40
95
  # @return [Float] Phase fraction, from 0 to 1
41
96
  def current_phase_fraction
42
97
  mean_elongation.degrees / Constants::DEGREES_PER_CIRCLE
43
98
  end
44
99
 
45
- # @return [Boolean] True if the body is approaching the primary
46
- # body (Earth), false otherwise.
47
- def approaching_primary?
48
- relative_position =
49
- (geometric.position - @earth_geometric.position).map(&:m)
50
- relative_velocity =
51
- (geometric.velocity - @earth_geometric.velocity).map(&:mps)
52
- radial_velocity_component = Astronoby::Util::Maths
53
- .dot_product(relative_position, relative_velocity)
54
- distance = Math.sqrt(
55
- Astronoby::Util::Maths.dot_product(relative_position, relative_position)
56
- )
57
- radial_velocity_component / distance < 0
100
+ # Total geocentric libration of the Moon, in longitude and latitude.
101
+ #
102
+ # With an orientation kernel (see +orientation:+ on the constructor), this
103
+ # is the sub-Earth point from the integrated DE orientation, accurate to
104
+ # better than an arcsecond. Without one, it is the analytic optical plus
105
+ # physical libration (Meeus, Astronomical Algorithms, 2nd ed., chapter 53).
106
+ #
107
+ # @return [Astronoby::Libration] Libration in longitude and latitude
108
+ def libration
109
+ lunar_ephemeris.libration
110
+ end
111
+
112
+ # Position angle of the Moon's axis of rotation, measured eastward from the
113
+ # north point of the disk.
114
+ #
115
+ # With an orientation kernel this comes from the integrated DE orientation;
116
+ # without one, from the analytic series (Meeus, Astronomical Algorithms,
117
+ # 2nd ed., chapter 53).
118
+ #
119
+ # @return [Astronoby::Angle] Position angle of the axis
120
+ def position_angle_of_axis
121
+ lunar_ephemeris.position_angle_of_axis
58
122
  end
59
123
 
60
- # @return [Boolean] True if the body is receding from the primary
61
- # body (Earth), false otherwise.
62
- def receding_from_primary?
63
- !approaching_primary?
124
+ # Position angle of the Moon's bright limb: the position angle of the
125
+ # midpoint of the illuminated limb, measured eastward from the north point
126
+ # of the disk. Geocentric, from the apparent equatorial coordinates of the
127
+ # Moon and the Sun.
128
+ #
129
+ # Source:
130
+ # Title: Astronomical Algorithms
131
+ # Author: Jean Meeus
132
+ # Edition: 2nd edition
133
+ # Chapter: 48 - Illuminated Fraction of the Moon's Disk
134
+ # @return [Astronoby::Angle, nil] Position angle of the bright limb, between
135
+ # 0 and 360 degrees
136
+ def bright_limb_position_angle
137
+ return unless sun
138
+
139
+ @bright_limb_position_angle ||= begin
140
+ angle = apparent.equatorial.position_angle_to(sun.apparent.equatorial)
141
+ Angle.from_degrees(angle.degrees % Constants::DEGREES_PER_CIRCLE)
142
+ end
143
+ end
144
+
145
+ # Parallactic angle of the Moon for a given observer: the angle at the Moon
146
+ # between the direction of the north celestial pole and the direction of
147
+ # the observer's zenith. Computed from the topocentric place, where lunar
148
+ # parallax is significant.
149
+ #
150
+ # Source:
151
+ # Title: Astronomical Algorithms
152
+ # Author: Jean Meeus
153
+ # Edition: 2nd edition
154
+ # Chapter: 14 - The Parallactic Angle
155
+ # @param observer [Astronoby::Observer] Observer for whom to compute the
156
+ # parallactic angle
157
+ # @return [Astronoby::Angle] Parallactic angle
158
+ def parallactic_angle(observer:)
159
+ equatorial = observed_by(observer).equatorial
160
+ declination = equatorial.declination
161
+ hour_angle = equatorial.compute_hour_angle(
162
+ time: @instant.to_time,
163
+ longitude: observer.longitude
164
+ )
165
+
166
+ Angle.from_radians(
167
+ Math.atan2(
168
+ hour_angle.sin,
169
+ observer.latitude.tan * declination.cos -
170
+ declination.sin * hour_angle.cos
171
+ )
172
+ )
64
173
  end
65
174
 
66
175
  private
67
176
 
177
+ def lunar_ephemeris
178
+ @lunar_ephemeris ||=
179
+ if orientation
180
+ MoonOrientationEphemeris.new(self)
181
+ else
182
+ MoonPhysicalEphemeris.new(self)
183
+ end
184
+ end
185
+
186
+ def primary_body_geometric
187
+ earth_geometric
188
+ end
189
+
68
190
  # Source:
69
191
  # Title: Astronomical Algorithms
70
192
  # Author: Jean Meeus
@@ -86,29 +208,33 @@ module Astronoby
86
208
  (@instant.tt - JulianDate::DEFAULT_EPOCH) / Constants::DAYS_PER_JULIAN_CENTURY
87
209
  end
88
210
 
89
- private
90
-
91
211
  # Source:
92
212
  # Title: Computing Apparent Planetary Magnitudes for The Astronomical
93
213
  # Almanac (2018)
94
214
  # Authors: Anthony Mallama and James L. Hilton
95
215
  def magnitude_correction_term
96
216
  phase_angle_degrees = phase_angle.degrees
97
- if phase_angle_degrees <= 150 && current_phase_fraction <= 0.5
98
- 2.9994 * 10**-2 * phase_angle_degrees -
99
- 1.6057 * 10**-4 * phase_angle_degrees**2 +
100
- 3.1543 * 10**-6 * phase_angle_degrees**3 -
101
- 2.0667 * 10**-8 * phase_angle_degrees**4 +
102
- 6.2553 * 10**-11 * phase_angle_degrees**5
103
- elsif phase_angle_degrees <= 150 && current_phase_fraction > 0.5
104
- 3.3234 * 10**-2 * phase_angle_degrees -
105
- 3.0725 * 10**-4 * phase_angle_degrees**2 +
106
- 6.1575 * 10**-6 * phase_angle_degrees**3 -
107
- 4.7723 * 10**-8 * phase_angle_degrees**4 +
108
- 1.4681 * 10**-10 * phase_angle_degrees**5
217
+ if phase_angle_degrees <= 150 && current_phase_fraction > 0.5
218
+ waning_magnitude_correction(phase_angle_degrees)
109
219
  else
110
- super
220
+ waxing_magnitude_correction(phase_angle_degrees)
111
221
  end
112
222
  end
223
+
224
+ def waxing_magnitude_correction(phase_angle_degrees)
225
+ 2.9994 * 10**-2 * phase_angle_degrees -
226
+ 1.6057 * 10**-4 * phase_angle_degrees**2 +
227
+ 3.1543 * 10**-6 * phase_angle_degrees**3 -
228
+ 2.0667 * 10**-8 * phase_angle_degrees**4 +
229
+ 6.2553 * 10**-11 * phase_angle_degrees**5
230
+ end
231
+
232
+ def waning_magnitude_correction(phase_angle_degrees)
233
+ 3.3234 * 10**-2 * phase_angle_degrees -
234
+ 3.0725 * 10**-4 * phase_angle_degrees**2 +
235
+ 6.1575 * 10**-6 * phase_angle_degrees**3 -
236
+ 4.7723 * 10**-8 * phase_angle_degrees**4 +
237
+ 1.4681 * 10**-10 * phase_angle_degrees**5
238
+ end
113
239
  end
114
240
  end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents Neptune.
4
5
  class Neptune < SolarSystemBody
5
6
  EQUATORIAL_RADIUS = Distance.from_meters(24_764_000)
6
7
  ABSOLUTE_MAGNITUDE = -7.0
8
+ ORBITAL_PERIOD = 60182.0
7
9
 
10
+ # @return [Boolean] true; Neptune is a superior planet
11
+ def self.superior_planet?
12
+ true
13
+ end
14
+
15
+ # @param _ephem_source [Symbol] the ephemeris source type
16
+ # @return [Array<Array>] ephemeris segment identifiers
8
17
  def self.ephemeris_segments(_ephem_source)
9
18
  [[SOLAR_SYSTEM_BARYCENTER, NEPTUNE_BARYCENTER]]
10
19
  end
11
20
 
21
+ # @return [Float] absolute magnitude
12
22
  def self.absolute_magnitude
13
23
  ABSOLUTE_MAGNITUDE
14
24
  end
@@ -1,14 +1,24 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Astronoby
4
+ # Represents Saturn.
4
5
  class Saturn < SolarSystemBody
5
6
  EQUATORIAL_RADIUS = Distance.from_meters(60_268_000)
6
7
  ABSOLUTE_MAGNITUDE = -8.914
8
+ ORBITAL_PERIOD = 10759.22
7
9
 
10
+ # @return [Boolean] true; Saturn is a superior planet
11
+ def self.superior_planet?
12
+ true
13
+ end
14
+
15
+ # @param _ephem_source [Symbol] the ephemeris source type
16
+ # @return [Array<Array>] ephemeris segment identifiers
8
17
  def self.ephemeris_segments(_ephem_source)
9
18
  [[SOLAR_SYSTEM_BARYCENTER, SATURN_BARYCENTER]]
10
19
  end
11
20
 
21
+ # @return [Float] absolute magnitude
12
22
  def self.absolute_magnitude
13
23
  ABSOLUTE_MAGNITUDE
14
24
  end