The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Time::TAI - International Atomic Time and realisations

SYNOPSIS

        use Time::TAI qw(tai_instant_to_mjd tai_mjd_to_instant);

        $mjd = tai_instant_to_mjd($instant);
        $instant = tai_mjd_to_instant($mjd);

        use Time::TAI qw(tai_realisation);

        $rln = tai_realisation("npl");
        $instant = $rln->to_tai($npl_instant);

DESCRIPTION

International Atomic Time (TAI) is a time scale produced by an ensemble of atomic clocks around Terra. It attempts to tick at the rate of proper time on the Terran geoid (i.e., at sea level), and thus is the principal realisation of Terrestrial Time (TT). It is the frequency standard underlying Coordinated Universal Time (UTC), and so is indirectly the basis for Terran civil timekeeping.

This module represents instants on the TAI time scale as a scalar number of TAI seconds since an epoch. This is an appropriate form for all manner of calculations. The TAI scale is defined with a well-known point at UT2 instant 1958-01-01T00:00:00.0 as calculated by the United States Naval Observatory. That instant is assigned the scalar value zero exactly, making it the epoch for this linear seconds count. This matches the convention used by Time::TT for instants on the TT scale.

There is also a conventional way to represent TAI instants using day-based notations associated with planetary rotation `time' scales. The `day' of TAI is a nominal period of exactly 86400 TAI seconds, which is slightly shorter than an actual Terran day. The well-known point at UT2 instant 1958-01-01T00:00:00.0 is assigned the label 1958-01-01T00:00:00.0 (MJD 36204.0). Because TAI is not connected to Terran rotation, and so has no inherent concept of a day, it is somewhat misleading to use such day-based notations. Conversion between this notation and the linear count of seconds is supported by this module. This notation does not match the similar day-based notation used for TT.

Because TAI is canonically defined only in retrospect, real-time time signals can only approximate it. To achieve microsecond accuracy it is necessary to take account of this process. This module supports conversion of times between different realisations of TAI.

FUNCTIONS

tai_instant_to_mjd(INSTANT)

Converts from a count of seconds to a Modified Julian Date in the manner conventional for TAI. The MJD can be further converted to other forms of day-based date using other modules. The input must be a Math::BigRat object, and the result is the same type.

tai_mjd_to_instant(MJD)

Converts from a Modified Julian Date, interpreted in the manner conventional for TAI, to a count of seconds. The input must be a Math::BigRat object, and the result is the same type.

tai_realisation(NAME)

Looks up and returns an object representing a named realisation of TAI. The object returned is of the class Time::TT::Realisation; see the documentation of that class for its interface.

The name, recognised case-insensitively, may be of these forms:

"" (the empty string)

TAI itself, as defined retrospectively.

npl

TAI(NPL), supplied in real time by the National Physical Laboratory in the UK. Other real-time estimates of TAI are named similarly using an abbreviation of the name of the supplying agency. The names recognised are:

    aos   cnmp  gps   jatc  naom  nmij  onba  rc    su    yuzm
    apl   crl   gum   jv    naot  nml   onrj  roa   tao   zipe
    asmw  csao  hko   kris  nict  nmls  op    scl   tcc
    aus   csir  ien   ksri  nim   npl   orb   sg    tl
    bev   dlr   ifag  lds   nimb  npli  pel   smu   tp
    birm  dpt   igma  lt    nimt  nrc   pknm  snt   tug
    cao   dtag  inpl  mike  nis   nrlm  pl    so    ume
    ch    ftz   ipq   msl   nist  ntsc  psb   sp    usno
    cnm   glo   it    nao   nmc   omh   ptb   sta   vsl

See Time::TT::Agencies for expansions of these abbreviations.

Some pairs of these names refer to the same time scale, due to renaming of the underlying agency or transfer of responsibility for a time scale. It is possible that some names that should be aliases are treated as separate time scales, due to uncertainty of this module's author; see "BUGS".

The relationships between these scales and TAI are defined by isolated data points, so conversions in general involve interpolation. The process is by its nature inexact.

Other names may be recognised in the future, as more TAI(k) time scales are defined.

BUGS

For a few of the named realisations of TAI for which there is data, the author of this module was unable to determine conclusively whether they were renamed at some point. This affects particularly the names "naot", "snt", "sta", "tao".

Time scale data only goes back to the beginning of 1990. GPS and GLONASS data only goes back to the beginning of 1993, and forward to the end of 2004.

If you can supply more information about any of the time scales for which data is missing then please mail the author.

Time steps and frequency shifts are not noted in the time scale data available to this module. The smooth interpolation will therefore produce inaccurate results in the immediate vicinity of such discontinuities.

SEE ALSO

Date::JD, Time::GPS, Time::TT, Time::TT::Agencies, Time::TT::Realisation, Time::UTC

AUTHOR

Andrew Main (Zefram) <zefram@fysh.org>

COPYRIGHT

Copyright (C) 2006 Andrew Main (Zefram) <zefram@fysh.org>

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.