1 /*
2  *  - - - - - - - - - - -
3  *   g a l _ m 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 Mars Coordinated Time (MTC) date
11  *     to a TT jd date. Mars Coordinated Time is the Mean Solar
12  *     Time on the Mars prime meridian.
13  *
14  *  Status:
15  *
16  *     support routine.
17  *
18  *  Given:
19  *
20  *     mtc1               d         MTC date part 1
21  *     mtc2               d         MTC date part 2
22  *
23  *  Returned:
24  *
25  *     *tt1                d        TT date part 1
26  *     *tt2                d        TT date part 2
27  *
28  *  Notes:
29  *
30  *  1) As defined, consistent with the terrestrial convention for Mean
31  *     Solar Time, JD 2451549.5 (2000 January 6 00:00:00) corresponds to
32  *     a near coincidence of the terrestrial Greenwich mean solar
33  *     midnight and the Martian mean solar (prime meridian) midnight. The
34  *     addition of the integer number 44796 assures a positive result
35  *     for any date since JD 2405522 (1873 December 29.5).
36  *
37  *  References:
38  *
39  *     A post-Pathfinder evaluation of areocentric solar coordinates with
40  *     improved timing recipes for Mars seasonal/diurnal climate studies
41  *     by Michael Allison, Megan McEwen,
42  *     Planetary and Space Science 48 (2000) 215-235
43  *
44  *     Mars24 URL: http://www.giss.nasa.gov/tools/mars24/help/algorithm.html
45  *     The referenced URL contains corrections to the referenced article.
46  *
47  *  This revision:
48  *
49  *     2009 January 5
50  *
51  *  Copyright (C) 2009 Paul C. L. Willmott. See notes at end.
52  *
53  *-----------------------------------------------------------------------
54  */
55 
56 #ifndef _GAL_MTC2TT_H_
57 #define _GAL_MTC2TT_H_ 1
58 
59 #undef __BEGIN_DECLS
60 #undef __END_DECLS
61 #ifdef __cplusplus
62 #define __BEGIN_DECLS extern "C" {
63 #define __END_DECLS }
64 #else
65 #define __BEGIN_DECLS /* empty */
66 #define __END_DECLS   /* empty */
67 #endif
68 
69 __BEGIN_DECLS
70 
71 void
72 gal_mtc2tt
73  (
74     double mtc1,
75     double mtc2,
76     double *tt1,
77     double *tt2
78  ) ;
79 
80 __END_DECLS
81 
82 #endif /* !_GAL_MTC2TT_H_ */
83 
84 /*
85  *  gal - General Astrodynamics Library
86  *  Copyright (C) 2009 Paul C. L. Willmott
87  *
88  *  This program is free software; you can redistribute it and/or modify
89  *  it under the terms of the GNU General Public License as published by
90  *  the Free Software Foundation; either version 2 of the License, or
91  *  (at your option) any later version.
92  *
93  *  This program is distributed in the hope that it will be useful,
94  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
95  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
96  *  GNU General Public License for more details.
97  *
98  *  You should have received a copy of the GNU General Public License along
99  *  with this program; if not, write to the Free Software Foundation, Inc.,
100  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
101  *
102  *  Contact:
103  *
104  *  Paul Willmott
105  *  vp9mu@amsat.org
106  */
107