line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#include "erfa.h" |
2
|
|
|
|
|
|
|
|
3
|
197
|
|
|
|
|
|
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) The present function can construct three different matrices, |
43
|
|
|
|
|
|
|
** depending on which angles are supplied as the arguments gamb, |
44
|
|
|
|
|
|
|
** phib, psi and eps: |
45
|
|
|
|
|
|
|
** |
46
|
|
|
|
|
|
|
** o To obtain the nutation x precession x frame bias matrix, |
47
|
|
|
|
|
|
|
** first generate the four precession angles known conventionally |
48
|
|
|
|
|
|
|
** as gamma_bar, phi_bar, psi_bar and epsilon_A, then generate |
49
|
|
|
|
|
|
|
** the nutation components Dpsi and Depsilon and add them to |
50
|
|
|
|
|
|
|
** psi_bar and epsilon_A, and finally call the present function |
51
|
|
|
|
|
|
|
** using those four angles as arguments. |
52
|
|
|
|
|
|
|
** |
53
|
|
|
|
|
|
|
** o To obtain the precession x frame bias matrix, generate the |
54
|
|
|
|
|
|
|
** four precession angles and call the present function. |
55
|
|
|
|
|
|
|
** |
56
|
|
|
|
|
|
|
** o To obtain the frame bias matrix, generate the four precession |
57
|
|
|
|
|
|
|
** angles for date J2000.0 and call the present function. |
58
|
|
|
|
|
|
|
** |
59
|
|
|
|
|
|
|
** The nutation-only and precession-only matrices can if necessary |
60
|
|
|
|
|
|
|
** be obtained by combining these three appropriately. |
61
|
|
|
|
|
|
|
** |
62
|
|
|
|
|
|
|
** Called: |
63
|
|
|
|
|
|
|
** eraIr initialize r-matrix to identity |
64
|
|
|
|
|
|
|
** eraRz rotate around Z-axis |
65
|
|
|
|
|
|
|
** eraRx rotate around X-axis |
66
|
|
|
|
|
|
|
** |
67
|
|
|
|
|
|
|
** References: |
68
|
|
|
|
|
|
|
** |
69
|
|
|
|
|
|
|
** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855 |
70
|
|
|
|
|
|
|
** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351 |
71
|
|
|
|
|
|
|
** |
72
|
|
|
|
|
|
|
** Copyright (C) 2013-2020, NumFOCUS Foundation. |
73
|
|
|
|
|
|
|
** Derived, with permission, from the SOFA library. See notes at end of file. |
74
|
|
|
|
|
|
|
*/ |
75
|
|
|
|
|
|
|
{ |
76
|
|
|
|
|
|
|
/* Construct the matrix. */ |
77
|
197
|
|
|
|
|
|
eraIr(r); |
78
|
197
|
|
|
|
|
|
eraRz(gamb, r); |
79
|
197
|
|
|
|
|
|
eraRx(phib, r); |
80
|
197
|
|
|
|
|
|
eraRz(-psi, r); |
81
|
197
|
|
|
|
|
|
eraRx(-eps, r); |
82
|
|
|
|
|
|
|
|
83
|
197
|
|
|
|
|
|
return; |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
/*---------------------------------------------------------------------- |
87
|
|
|
|
|
|
|
** |
88
|
|
|
|
|
|
|
** |
89
|
|
|
|
|
|
|
** Copyright (C) 2013-2020, NumFOCUS Foundation. |
90
|
|
|
|
|
|
|
** All rights reserved. |
91
|
|
|
|
|
|
|
** |
92
|
|
|
|
|
|
|
** This library is derived, with permission, from the International |
93
|
|
|
|
|
|
|
** Astronomical Union's "Standards of Fundamental Astronomy" library, |
94
|
|
|
|
|
|
|
** available from http://www.iausofa.org. |
95
|
|
|
|
|
|
|
** |
96
|
|
|
|
|
|
|
** The ERFA version is intended to retain identical functionality to |
97
|
|
|
|
|
|
|
** the SOFA library, but made distinct through different function and |
98
|
|
|
|
|
|
|
** file names, as set out in the SOFA license conditions. The SOFA |
99
|
|
|
|
|
|
|
** original has a role as a reference standard for the IAU and IERS, |
100
|
|
|
|
|
|
|
** and consequently redistribution is permitted only in its unaltered |
101
|
|
|
|
|
|
|
** state. The ERFA version is not subject to this restriction and |
102
|
|
|
|
|
|
|
** therefore can be included in distributions which do not support the |
103
|
|
|
|
|
|
|
** concept of "read only" software. |
104
|
|
|
|
|
|
|
** |
105
|
|
|
|
|
|
|
** Although the intent is to replicate the SOFA API (other than |
106
|
|
|
|
|
|
|
** replacement of prefix names) and results (with the exception of |
107
|
|
|
|
|
|
|
** bugs; any that are discovered will be fixed), SOFA is not |
108
|
|
|
|
|
|
|
** responsible for any errors found in this version of the library. |
109
|
|
|
|
|
|
|
** |
110
|
|
|
|
|
|
|
** If you wish to acknowledge the SOFA heritage, please acknowledge |
111
|
|
|
|
|
|
|
** that you are using a library derived from SOFA, rather than SOFA |
112
|
|
|
|
|
|
|
** itself. |
113
|
|
|
|
|
|
|
** |
114
|
|
|
|
|
|
|
** |
115
|
|
|
|
|
|
|
** TERMS AND CONDITIONS |
116
|
|
|
|
|
|
|
** |
117
|
|
|
|
|
|
|
** Redistribution and use in source and binary forms, with or without |
118
|
|
|
|
|
|
|
** modification, are permitted provided that the following conditions |
119
|
|
|
|
|
|
|
** are met: |
120
|
|
|
|
|
|
|
** |
121
|
|
|
|
|
|
|
** 1 Redistributions of source code must retain the above copyright |
122
|
|
|
|
|
|
|
** notice, this list of conditions and the following disclaimer. |
123
|
|
|
|
|
|
|
** |
124
|
|
|
|
|
|
|
** 2 Redistributions in binary form must reproduce the above copyright |
125
|
|
|
|
|
|
|
** notice, this list of conditions and the following disclaimer in |
126
|
|
|
|
|
|
|
** the documentation and/or other materials provided with the |
127
|
|
|
|
|
|
|
** distribution. |
128
|
|
|
|
|
|
|
** |
129
|
|
|
|
|
|
|
** 3 Neither the name of the Standards Of Fundamental Astronomy Board, |
130
|
|
|
|
|
|
|
** the International Astronomical Union nor the names of its |
131
|
|
|
|
|
|
|
** contributors may be used to endorse or promote products derived |
132
|
|
|
|
|
|
|
** from this software without specific prior written permission. |
133
|
|
|
|
|
|
|
** |
134
|
|
|
|
|
|
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
135
|
|
|
|
|
|
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
136
|
|
|
|
|
|
|
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
137
|
|
|
|
|
|
|
** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
138
|
|
|
|
|
|
|
** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
139
|
|
|
|
|
|
|
** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
140
|
|
|
|
|
|
|
** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
141
|
|
|
|
|
|
|
** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
142
|
|
|
|
|
|
|
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
143
|
|
|
|
|
|
|
** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
144
|
|
|
|
|
|
|
** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
145
|
|
|
|
|
|
|
** POSSIBILITY OF SUCH DAMAGE. |
146
|
|
|
|
|
|
|
** |
147
|
|
|
|
|
|
|
*/ |