1 /* 2 * - - - - - - - - - - - 3 * g a l _ u t c 2 t t 4 * - - - - - - - - - - - 5 * 6 * This routine is part of the General Astrodynamics Library 7 * 8 * Description: 9 * 10 * This routine converts a UTC jd date to a TT jd date. 11 * 12 * Status: 13 * 14 * support routine. 15 * 16 * Given: 17 * 18 * utc1 d UTC date part 1 ( see Note 1 ) 19 * utc2 d UTC date part 2 ( see Note 1 ) 20 * 21 * Returned: 22 * 23 * *tt1 d TT date part 1 ( see Note 1 ) 24 * *tt2 d TT date part 2 ( see Note 1 ) 25 * gal_utc2tt i Status ( see Note 2 ) 26 * 1 = dubious year (Note 2) 27 * 0 = OK 28 * Notes: 29 * 30 * 1) The Julian Date is apportioned in any convenient way between 31 * the arguments utc1 and utc2. For example, JD=2450123.7 could 32 * be expressed in any of these ways, among others: 33 * 34 * utc1 utc2 35 * 36 * 2450123.7 0.0 (JD method) 37 * 2451545.0 -1421.3 (J2000 method) 38 * 2400000.5 50123.2 (MJD method) 39 * 2450123.5 0.2 (date & time method) 40 * 41 * 2) TAI began at 1960 January 1.0 (JD 2436934.5) and it is improper 42 * to call the routine with an earlier epoch. If this is attempted, 43 * zero is returned together with a warning status. 44 * 45 * Because leap seconds cannot, in principle, be predicted in 46 * advance, a reliable check for dates beyond the valid range is 47 * impossible. To guard against gross errors, a year five or more 48 * after the release year of the present routine is considered dubious. 49 * In this case a warning status is returned but the result is 50 * computed in the normal way. 51 * 52 * Called: 53 * 54 * gal_dat Calculate delta(AT) = TAI-UTC 55 * gal_utc2tai Convert UTC to TAI 56 * gal_tai2tt Convert TAI to TT 57 * 58 * This revision: 59 * 60 * 2008 April 13 61 * 62 * Copyright (C) 2008 Paul C. L. Willmott. See notes at end. 63 * 64 *----------------------------------------------------------------------- 65 */ 66 67 #ifndef _GAL_UTC2TT_H_ 68 #define _GAL_UTC2TT_H_ 1 69 70 #undef __BEGIN_DECLS 71 #undef __END_DECLS 72 #ifdef __cplusplus 73 #define __BEGIN_DECLS extern "C" { 74 #define __END_DECLS } 75 #else 76 #define __BEGIN_DECLS /* empty */ 77 #define __END_DECLS /* empty */ 78 #endif 79 80 __BEGIN_DECLS 81 82 int 83 gal_utc2tt 84 ( 85 double utc1, 86 double utc2, 87 double *tt1, 88 double *tt2 89 ) ; 90 91 __END_DECLS 92 93 #endif /* !_GAL_UTC2TT_H_ */ 94 95 /* 96 * gal - General Astrodynamics Library 97 * Copyright (C) 2008 Paul C. L. Willmott 98 * 99 * This program is free software; you can redistribute it and/or modify 100 * it under the terms of the GNU General Public License as published by 101 * the Free Software Foundation; either version 2 of the License, or 102 * (at your option) any later version. 103 * 104 * This program is distributed in the hope that it will be useful, 105 * but WITHOUT ANY WARRANTY; without even the implied warranty of 106 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 107 * GNU General Public License for more details. 108 * 109 * You should have received a copy of the GNU General Public License along 110 * with this program; if not, write to the Free Software Foundation, Inc., 111 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 112 * 113 * Contact: 114 * 115 * Paul Willmott 116 * vp9mu@amsat.org 117 */ 118