1 /*
2 * - - - - - - - - - -
3 * g a l _ o b l 8 0
4 * - - - - - - - - - -
5 *
6 * This routine is part of the General Astrodynamics Library
7 *
8 * Description:
9 *
10 * Mean obliquity of the ecliptic, IAU 1980 model.
11 *
12 * This routine is an independent translation of a FORTRAN routine
13 * that is part of IAU's SOFA software collection.
14 *
15 * Status:
16 *
17 * canonical model.
18 *
19 * Given:
20 *
21 * date1,date2 d TT as a 2-part Julian Date (Note 1)
22 *
23 * Returned:
24 *
25 * gal_obl80 d obliquity of the ecliptic (radians, Note 2)
26 *
27 * Notes:
28 *
29 * 1) The TT date date1+date2 is a Julian Date, apportioned in any
30 * convenient way between the two arguments. For example,
31 * JD(TT)=2450123.7 could be expressed in any of these ways,
32 * among others:
33 *
34 * date1 date2
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 * The JD method is the most natural and convenient to use in
42 * cases where the loss of several decimal digits of resolution
43 * is acceptable. The J2000 method is best matched to the way
44 * the argument is handled internally and will deliver the
45 * optimum resolution. The MJD method and the date & time methods
46 * are both good compromises between resolution and convenience.
47 *
48 * 2) The result is the angle between the ecliptic and mean equator of
49 * date date1+date2.
50 *
51 * References:
52 *
53 * Explanatory Supplement to the Astronomical Almanac,
54 * P. Kenneth Seidelmann (ed), University Science Books (1992),
55 * Expression 3.222-1 (p114).
56 *
57 * This revision:
58 *
59 * 2006 October 28 ( c version 2008 January 19 )
60 *
61 *
62 * Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
63 *
64 *-----------------------------------------------------------------------
65 */
66
67 #include "gal_const.h"
68 #include "gal_obl80.h"
69
70 double
gal_obl80(double date1,double date2)71 gal_obl80
72 (
73 double date1,
74 double date2
75 )
76 {
77
78 double t ;
79
80 /*
81 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
82 */
83
84 /*
85 * Interval between fundamental epoch J2000.0 and given date (JC).
86 */
87
88 t = ( ( date1 - GAL_J2000 ) + date2 ) / GAL_DJC ;
89
90 /*
91 * Mean obliquity of date.
92 */
93
94 return GAL_AS2R * ( 84381.448 +
95 ( -46.8150 +
96 ( -0.00059 +
97 0.001813 * t ) * t ) * t ) ;
98
99 /*
100 * Finished.
101 */
102
103 }
104
105 /*
106 * gal - General Astrodynamics Library
107 * Copyright (C) 2008 Paul C. L. Willmott
108 *
109 * This program is free software; you can redistribute it and/or modify
110 * it under the terms of the GNU General Public License as published by
111 * the Free Software Foundation; either version 2 of the License, or
112 * (at your option) any later version.
113 *
114 * This program is distributed in the hope that it will be useful,
115 * but WITHOUT ANY WARRANTY; without even the implied warranty of
116 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
117 * GNU General Public License for more details.
118 *
119 * You should have received a copy of the GNU General Public License along
120 * with this program; if not, write to the Free Software Foundation, Inc.,
121 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
122 *
123 * Contact:
124 *
125 * Paul Willmott
126 * vp9mu@amsat.org
127 */
128