Class: Astronoby::MeanObliquity
- Inherits:
-
Object
- Object
- Astronoby::MeanObliquity
- Defined in:
- lib/astronoby/mean_obliquity.rb
Constant Summary collapse
- EPOCH_OF_REFERENCE =
Source:
IAU resolution in 2006 in favor of the P03 astronomical model The Astronomical Almanac for 2010
Epoch::DEFAULT_EPOCH
- OBLIQUITY_OF_REFERENCE =
23.4392794
Class Method Summary collapse
Class Method Details
.for_epoch(epoch) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/astronoby/mean_obliquity.rb', line 14 def self.for_epoch(epoch) return obliquity_of_reference if epoch == EPOCH_OF_REFERENCE t = (epoch - EPOCH_OF_REFERENCE) / Constants::DAYS_PER_JULIAN_CENTURY Angle.from_degrees( obliquity_of_reference.degrees - ( 46.815 * t - 0.0006 * t * t + 0.00181 * t * t * t ) / Constants::SECONDS_PER_DEGREE ) end |