Time scales for astronomy (TT, TCG, TDB, and TCB).

Internally all computations use high precision ddoublestd/num/ddouble/ddouble: V numbers. The different time scales relate as follows:

Note that theoretically the definition of TT is based on TCG which is based on TCB, but in practice we define TT on the basis of an actual clock (TAI) and derive TCG from TT. Moreover, TDB is approximated from TT, and TCB is derived from the approximated TDB.

Since TDB (and in turn TCB) are approximated, it is possible to create your own time scale which uses a potentially more precise approximation using ts-tdb-createstd/time/astro/ts-tdb-create: (tdb-minus-tt : (timestamp) -> timespan) -> timescale and ts-tcb-createstd/time/astro/ts-tcb-create: (tstdb : timescale) -> timescale.


Figure 1. [Relation between different time scales relative to TAI between 1950 and 2000. The periodic terms of TCB and TDB are magnified by 100 to make them visible. Figure from Seidelmann and Fukushima [3].]


[1]L. Fairhead and P. Bretagnon. An analytical formula for the time transformation TB-TT. Astronomy and Astrophysics, vol. 229, no. 1, March 1990, p. 240–247. ADS 🔎
[2]George H. Kaplan. The IAU Resolutions on Astronomical Reference Systems, Time Scales, and Earth Rotation Models – Explanation and Implementation. USNO Circular 179 🔎
[3]P.K. Seidelmann and T. Fukushima. Why new time scales? Astronomy and Astrophysics, vol. 265, no. 2, p. 833–838. ADS 🔎


val epoch-j2000: instantstd/time/instant/instant: V

The J2000 epoch is defined as 2000-01-01T12:00:00 TT (Terrestrial time).

fun instant-at-j2000( jd : ddoublestd/num/ddouble/ddouble: V ) : instantstd/time/instant/instant: V

Return the instant corresponding to a J2000 julian date: this is the number of days, and the fraction of the day since J2000 (epoch-j2000std/time/astro/epoch-j2000: instant) in terrestrial time (ts-ttstd/time/instant/ts-tt: timescale).
instant-at-j2000std/time/astro/instant-at-j2000: (jd : ddouble) -> instant(zero) == "2000-01-01T11:58:55.816Z"
instant-at-j2000std/time/astro/instant-at-j2000: (jd : ddouble) -> instant(zero).time(cal=cal-tt).show == "2000-01-01T12:00:00Z TT".

fun j2000( i : instantstd/time/instant/instant: V ) : ddoublestd/num/ddouble/ddouble: V

Return the J2000 julian date for an instant. This is the number of days, and the fraction of the day since J2000 (epoch-j2000std/time/astro/epoch-j2000: instant) in terrestrial time (ts-ttstd/time/instant/ts-tt: timescale).
instant(2000,1,1,12,0,0).j2000std/time/astro/j2000: (i : instant) -> == "0.00074287037037"
instant(2000,1,1,12,0,0,cal=cal-tt).j2000std/time/astro/j2000: (i : instant) -> == "0".

val ts-tcb: timescalestd/time/instant/timescale: V

The TCB (Barycentric coordinate time) time scale. The unit of TCB is the SI second, but in a coordinate reference frame at the barycenter of the solar system.

fun ts-tcb-create( tstdb : timescalestd/time/instant/timescale: V ) : timescalestd/time/instant/timescale: V

Create a new TCB timescale given a TDB timescale (tstdb). The default ts-tcbstd/time/astro/ts-tcb: timescale uses the default ts-tdbstd/time/astro/ts-tdb: timescale timescale, but if you created a different TCB time scale (using ts-tdb-createstd/time/astro/ts-tdb-create: (tdb-minus-tt : (timestamp) -> timespan) -> timescale) you can use this function to create a TCB time scale from it. It computes TCB from the provided TDB using the IAU 2006 resolution B3: TDB = TCB - Lb × (JDTCB - T0) × 86400 + TDB0, with T0 = 2443144.5003725, Lb = 1.55051976772×10-8, TDB0 = -6.55×10-5.

val ts-tcg: timescalestd/time/instant/timescale: V

The TCG (Geocentric coordinate time) time scale. The unit of TCG is the SI second in a coordinate reference frame at the center of the Earth.

val ts-tdb: timescalestd/time/instant/timescale: V

The TDB (Barycentric dynamical time) time scale (which can be considered equivalent Teph).

TDB is approximated from TT using an initial set of coefficients by Fairhead & Bretagnon [1] assuming the geo center (longitude and latitude of 0 degrees). See also USNO circular 179 ([2], equation 2.6). The approximation is within 10μs precision in the time span 1600 to 2200 (and probably a bit less).

fun ts-tdb-create( tdb-minus-tt : (timestampstd/time/timestamp/timestamp: V) -> timespanstd/time/timestamp/timespan: V ) : timescalestd/time/instant/timescale: V

Creates a new TDB timescale given a user provided function to calculate TDB-TT. The default function used for ts-tdbstd/time/astro/ts-tdb: timescale uses the Fairhead & Bretagnon approximation corrected for JPL planetary masses but assumes the geo center. Use this function to create a new TDB timescale if you need more precision.

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/eitherstd/core/either, std/core/tuplestd/core/tuple, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/num/float64std/num/float64, std/num/ddoublestd/num/ddouble, std/time/timestampstd/time/timestamp, std/time/durationstd/time/duration, std/time/instantstd/time/instant, std/time/calendarstd/time/calendar, std/time/utcstd/time/utc, std/time/calendarsstd/time/calendars