Class: IERS::PolarMotion::Entry
- Inherits:
-
Data
- Object
- Data
- IERS::PolarMotion::Entry
- Includes:
- HasDataQuality, HasDate
- Defined in:
- lib/iers/polar_motion.rb
Instance Attribute Summary collapse
-
#data_quality ⇒ Symbol
readonly
+:observed+ or +:predicted+.
-
#mjd ⇒ Float
readonly
Modified Julian Date of the query.
-
#x ⇒ Float
readonly
pole x-coordinate in arcseconds.
-
#y ⇒ Float
readonly
pole y-coordinate in arcseconds.
Instance Method Summary collapse
-
#rotation_matrix ⇒ Array<Array<Float>>
Polar motion rotation matrix W per IERS Conventions 2010, Section 5.4.1: W = R3(-s') * R2(xp) * R1(yp).
Methods included from HasDataQuality
Methods included from HasDate
Instance Attribute Details
#data_quality ⇒ Symbol (readonly)
+:observed+ or +:predicted+
13 14 15 |
# File 'lib/iers/polar_motion.rb', line 13 def data_quality @data_quality end |
#mjd ⇒ Float (readonly)
Modified Julian Date of the query
13 14 15 |
# File 'lib/iers/polar_motion.rb', line 13 def mjd @mjd end |
#x ⇒ Float (readonly)
pole x-coordinate in arcseconds
13 14 15 |
# File 'lib/iers/polar_motion.rb', line 13 def x @x end |
#y ⇒ Float (readonly)
pole y-coordinate in arcseconds
13 14 15 |
# File 'lib/iers/polar_motion.rb', line 13 def y @y end |
Instance Method Details
#rotation_matrix ⇒ Array<Array<Float>>
Polar motion rotation matrix W per IERS Conventions 2010, Section 5.4.1: W = R3(-s') * R2(xp) * R1(yp)
All elements use exact trigonometry — no small-angle approximation.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/iers/polar_motion.rb', line 23 def rotation_matrix xp = x * TimeScale::ARCSEC_TO_RAD yp = y * TimeScale::ARCSEC_TO_RAD t = (mjd - TimeScale::MJD_J2000) / TimeScale::DAYS_PER_JULIAN_CENTURY sp = S_PRIME_RATE * t * TimeScale::ARCSEC_TO_RAD cx, sx = Math.cos(xp), Math.sin(xp) cy, sy = Math.cos(yp), Math.sin(yp) cs, ss = Math.cos(sp), Math.sin(sp) [ [cx * cs, cx * ss, sx], [sy * sx * cs - cy * ss, cy * cs + sy * sx * ss, -sy * cx], [-sy * ss - cy * sx * cs, sy * cs - cy * sx * ss, cy * cx] ] end |