Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Close
From: <airwin@us...>  20090315 19:07:45

Revision: 9739 http://plplot.svn.sourceforge.net/plplot/?rev=9739&view=rev Author: airwin Date: 20090315 19:07:41 +0000 (Sun, 15 Mar 2009) Log Message:  Document exactly how the relationship between MJD(TAI) and MJD(UTC) is determined from taiutc.dat. Added Paths:  trunk/lib/qsastime/README.taiutc Added: trunk/lib/qsastime/README.taiutc ===================================================================  trunk/lib/qsastime/README.taiutc (rev 0) +++ trunk/lib/qsastime/README.taiutc 20090315 19:07:41 UTC (rev 9739) @@ 0,0 +1,71 @@ +We use the file taiutc.dat (which is obtained by + +wget http://maia.usno.navy.mil/ser7/taiutc.dat + +) to define the relationship between UTC and TAI. (That file gets updated +once per year or so, and it is the PLplot release manager's +responsibility to check that the local taiutc.dat is up to date with +the file at maia.usno.navy.mil.) Here are the first and last lines in +this file (as of 200903). + + 1961 JAN 1 =JD 2437300.5 TAIUTC= 1.4228180 S + (MJD  37300.) X 0.001296 S + 2009 JAN 1 =JD 2454832.5 TAIUTC= 34.0 S + (MJD  41317.) X 0.0 S + +Clearly, the JD where the discontinuity in UTC occurs is in UTC. (If +it were in TAI instead, the JD epoch would not correspond to midnight +exactly.) I further assume that for early epochs where there was a +nonzero slope, the MJD argument is also UTC. Thus, we have the +following general relationship that holds between the discontinuities in UTC. + + +MJD(TAI)  MJD(UTC) = (offset1 + (MJD(UTC)  offset2)*slope)/86400 (1) + +The taiutcgen application reads in these (UTC) epoch, offset1, +offset2, and slope data from taiutc.dat, calculates the discontinuous +change in UTC at the UTC epoch of the discontinuity, and stores the +results in the header file taiutc.h with two tables which have +identical offset1, offset2, slope, and discontinuous change data, but +which have epochs of the discontinuity expressed in MJD(TAI) for +TAI_TO_UTC_lookup_table and MJD(UTC) for UTC_TO_TAI_lookup_table. + +The qsastime library uses equation 1 to calculate MJD(TAI) as a +function of MJD(UTC), and + +MJD(TAI)  MJD(UTC) = ((offset1 + (MJD(TAI)  offset2)*slope)/86400)/ + (1. + slope/86400) (2) + +to calculate MJD(UTC) from MJD(TAI). (Equation 2 can be derived from +equation 1 by adding (MJD(TAI)  MJD(UTC))*slope/86400 to each side +and dividing out the common factor.) The data for these two equations +is taken from taiutc.h, and the efficient routine bhunt_search is used to +find for a given MJD(TAI) or MJD(UTC) which set of data to use for the +transformation from TAI to UTC or vice versa. + +For historical epochs prior to the starting date of taiutc.dat +(19610101 = JD 2437300.5 UTC) we assume the same TAIUTC offset of +1.422818 seconds as for the starting date of that file. This +assumption of no variation in the earth rotation rate prior to 1961 is +obviously not correct so that the TAI, TT, etc. derived from our code +will not be reliable prior to that date. That is, if you use GMT (a +historical backwards extension of UTC corresponding to civil time for +the prime meridian) for broken down time prior to 1961, the TT result +you will get will not produce a good approximation to the historical +ephemeris time that is the correct backwards extension of TT, see +http://en.wikipedia.org/wiki/Ephemeris_time. + +For epochs after the ending date of taiutc.dat (currently 20090101 += JD 2454832.5 UTC) we assume the same TAIUTC offset (currently 34 +seconds) as for the ending date of that file, i.e., we assume no leap +seconds after the ending date of the file. Insertion of leap seconds +cannot be predicted years in advance (because future predictions of +the earth rotation rate are not reliable on such time scales) so the +transformation between civil time (UTC) and TAI, TT, etc. cannot be +known years in advance. However, the approximation of assuming no +leap seconds after the end of the file should be correct on time +scales less than roughly a year so when a decision is made in advance +to insert an official leap second, there should be plenty of time for +that decision to propagate to +http://maia.usno.navy.mil/ser7/taiutc.dat and ultimately the +taiutc.dat file included in our code releases. Thus, so long as we +make releases on a timely basis, our calculation of TT for current +epochs should always be reliable. Property changes on: trunk/lib/qsastime/README.taiutc ___________________________________________________________________ Added: svn:eolstyle + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 
From: <airwin@us...>  20090315 21:06:00

Revision: 9740 http://plplot.svn.sourceforge.net/plplot/?rev=9740&view=rev Author: airwin Date: 20090315 21:05:37 +0000 (Sun, 15 Mar 2009) Log Message:  Correct the description of how the UTC discontinuities are calculated. Modified Paths:  trunk/lib/qsastime/README.taiutc Modified: trunk/lib/qsastime/README.taiutc ===================================================================  trunk/lib/qsastime/README.taiutc 20090315 19:07:41 UTC (rev 9739) +++ trunk/lib/qsastime/README.taiutc 20090315 21:05:37 UTC (rev 9740) @@ 20,12 +20,12 @@ MJD(TAI)  MJD(UTC) = (offset1 + (MJD(UTC)  offset2)*slope)/86400 (1) The taiutcgen application reads in these (UTC) epoch, offset1, offset2, and slope data from taiutc.dat, calculates the discontinuous change in UTC at the UTC epoch of the discontinuity, and stores the results in the header file taiutc.h with two tables which have identical offset1, offset2, slope, and discontinuous change data, but which have epochs of the discontinuity expressed in MJD(TAI) for +The taiutcgen application reads in these (UTC) epoch, offset1, offset2, +and slope data from taiutc.dat, calculates the discontinuous change in UTC +at the unique TAI epoch of the UTC discontinuity using equation 2 below, and +stores the results in the header file taiutc.h with two tables which have +identical offset1, offset2, slope, and discontinuous change data, but which +have epochs of the discontinuity expressed in MJD(TAI) for TAI_TO_UTC_lookup_table and MJD(UTC) for UTC_TO_TAI_lookup_table. The qsastime library uses equation 1 to calculate MJD(TAI) as a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. 