1 | #include "erfa.h"
|
---|
2 |
|
---|
3 | void eraPfw06(double date1, double date2,
|
---|
4 | double *gamb, double *phib, double *psib, double *epsa)
|
---|
5 | /*
|
---|
6 | ** - - - - - - - - -
|
---|
7 | ** e r a P f w 0 6
|
---|
8 | ** - - - - - - - - -
|
---|
9 | **
|
---|
10 | ** Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
|
---|
11 | **
|
---|
12 | ** Given:
|
---|
13 | ** date1,date2 double TT as a 2-part Julian Date (Note 1)
|
---|
14 | **
|
---|
15 | ** Returned:
|
---|
16 | ** gamb double F-W angle gamma_bar (radians)
|
---|
17 | ** phib double F-W angle phi_bar (radians)
|
---|
18 | ** psib double F-W angle psi_bar (radians)
|
---|
19 | ** epsa double F-W angle epsilon_A (radians)
|
---|
20 | **
|
---|
21 | ** Notes:
|
---|
22 | **
|
---|
23 | ** 1) The TT date date1+date2 is a Julian Date, apportioned in any
|
---|
24 | ** convenient way between the two arguments. For example,
|
---|
25 | ** JD(TT)=2450123.7 could be expressed in any of these ways,
|
---|
26 | ** among others:
|
---|
27 | **
|
---|
28 | ** date1 date2
|
---|
29 | **
|
---|
30 | ** 2450123.7 0.0 (JD method)
|
---|
31 | ** 2451545.0 -1421.3 (J2000 method)
|
---|
32 | ** 2400000.5 50123.2 (MJD method)
|
---|
33 | ** 2450123.5 0.2 (date & time method)
|
---|
34 | **
|
---|
35 | ** The JD method is the most natural and convenient to use in
|
---|
36 | ** cases where the loss of several decimal digits of resolution
|
---|
37 | ** is acceptable. The J2000 method is best matched to the way
|
---|
38 | ** the argument is handled internally and will deliver the
|
---|
39 | ** optimum resolution. The MJD method and the date & time methods
|
---|
40 | ** are both good compromises between resolution and convenience.
|
---|
41 | **
|
---|
42 | ** 2) Naming the following points:
|
---|
43 | **
|
---|
44 | ** e = J2000.0 ecliptic pole,
|
---|
45 | ** p = GCRS pole,
|
---|
46 | ** E = mean ecliptic pole of date,
|
---|
47 | ** and P = mean pole of date,
|
---|
48 | **
|
---|
49 | ** the four Fukushima-Williams angles are as follows:
|
---|
50 | **
|
---|
51 | ** gamb = gamma_bar = epE
|
---|
52 | ** phib = phi_bar = pE
|
---|
53 | ** psib = psi_bar = pEP
|
---|
54 | ** epsa = epsilon_A = EP
|
---|
55 | **
|
---|
56 | ** 3) The matrix representing the combined effects of frame bias and
|
---|
57 | ** precession is:
|
---|
58 | **
|
---|
59 | ** PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
|
---|
60 | **
|
---|
61 | ** 4) The matrix representing the combined effects of frame bias,
|
---|
62 | ** precession and nutation is simply:
|
---|
63 | **
|
---|
64 | ** NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
|
---|
65 | **
|
---|
66 | ** where dP and dE are the nutation components with respect to the
|
---|
67 | ** ecliptic of date.
|
---|
68 | **
|
---|
69 | ** Reference:
|
---|
70 | **
|
---|
71 | ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
---|
72 | **
|
---|
73 | ** Called:
|
---|
74 | ** eraObl06 mean obliquity, IAU 2006
|
---|
75 | **
|
---|
76 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
77 | ** Derived, with permission, from the SOFA library. See notes at end of file.
|
---|
78 | */
|
---|
79 | {
|
---|
80 | double t;
|
---|
81 |
|
---|
82 | /* Interval between fundamental date J2000.0 and given date (JC). */
|
---|
83 | t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC;
|
---|
84 |
|
---|
85 | /* P03 bias+precession angles. */
|
---|
86 | *gamb = ( -0.052928 +
|
---|
87 | ( 10.556378 +
|
---|
88 | ( 0.4932044 +
|
---|
89 | ( -0.00031238 +
|
---|
90 | ( -0.000002788 +
|
---|
91 | ( 0.0000000260 )
|
---|
92 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
93 | *phib = ( 84381.412819 +
|
---|
94 | ( -46.811016 +
|
---|
95 | ( 0.0511268 +
|
---|
96 | ( 0.00053289 +
|
---|
97 | ( -0.000000440 +
|
---|
98 | ( -0.0000000176 )
|
---|
99 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
100 | *psib = ( -0.041775 +
|
---|
101 | ( 5038.481484 +
|
---|
102 | ( 1.5584175 +
|
---|
103 | ( -0.00018522 +
|
---|
104 | ( -0.000026452 +
|
---|
105 | ( -0.0000000148 )
|
---|
106 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
107 | *epsa = eraObl06(date1, date2);
|
---|
108 |
|
---|
109 | return;
|
---|
110 |
|
---|
111 | }
|
---|
112 | /*----------------------------------------------------------------------
|
---|
113 | **
|
---|
114 | **
|
---|
115 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
116 | ** All rights reserved.
|
---|
117 | **
|
---|
118 | ** This library is derived, with permission, from the International
|
---|
119 | ** Astronomical Union's "Standards of Fundamental Astronomy" library,
|
---|
120 | ** available from http://www.iausofa.org.
|
---|
121 | **
|
---|
122 | ** The ERFA version is intended to retain identical functionality to
|
---|
123 | ** the SOFA library, but made distinct through different function and
|
---|
124 | ** file names, as set out in the SOFA license conditions. The SOFA
|
---|
125 | ** original has a role as a reference standard for the IAU and IERS,
|
---|
126 | ** and consequently redistribution is permitted only in its unaltered
|
---|
127 | ** state. The ERFA version is not subject to this restriction and
|
---|
128 | ** therefore can be included in distributions which do not support the
|
---|
129 | ** concept of "read only" software.
|
---|
130 | **
|
---|
131 | ** Although the intent is to replicate the SOFA API (other than
|
---|
132 | ** replacement of prefix names) and results (with the exception of
|
---|
133 | ** bugs; any that are discovered will be fixed), SOFA is not
|
---|
134 | ** responsible for any errors found in this version of the library.
|
---|
135 | **
|
---|
136 | ** If you wish to acknowledge the SOFA heritage, please acknowledge
|
---|
137 | ** that you are using a library derived from SOFA, rather than SOFA
|
---|
138 | ** itself.
|
---|
139 | **
|
---|
140 | **
|
---|
141 | ** TERMS AND CONDITIONS
|
---|
142 | **
|
---|
143 | ** Redistribution and use in source and binary forms, with or without
|
---|
144 | ** modification, are permitted provided that the following conditions
|
---|
145 | ** are met:
|
---|
146 | **
|
---|
147 | ** 1 Redistributions of source code must retain the above copyright
|
---|
148 | ** notice, this list of conditions and the following disclaimer.
|
---|
149 | **
|
---|
150 | ** 2 Redistributions in binary form must reproduce the above copyright
|
---|
151 | ** notice, this list of conditions and the following disclaimer in
|
---|
152 | ** the documentation and/or other materials provided with the
|
---|
153 | ** distribution.
|
---|
154 | **
|
---|
155 | ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
|
---|
156 | ** the International Astronomical Union nor the names of its
|
---|
157 | ** contributors may be used to endorse or promote products derived
|
---|
158 | ** from this software without specific prior written permission.
|
---|
159 | **
|
---|
160 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
161 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
162 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
---|
163 | ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
---|
164 | ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
165 | ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
---|
166 | ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
167 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
---|
168 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
169 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
170 | ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
---|
171 | ** POSSIBILITY OF SUCH DAMAGE.
|
---|
172 | **
|
---|
173 | */
|
---|