Module: IERS::UT1
- Extended by:
- EopParameter
- Defined in:
- lib/iers/ut1.rb
Defined Under Namespace
Classes: Entry
Constant Summary
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>
Methods included from EopParameter
derive_quality, interpolate_field, resolve
Class Method Details
.at(input = nil, jd: nil, mjd: nil, interpolation: nil) ⇒ Entry
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/iers/ut1.rb', line 23 def at(input = nil, jd: nil, mjd: nil, interpolation: nil) query_mjd, window, method = resolve( input, jd: jd, mjd: mjd, interpolation: interpolation ) ut1_utc = interpolate_ut1(window, query_mjd, method) Entry.new( ut1_utc: ut1_utc, mjd: query_mjd, data_quality: derive_quality(window, :ut1_flag) ) end |
.between(start_date, end_date) ⇒ Enumerator::Lazy<Entry>
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/iers/ut1.rb', line 43 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( ut1_utc: best_ut1_utc(e), mjd: e.mjd, data_quality: EopParameter::FLAG_TO_QUALITY.fetch(e.ut1_flag, :observed) ) end end |