Module: IERS::PolarMotion
- Extended by:
- EopParameter
- Defined in:
- lib/iers/polar_motion.rb
Defined Under Namespace
Classes: Entry
Constant Summary collapse
- S_PRIME_RATE =
TIO locator rate in arcseconds per Julian century (IERS Conventions 2010, eq. 5.13)
-0.000047
Constants included from EopParameter
Class Method Summary collapse
- .at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Entry
- .between(start_date, end_date) ⇒ Enumerator::Lazy<Entry>
-
.rotation_matrix_at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Array<Array<Float>>
3x3 polar motion rotation matrix.
Methods included from EopParameter
derive_quality, interpolate_field, resolve
Class Method Details
.at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Entry
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/iers/polar_motion.rb', line 51 def at(input = nil, jd: nil, mjd: nil, interpolation: nil) query_mjd, window, method = resolve( input, jd: jd, mjd: mjd, interpolation: interpolation ) x = interpolate_field(window, query_mjd, method) { |e| best_pm(e, :x) } y = interpolate_field(window, query_mjd, method) { |e| best_pm(e, :y) } Entry.new( x: x, y: y, mjd: query_mjd, data_quality: derive_quality(window, :pm_flag) ) end |
.between(start_date, end_date) ⇒ Enumerator::Lazy<Entry>
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/iers/polar_motion.rb', line 83 def between(start_date, end_date) start_mjd = TimeScale.to_mjd(start_date) end_mjd = TimeScale.to_mjd(end_date) entries = Data.finals_entries EopLookup .range(entries, start_mjd, end_mjd) .lazy .map do |e| Entry.new( x: best_pm(e, :x), y: best_pm(e, :y), mjd: e.mjd, data_quality: EopParameter::FLAG_TO_QUALITY.fetch( e.pm_flag, :observed ) ) end end |
.rotation_matrix_at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Array<Array<Float>>
Returns 3x3 polar motion rotation matrix.
75 76 77 78 |
# File 'lib/iers/polar_motion.rb', line 75 def rotation_matrix_at(input = nil, jd: nil, mjd: nil, interpolation: nil) at(input, jd: jd, mjd: mjd, interpolation: interpolation) .rotation_matrix end |