1 | #include "erfa.h"
|
---|
2 |
|
---|
3 | void eraFw2m(double gamb, double phib, double psi, double eps,
|
---|
4 | double r[3][3])
|
---|
5 | /*
|
---|
6 | ** - - - - - - - -
|
---|
7 | ** e r a F w 2 m
|
---|
8 | ** - - - - - - - -
|
---|
9 | **
|
---|
10 | ** Form rotation matrix given the Fukushima-Williams angles.
|
---|
11 | **
|
---|
12 | ** Given:
|
---|
13 | ** gamb double F-W angle gamma_bar (radians)
|
---|
14 | ** phib double F-W angle phi_bar (radians)
|
---|
15 | ** psi double F-W angle psi (radians)
|
---|
16 | ** eps double F-W angle epsilon (radians)
|
---|
17 | **
|
---|
18 | ** Returned:
|
---|
19 | ** r double[3][3] rotation matrix
|
---|
20 | **
|
---|
21 | ** Notes:
|
---|
22 | **
|
---|
23 | ** 1) Naming the following points:
|
---|
24 | **
|
---|
25 | ** e = J2000.0 ecliptic pole,
|
---|
26 | ** p = GCRS pole,
|
---|
27 | ** E = ecliptic pole of date,
|
---|
28 | ** and P = CIP,
|
---|
29 | **
|
---|
30 | ** the four Fukushima-Williams angles are as follows:
|
---|
31 | **
|
---|
32 | ** gamb = gamma = epE
|
---|
33 | ** phib = phi = pE
|
---|
34 | ** psi = psi = pEP
|
---|
35 | ** eps = epsilon = EP
|
---|
36 | **
|
---|
37 | ** 2) The matrix representing the combined effects of frame bias,
|
---|
38 | ** precession and nutation is:
|
---|
39 | **
|
---|
40 | ** NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
|
---|
41 | **
|
---|
42 | ** 3) Three different matrices can be constructed, depending on the
|
---|
43 | ** supplied angles:
|
---|
44 | **
|
---|
45 | ** o To obtain the nutation x precession x frame bias matrix,
|
---|
46 | ** generate the four precession angles, generate the nutation
|
---|
47 | ** components and add them to the psi_bar and epsilon_A angles,
|
---|
48 | ** and call the present function.
|
---|
49 | **
|
---|
50 | ** o To obtain the precession x frame bias matrix, generate the
|
---|
51 | ** four precession angles and call the present function.
|
---|
52 | **
|
---|
53 | ** o To obtain the frame bias matrix, generate the four precession
|
---|
54 | ** angles for date J2000.0 and call the present function.
|
---|
55 | **
|
---|
56 | ** The nutation-only and precession-only matrices can if necessary
|
---|
57 | ** be obtained by combining these three appropriately.
|
---|
58 | **
|
---|
59 | ** Called:
|
---|
60 | ** eraIr initialize r-matrix to identity
|
---|
61 | ** eraRz rotate around Z-axis
|
---|
62 | ** eraRx rotate around X-axis
|
---|
63 | **
|
---|
64 | ** Reference:
|
---|
65 | **
|
---|
66 | ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
---|
67 | **
|
---|
68 | ** Copyright (C) 2013-2017, NumFOCUS Foundation.
|
---|
69 | ** Derived, with permission, from the SOFA library. See notes at end of file.
|
---|
70 | */
|
---|
71 | {
|
---|
72 | /* Construct the matrix. */
|
---|
73 | eraIr(r);
|
---|
74 | eraRz(gamb, r);
|
---|
75 | eraRx(phib, r);
|
---|
76 | eraRz(-psi, r);
|
---|
77 | eraRx(-eps, r);
|
---|
78 |
|
---|
79 | return;
|
---|
80 |
|
---|
81 | }
|
---|
82 | /*----------------------------------------------------------------------
|
---|
83 | **
|
---|
84 | **
|
---|
85 | ** Copyright (C) 2013-2017, NumFOCUS Foundation.
|
---|
86 | ** All rights reserved.
|
---|
87 | **
|
---|
88 | ** This library is derived, with permission, from the International
|
---|
89 | ** Astronomical Union's "Standards of Fundamental Astronomy" library,
|
---|
90 | ** available from http://www.iausofa.org.
|
---|
91 | **
|
---|
92 | ** The ERFA version is intended to retain identical functionality to
|
---|
93 | ** the SOFA library, but made distinct through different function and
|
---|
94 | ** file names, as set out in the SOFA license conditions. The SOFA
|
---|
95 | ** original has a role as a reference standard for the IAU and IERS,
|
---|
96 | ** and consequently redistribution is permitted only in its unaltered
|
---|
97 | ** state. The ERFA version is not subject to this restriction and
|
---|
98 | ** therefore can be included in distributions which do not support the
|
---|
99 | ** concept of "read only" software.
|
---|
100 | **
|
---|
101 | ** Although the intent is to replicate the SOFA API (other than
|
---|
102 | ** replacement of prefix names) and results (with the exception of
|
---|
103 | ** bugs; any that are discovered will be fixed), SOFA is not
|
---|
104 | ** responsible for any errors found in this version of the library.
|
---|
105 | **
|
---|
106 | ** If you wish to acknowledge the SOFA heritage, please acknowledge
|
---|
107 | ** that you are using a library derived from SOFA, rather than SOFA
|
---|
108 | ** itself.
|
---|
109 | **
|
---|
110 | **
|
---|
111 | ** TERMS AND CONDITIONS
|
---|
112 | **
|
---|
113 | ** Redistribution and use in source and binary forms, with or without
|
---|
114 | ** modification, are permitted provided that the following conditions
|
---|
115 | ** are met:
|
---|
116 | **
|
---|
117 | ** 1 Redistributions of source code must retain the above copyright
|
---|
118 | ** notice, this list of conditions and the following disclaimer.
|
---|
119 | **
|
---|
120 | ** 2 Redistributions in binary form must reproduce the above copyright
|
---|
121 | ** notice, this list of conditions and the following disclaimer in
|
---|
122 | ** the documentation and/or other materials provided with the
|
---|
123 | ** distribution.
|
---|
124 | **
|
---|
125 | ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
|
---|
126 | ** the International Astronomical Union nor the names of its
|
---|
127 | ** contributors may be used to endorse or promote products derived
|
---|
128 | ** from this software without specific prior written permission.
|
---|
129 | **
|
---|
130 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
131 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
132 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
---|
133 | ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
---|
134 | ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
135 | ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
---|
136 | ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
137 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
---|
138 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
139 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
140 | ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
---|
141 | ** POSSIBILITY OF SUCH DAMAGE.
|
---|
142 | **
|
---|
143 | */
|
---|