35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# File 'lib/iers/eop.rb', line 35
def at(input = nil, jd: nil, mjd: nil, interpolation: nil)
query_mjd = TimeScale.to_mjd(input, jd: jd, mjd: mjd)
interp = interpolation ? {interpolation: interpolation} : {}
pm = PolarMotion.at(mjd: query_mjd, **interp)
ut1 = UT1.at(mjd: query_mjd, **interp)
cpo = CelestialPoleOffset.at(mjd: query_mjd, **interp)
lod = LengthOfDay.at(mjd: query_mjd, **interp)
quality = if [pm, ut1, cpo, lod].any?(&:predicted?)
:predicted
else
:observed
end
Entry.new(
polar_motion_x: pm.x,
polar_motion_y: pm.y,
ut1_utc: ut1.ut1_utc,
length_of_day: lod.length_of_day,
celestial_pole_x: cpo.x,
celestial_pole_y: cpo.y,
mjd: query_mjd,
data_quality: quality
)
end
|