1 /*
2 * - - - - - - - - - -
3 * g a l _ p n 0 0 b
4 * - - - - - - - - - -
5 *
6 * This routine is part of the General Astrodynamics Library
7 *
8 * Description:
9 *
10 * Precession-nutation, IAU 2000B model: a multi-purpose routine,
11 * supporting classical (equinox-based) use directly and CIO-based
12 * use indirectly.
13 *
14 * This routine is an independent translation of a FORTRAN routine
15 * that is part of IAU's SOFA software collection.
16 *
17 * Status:
18 *
19 * support routine.
20 *
21 * Given:
22 *
23 * date1,date2 d TT as a 2-part Julian Date (Note 1)
24 *
25 * Returned:
26 *
27 * *dpsi,*deps d nutation (Note 2)
28 * *epsa d mean obliquity (Note 3)
29 * rb d[3][3] frame bias matrix (Note 4)
30 * rp d[3][3] bias-precession matrix (Note 5)
31 * rbp d[3][3] precession matrix (Note 6)
32 * rn d[3][3] nutation matrix (Note 7)
33 * rbpn d[3][3] GCRS-to-true matrix (Notes 8,9)
34 *
35 * Notes:
36 *
37 * 1) The TT date date1+date2 is a Julian Date, apportioned in any
38 * convenient way between the two arguments. For example,
39 * JD(TT)=2450123.7 could be expressed in any of these ways,
40 * among others:
41 *
42 * date1 date2
43 *
44 * 2450123.7 0.0 (JD method)
45 * 2451545.0 -1421.3 (J2000 method)
46 * 2400000.5 50123.2 (MJD method)
47 * 2450123.5 0.2 (date & time method)
48 *
49 * The JD method is the most natural and convenient to use in
50 * cases where the loss of several decimal digits of resolution
51 * is acceptable. The J2000 method is best matched to the way
52 * the argument is handled internally and will deliver the
53 * optimum resolution. The MJD method and the date & time methods
54 * are both good compromises between resolution and convenience.
55 *
56 * 2) The nutation components (luni-solar + planetary, IAU 2000B) in
57 * longitude and obliquity are in radians and with respect to the
58 * equinox and ecliptic of date. For more accurate results, but
59 * at the cost of increased computation, use the gal_pn00a routine.
60 * For the utmost accuracy, use the gal_pn00 routine, where the
61 * nutation components are caller-specified.
62 *
63 * 3) The mean obliquity is consistent with the IAU 2000 precession.
64 *
65 * 4) The matrix rb transforms vectors from GCRS to J2000 mean equator
66 * and equinox by applying frame bias.
67 *
68 * 5) The matrix rp transforms vectors from J2000 mean equator and
69 * equinox to mean equator and equinox of date by applying
70 * precession.
71 *
72 * 6) The matrix rbp transforms vectors from GCRS to mean equator and
73 * equinox of date by applying frame bias then precession. It is the
74 * product rp x rb.
75 *
76 * 7) The matrix rn transforms vectors from mean equator and equinox of
77 * date to true equator and equinox of date by applying the nutation
78 * (luni-solar + planetary).
79 *
80 * 8) The matrix rbpn transforms vectors from GCRS to true equator and
81 * equinox of date. It is the product rn x rbp, applying frame bias,
82 * precession and nutation in that order.
83 *
84 * 9) The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate Pole
85 * are elements [0-2][2] of the matrix rbpn.
86 *
87 * Called:
88 *
89 * gal_nut00b nutation, IAU 2000B
90 * gal_pn00 bias/precession/nutation results, IAU 2000
91 *
92 * References:
93 *
94 * Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
95 * "Expressions for the Celestial Intermediate Pole and Celestial
96 * Ephemeris Origin consistent with the IAU 2000A precession-nutation
97 * model", Astronomy & Astrophysics, 400, 1145-1154 (2003)
98 *
99 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
100 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
101 *
102 * This revision:
103 *
104 * 2007 April 11 ( c version 2008 February 4 )
105 *
106 *
107 * Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
108 *
109 *-----------------------------------------------------------------------
110 */
111
112 #include "gal_pn00b.h"
113 #include "gal_nut00b.h"
114 #include "gal_pn00.h"
115
116 void
gal_pn00b(double date1,double date2,double * dpsi,double * deps,double * epsa,double rb[3][3],double rp[3][3],double rbp[3][3],double rn[3][3],double rbpn[3][3])117 gal_pn00b
118 (
119 double date1,
120 double date2,
121 double *dpsi,
122 double *deps,
123 double *epsa,
124 double rb[3][3],
125 double rp[3][3],
126 double rbp[3][3],
127 double rn[3][3],
128 double rbpn[3][3]
129 )
130 {
131
132 /*
133 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
134 */
135
136 /*
137 * Nutation.
138 */
139
140 gal_nut00b ( date1, date2, dpsi, deps ) ;
141
142 /*
143 * Remaining results.
144 */
145
146 gal_pn00 ( date1, date2, *dpsi, *deps, epsa, rb, rp, rbp, rn, rbpn ) ;
147
148 /*
149 * Finished.
150 */
151
152 }
153
154 /*
155 * gal - General Astrodynamics Library
156 * Copyright (C) 2008 Paul C. L. Willmott
157 *
158 * This program is free software; you can redistribute it and/or modify
159 * it under the terms of the GNU General Public License as published by
160 * the Free Software Foundation; either version 2 of the License, or
161 * (at your option) any later version.
162 *
163 * This program is distributed in the hope that it will be useful,
164 * but WITHOUT ANY WARRANTY; without even the implied warranty of
165 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
166 * GNU General Public License for more details.
167 *
168 * You should have received a copy of the GNU General Public License along
169 * with this program; if not, write to the Free Software Foundation, Inc.,
170 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
171 *
172 * Contact:
173 *
174 * Paul Willmott
175 * vp9mu@amsat.org
176 */
177