1 /*
2 * - - - - - - - - - -
3 * g a l _ n u m a t
4 * - - - - - - - - - -
5 *
6 * This routine is part of the General Astrodynamics Library
7 *
8 * Description:
9 *
10 * Form the matrix of nutation.
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 * support routine.
18 *
19 * Given:
20 *
21 * epsa d mean obliquity of date (Note 1)
22 * dpsi,deps d nutation (Note 2)
23 *
24 * Returned:
25 *
26 * rmatn d[3][3] nutation matrix (Note 3)
27 *
28 * Notes:
29 *
30 *
31 * 1) The supplied mean obliquity epsa, must be consistent with the
32 * precession-nutation models from which dpsi and deps were obtained.
33 *
34 * 2) The caller is responsible for providing the nutation components;
35 * they are in longitude and obliquity, in radians and are with
36 * respect to the equinox and ecliptic of date.
37 *
38 * 3) The matrix operates in the sense V(true) = rmatn * V(mean),
39 * where the p-vector V(true) is with respect to the true
40 * equatorial triad of date and the p-vector V(mean) is with
41 * respect to the mean equatorial triad of date.
42 *
43 * Called:
44 *
45 * gal_ir initialize r-matrix to identity
46 * gal_rx rotate around X-axis
47 * gal_rz rotate around Z-axis
48 *
49 * References:
50 *
51 * Explanatory Supplement to the Astronomical Almanac,
52 * P. Kenneth Seidelmann (ed), University Science Books (1992),
53 * Section 3.222-3 (p114).
54 *
55 * This revision:
56 *
57 * 2006 November 13 ( c version 2008 February 4 )
58 *
59 *
60 * Copyright (C) 2008 Paul C. L. Willmott. See notes at end.
61 *
62 *-----------------------------------------------------------------------
63 */
64
65 #include "gal_numat.h"
66 #include "gal_ir.h"
67 #include "gal_rx.h"
68 #include "gal_rz.h"
69
70 void
gal_numat(double epsa,double dpsi,double deps,double rmatn[3][3])71 gal_numat
72 (
73 double epsa,
74 double dpsi,
75 double deps,
76 double rmatn[3][3]
77 )
78 {
79
80 /*
81 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
82 */
83
84 /*
85 * Build the rotation matrix.
86 */
87
88 gal_ir ( rmatn ) ;
89 gal_rx ( epsa, rmatn ) ;
90 gal_rz ( -dpsi, rmatn ) ;
91 gal_rx ( -( epsa + deps ), rmatn ) ;
92
93 /*
94 * Finished.
95 */
96
97 }
98
99 /*
100 * gal - General Astrodynamics Library
101 * Copyright (C) 2008 Paul C. L. Willmott
102 *
103 * This program is free software; you can redistribute it and/or modify
104 * it under the terms of the GNU General Public License as published by
105 * the Free Software Foundation; either version 2 of the License, or
106 * (at your option) any later version.
107 *
108 * This program is distributed in the hope that it will be useful,
109 * but WITHOUT ANY WARRANTY; without even the implied warranty of
110 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111 * GNU General Public License for more details.
112 *
113 * You should have received a copy of the GNU General Public License along
114 * with this program; if not, write to the Free Software Foundation, Inc.,
115 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
116 *
117 * Contact:
118 *
119 * Paul Willmott
120 * vp9mu@amsat.org
121 */
122