Class: Astronoby::MeanObliquity
- Inherits:
-
Object
- Object
- Astronoby::MeanObliquity
- Defined in:
- lib/astronoby/mean_obliquity.rb
Overview
Computes the mean obliquity of the ecliptic using the IAU 2006 P03 model.
Constant Summary collapse
- EPOCH_OF_REFERENCE =
Source:
IAU resolution in 2006 in favor of the P03 astronomical model https://syrte.obspm.fr/iau2006/aa03_412_P03.pdf JulianDate::DEFAULT_EPOCH
- OBLIQUITY_OF_REFERENCE =
23.4392794
Class Method Summary collapse
-
.at(instant) ⇒ Astronoby::Angle
Computes the mean obliquity of the ecliptic at the given instant.
-
.obliquity_of_reference ⇒ Astronoby::Angle
The mean obliquity at the reference epoch (J2000.0).
-
.obliquity_of_reference_in_arcseconds ⇒ Float
The mean obliquity at J2000.0 in arcseconds.
Class Method Details
.at(instant) ⇒ Astronoby::Angle
Computes the mean obliquity of the ecliptic at the given instant.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/astronoby/mean_obliquity.rb', line 20 def self.at(instant) return obliquity_of_reference if instant.julian_date == EPOCH_OF_REFERENCE t = Rational( instant.julian_date - EPOCH_OF_REFERENCE, Constants::DAYS_PER_JULIAN_CENTURY ) epsilon0 = obliquity_of_reference_in_arcseconds c1 = -46.836769 c2 = -0.0001831 c3 = 0.00200340 c4 = -0.000000576 c5 = -0.0000000434 Angle.from_degree_arcseconds( epsilon0 + t * (c1 + t * (c2 + t * (c3 + t * (c4 + t * c5)))) ) end |
.obliquity_of_reference ⇒ Astronoby::Angle
Returns the mean obliquity at the reference epoch (J2000.0).
42 43 44 |
# File 'lib/astronoby/mean_obliquity.rb', line 42 def self.obliquity_of_reference Angle.from_degree_arcseconds(obliquity_of_reference_in_arcseconds) end |
.obliquity_of_reference_in_arcseconds ⇒ Float
Returns the mean obliquity at J2000.0 in arcseconds.
47 48 49 |
# File 'lib/astronoby/mean_obliquity.rb', line 47 def self.obliquity_of_reference_in_arcseconds 84381.406 end |