Class: Astronoby::EarthRotation
- Inherits:
-
Object
- Object
- Astronoby::EarthRotation
- Defined in:
- lib/astronoby/earth_rotation.rb
Overview
Computes Earth rotation matrices using Greenwich Sidereal Time. Provides both apparent (GAST-based) and mean (GMST-based) rotation matrices for transforming between Earth-fixed and celestial frames.
Class Method Summary collapse
-
.matrix_for(instant) ⇒ Matrix
Computes the apparent Earth rotation matrix R₃(GAST) for a given instant.
-
.mean_matrix_for(instant) ⇒ Matrix
Computes the mean Earth rotation matrix R₃(GMST) for a given instant.
Instance Method Summary collapse
-
#initialize(instant:) ⇒ EarthRotation
constructor
A new instance of EarthRotation.
-
#matrix ⇒ Matrix
Computes R₃(GAST), the apparent Earth rotation matrix.
-
#mean_matrix ⇒ Matrix
Computes R₃(GMST), the mean Earth rotation matrix.
Constructor Details
#initialize(instant:) ⇒ EarthRotation
Returns a new instance of EarthRotation.
27 28 29 |
# File 'lib/astronoby/earth_rotation.rb', line 27 def initialize(instant:) @instant = instant end |
Class Method Details
.matrix_for(instant) ⇒ Matrix
Computes the apparent Earth rotation matrix R₃(GAST) for a given instant.
13 14 15 |
# File 'lib/astronoby/earth_rotation.rb', line 13 def self.matrix_for(instant) new(instant: instant).matrix end |
.mean_matrix_for(instant) ⇒ Matrix
Computes the mean Earth rotation matrix R₃(GMST) for a given instant.
22 23 24 |
# File 'lib/astronoby/earth_rotation.rb', line 22 def self.mean_matrix_for(instant) new(instant: instant).mean_matrix end |
Instance Method Details
#matrix ⇒ Matrix
Computes R₃(GAST), the apparent Earth rotation matrix. GAST = GMST + equation of the equinoxes (Δψ cos ε₀).
35 36 37 |
# File 'lib/astronoby/earth_rotation.rb', line 35 def matrix rotation_matrix_for(gast) end |
#mean_matrix ⇒ Matrix
Computes R₃(GMST), the mean Earth rotation matrix.
42 43 44 |
# File 'lib/astronoby/earth_rotation.rb', line 42 def mean_matrix rotation_matrix_for(gmst) end |