1 /*
2  *  - - - - - - - - - - -
3  *   g a l _ p n m 0 0 b
4  *  - - - - - - - - - - -
5  *
6  *  This routine is part of the General Astrodynamics Library
7  *
8  *  Description:
9  *
10  *  Form the matrix of precession-nutation for a given date (including
11  *  frame bias), equinox-based, IAU 2000B model.
12  *
13  *  This routine is an independent translation of a FORTRAN routine
14  *  that is part of IAU's SOFA software collection.
15  *
16  *  Status:
17  *
18  *     support routine.
19  *
20  *  Given:
21  *
22  *     date1,date2         d        TT as a 2-part Julian Date (Note 1)
23  *
24  *  Returned:
25  *
26  *     rbpn             d[3][3]     bias-precession-nutation matrix (Note 2)
27  *
28  *  Notes:
29  *
30  *  1) The TT date date1+date2 is a Julian Date, apportioned in any
31  *     convenient way between the two arguments.  For example,
32  *     JD(TT)=2450123.7 could be expressed in any of these ways,
33  *     among others:
34  *
35  *            date1         date2
36  *
37  *         2450123.7          0.0        (JD method)
38  *         2451545.0      -1421.3        (J2000 method)
39  *         2400000.5      50123.2        (MJD method)
40  *         2450123.5          0.2        (date & time method)
41  *
42  *     The JD method is the most natural and convenient to use in
43  *     cases where the loss of several decimal digits of resolution
44  *     is acceptable.  The J2000 method is best matched to the way
45  *     the argument is handled internally and will deliver the
46  *     optimum resolution.  The MJD method and the date & time methods
47  *     are both good compromises between resolution and convenience.
48  *
49  *  2) The matrix operates in the sense V(date) = rbpn * V(GCRS), where
50  *     the p-vector V(date) is with respect to the true equatorial triad
51  *     of date date1+date2 and the p-vector V(J2000) is with respect to
52  *     the mean equatorial triad of the Geocentric Celestial Reference
53  *     System (IAU, 2000).
54  *
55  *  3) The present routine is faster, but slightly less accurate (about
56  *     1 mas), than the gal_pnm00a routine.
57  *
58  *  Called:
59  *
60  *     gal_pn00b          bias/precession/nutation, IAU 2000B
61  *
62  *  References:
63  *
64  *     IAU: Trans. International Astronomical Union, Vol. XXIVB;  Proc.
65  *     24th General Assembly, Manchester, UK.  Resolutions B1.3, B1.6.
66  *     (2000)
67  *
68  *  This revision:
69  *
70  *     2006 November 13 ( c version 2008 February 4 )
71  *
72  *
73  *  Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
74  *
75  *-----------------------------------------------------------------------
76  */
77 
78 #include "gal_pnm00b.h"
79 #include "gal_pn00b.h"
80 
81 void
gal_pnm00b(double date1,double date2,double rbpn[3][3])82 gal_pnm00b
83  (
84     double date1,
85     double date2,
86     double rbpn[3][3]
87  )
88 {
89 
90     double dpsi, deps, epsa , rb[3][3], rp[3][3], rbp[3][3], rn[3][3] ;
91 
92 /*
93  * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
94  */
95 
96 /*
97  * Obtain the required matrix (discarding other results).
98  */
99 
100     gal_pn00b ( date1, date2, &dpsi, &deps, &epsa, rb, rp, rbp, rn, rbpn ) ;
101 
102 /*
103  * Finished.
104  */
105 
106 }
107 
108 /*
109  *  gal - General Astrodynamics Library
110  *  Copyright (C) 2008 Paul C. L. Willmott
111  *
112  *  This program is free software; you can redistribute it and/or modify
113  *  it under the terms of the GNU General Public License as published by
114  *  the Free Software Foundation; either version 2 of the License, or
115  *  (at your option) any later version.
116  *
117  *  This program is distributed in the hope that it will be useful,
118  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
119  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
120  *  GNU General Public License for more details.
121  *
122  *  You should have received a copy of the GNU General Public License along
123  *  with this program; if not, write to the Free Software Foundation, Inc.,
124  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
125  *
126  *  Contact:
127  *
128  *  Paul Willmott
129  *  vp9mu@amsat.org
130  */
131