Class: IERS::PolarMotion::Entry

Inherits:
Data
  • Object
show all
Includes:
HasDataQuality, HasDate
Defined in:
lib/iers/polar_motion.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasDataQuality

#observed?, #predicted?

Methods included from HasDate

#date

Instance Attribute Details

#data_qualitySymbol (readonly)

+:observed+ or +:predicted+

Returns:

  • (Symbol)

    the current value of data_quality



13
14
15
# File 'lib/iers/polar_motion.rb', line 13

def data_quality
  @data_quality
end

#mjdFloat (readonly)

Modified Julian Date of the query

Returns:

  • (Float)

    the current value of mjd



13
14
15
# File 'lib/iers/polar_motion.rb', line 13

def mjd
  @mjd
end

#xFloat (readonly)

pole x-coordinate in arcseconds

Returns:

  • (Float)

    the current value of x



13
14
15
# File 'lib/iers/polar_motion.rb', line 13

def x
  @x
end

#yFloat (readonly)

pole y-coordinate in arcseconds

Returns:

  • (Float)

    the current value of y



13
14
15
# File 'lib/iers/polar_motion.rb', line 13

def y
  @y
end

Instance Method Details

#rotation_matrixArray<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.

Returns:

  • (Array<Array<Float>>)

    3x3 rotation matrix



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