53
53
tsu = UT seconds since 1970-01-01T00:00 (used as Unix system time)
54
54
tsd = UT seconds of current day
55
55
ut = Universal Time (UTC)
56
et = Ephemeris Time (or TDB or TT)
56
et = Ephemeris Time (or TDB or TT) = TAI + 32.184 seconds
57
tai = International Atomic Time (Temps Atomique International) = ET - 32.184 seconds
58
gps = GPS time = TAI - 19 seconds
57
59
mst = Mean Greenwich Sidereal Time
58
60
gst = Greenwich Sidereal Time (includes nutation)
59
61
lst = Local Sidereal Time (includes nutation) (longitude must be set)
2006
2012
/* TAI-UTC from the U.S. Naval Observatory */
2007
2013
/* ftp://maia.usno.navy.mil/ser7/tai-utc.dat */
2008
static double taijd[23]={2441317.5, 2441499.5, 2441683.5, 2442048.5, 2442413.5,
2014
static double taijd[26]={2441317.5, 2441499.5, 2441683.5, 2442048.5, 2442413.5,
2009
2015
2442778.5, 2443144.5, 2443509.5, 2443874.5, 2444239.5, 2444786.5,
2010
2016
2445151.5, 2445516.5, 2446247.5, 2447161.5, 2447892.5, 2448257.5,
2011
2448804.5, 2449169.5, 2449534.5, 2450083.5, 2450630.5, 2451179.5};
2012
static double taidt[23]={10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,
2013
20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0};
2017
2448804.5, 2449169.5, 2449534.5, 2450083.5, 2450630.5, 2451179.5,
2018
2453736.5, 2454832.5, 2456293.5};
2019
static double taidt[26]={10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,
2020
20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0,
2014
2022
static double dttab[173]={13.7,13.4,13.1,12.9,12.7,12.6,12.5,12.5,12.5,12.5,
2015
2023
12.5,12.5,12.5,12.5,12.5,12.5,12.5,12.4,12.3,12.2,12.0,11.7,11.4,
2016
2024
11.1,10.6,10.2, 9.6, 9.1, 8.6, 8.0, 7.5, 7.0, 6.6, 6.3, 6.0, 5.8,
2040
/* TAI2FD-- convert from TAI in FITS format to UT in FITS format */
2045
char *string; /* FITS date string, which may be:
2047
dd/mm/yy (FITS standard before 2000)
2048
dd-mm-yy (nonstandard use before 2000)
2049
yyyy-mm-dd (FITS standard after 1999)
2050
yyyy-mm-ddThh:mm:ss.ss (FITS standard after 1999) */
2052
double dj0, dj, tsec, dt;
2054
dj0 = fd2jd (string);
2056
dj = dj0 - (dt / 86400.0);
2058
tsec = fd2ts (string);
2059
tsec = tsec - dt + 32.184;
2060
return (ts2fd (tsec));
2064
/* FD2TAI-- convert from UT in FITS format to TAI in FITS format */
2069
char *string; /* FITS date string, which may be:
2071
dd/mm/yy (FITS standard before 2000)
2072
dd-mm-yy (nonstandard use before 2000)
2073
yyyy-mm-dd (FITS standard after 1999)
2074
yyyy-mm-ddThh:mm:ss.ss (FITS standard after 1999) */
2076
double dj, tsec, dt;
2078
dj = fd2jd (string);
2080
tsec = fd2ts (string);
2081
tsec = tsec + dt - 32.184;
2082
return (ts2fd (tsec));
2086
/* DT2TAI-- convert from UT as yyyy.mmdd hh.mmssss to TAI in same format */
2090
double *date; /* Date as yyyy.mmdd */
2091
double *time; /* Time as hh.mmssxxxx
2092
*if time<0, it is time as -(fraction of a day) */
2094
double dj, dt, tsec;
2096
dj = dt2jd (*date, *time);
2098
tsec = dt2ts (*date, *time);
2099
tsec = tsec + dt - 32.184;
2100
ts2dt (tsec, date, time);
2105
/* TAI2DT-- convert from TAI as yyyy.mmdd hh.mmssss to UT in same format */
2109
double *date; /* Date as yyyy.mmdd */
2110
double *time; /* Time as hh.mmssxxxx
2111
*if time<0, it is time as -(fraction of a day) */
2113
double dj, dt, tsec, tsec0;
2115
dj = dt2jd (*date, *time);
2117
tsec0 = dt2ts (*date, *time);
2121
tsec = tsec0 + dt + 32.184;
2122
ts2dt (tsec, date, time);
2032
2127
/* ET2FD-- convert from ET (or TDT or TT) in FITS format to UT in FITS format */