1 | #include "erfa.h"
|
---|
2 |
|
---|
3 | void eraP06e(double date1, double date2,
|
---|
4 | double *eps0, double *psia, double *oma, double *bpa,
|
---|
5 | double *bqa, double *pia, double *bpia,
|
---|
6 | double *epsa, double *chia, double *za, double *zetaa,
|
---|
7 | double *thetaa, double *pa,
|
---|
8 | double *gam, double *phi, double *psi)
|
---|
9 | /*
|
---|
10 | ** - - - - - - - -
|
---|
11 | ** e r a P 0 6 e
|
---|
12 | ** - - - - - - - -
|
---|
13 | **
|
---|
14 | ** Precession angles, IAU 2006, equinox based.
|
---|
15 | **
|
---|
16 | ** Given:
|
---|
17 | ** date1,date2 double TT as a 2-part Julian Date (Note 1)
|
---|
18 | **
|
---|
19 | ** Returned (see Note 2):
|
---|
20 | ** eps0 double epsilon_0
|
---|
21 | ** psia double psi_A
|
---|
22 | ** oma double omega_A
|
---|
23 | ** bpa double P_A
|
---|
24 | ** bqa double Q_A
|
---|
25 | ** pia double pi_A
|
---|
26 | ** bpia double Pi_A
|
---|
27 | ** epsa double obliquity epsilon_A
|
---|
28 | ** chia double chi_A
|
---|
29 | ** za double z_A
|
---|
30 | ** zetaa double zeta_A
|
---|
31 | ** thetaa double theta_A
|
---|
32 | ** pa double p_A
|
---|
33 | ** gam double F-W angle gamma_J2000
|
---|
34 | ** phi double F-W angle phi_J2000
|
---|
35 | ** psi double F-W angle psi_J2000
|
---|
36 | **
|
---|
37 | ** Notes:
|
---|
38 | **
|
---|
39 | ** 1) The TT date date1+date2 is a Julian Date, apportioned in any
|
---|
40 | ** convenient way between the two arguments. For example,
|
---|
41 | ** JD(TT)=2450123.7 could be expressed in any of these ways,
|
---|
42 | ** among others:
|
---|
43 | **
|
---|
44 | ** date1 date2
|
---|
45 | **
|
---|
46 | ** 2450123.7 0.0 (JD method)
|
---|
47 | ** 2451545.0 -1421.3 (J2000 method)
|
---|
48 | ** 2400000.5 50123.2 (MJD method)
|
---|
49 | ** 2450123.5 0.2 (date & time method)
|
---|
50 | **
|
---|
51 | ** The JD method is the most natural and convenient to use in
|
---|
52 | ** cases where the loss of several decimal digits of resolution
|
---|
53 | ** is acceptable. The J2000 method is best matched to the way
|
---|
54 | ** the argument is handled internally and will deliver the
|
---|
55 | ** optimum resolution. The MJD method and the date & time methods
|
---|
56 | ** are both good compromises between resolution and convenience.
|
---|
57 | **
|
---|
58 | ** 2) This function returns the set of equinox based angles for the
|
---|
59 | ** Capitaine et al. "P03" precession theory, adopted by the IAU in
|
---|
60 | ** 2006. The angles are set out in Table 1 of Hilton et al. (2006):
|
---|
61 | **
|
---|
62 | ** eps0 epsilon_0 obliquity at J2000.0
|
---|
63 | ** psia psi_A luni-solar precession
|
---|
64 | ** oma omega_A inclination of equator wrt J2000.0 ecliptic
|
---|
65 | ** bpa P_A ecliptic pole x, J2000.0 ecliptic triad
|
---|
66 | ** bqa Q_A ecliptic pole -y, J2000.0 ecliptic triad
|
---|
67 | ** pia pi_A angle between moving and J2000.0 ecliptics
|
---|
68 | ** bpia Pi_A longitude of ascending node of the ecliptic
|
---|
69 | ** epsa epsilon_A obliquity of the ecliptic
|
---|
70 | ** chia chi_A planetary precession
|
---|
71 | ** za z_A equatorial precession: -3rd 323 Euler angle
|
---|
72 | ** zetaa zeta_A equatorial precession: -1st 323 Euler angle
|
---|
73 | ** thetaa theta_A equatorial precession: 2nd 323 Euler angle
|
---|
74 | ** pa p_A general precession
|
---|
75 | ** gam gamma_J2000 J2000.0 RA difference of ecliptic poles
|
---|
76 | ** phi phi_J2000 J2000.0 codeclination of ecliptic pole
|
---|
77 | ** psi psi_J2000 longitude difference of equator poles, J2000.0
|
---|
78 | **
|
---|
79 | ** The returned values are all radians.
|
---|
80 | **
|
---|
81 | ** 3) Hilton et al. (2006) Table 1 also contains angles that depend on
|
---|
82 | ** models distinct from the P03 precession theory itself, namely the
|
---|
83 | ** IAU 2000A frame bias and nutation. The quoted polynomials are
|
---|
84 | ** used in other ERFA functions:
|
---|
85 | **
|
---|
86 | ** . eraXy06 contains the polynomial parts of the X and Y series.
|
---|
87 | **
|
---|
88 | ** . eraS06 contains the polynomial part of the s+XY/2 series.
|
---|
89 | **
|
---|
90 | ** . eraPfw06 implements the series for the Fukushima-Williams
|
---|
91 | ** angles that are with respect to the GCRS pole (i.e. the variants
|
---|
92 | ** that include frame bias).
|
---|
93 | **
|
---|
94 | ** 4) The IAU resolution stipulated that the choice of parameterization
|
---|
95 | ** was left to the user, and so an IAU compliant precession
|
---|
96 | ** implementation can be constructed using various combinations of
|
---|
97 | ** the angles returned by the present function.
|
---|
98 | **
|
---|
99 | ** 5) The parameterization used by ERFA is the version of the Fukushima-
|
---|
100 | ** Williams angles that refers directly to the GCRS pole. These
|
---|
101 | ** angles may be calculated by calling the function eraPfw06. ERFA
|
---|
102 | ** also supports the direct computation of the CIP GCRS X,Y by
|
---|
103 | ** series, available by calling eraXy06.
|
---|
104 | **
|
---|
105 | ** 6) The agreement between the different parameterizations is at the
|
---|
106 | ** 1 microarcsecond level in the present era.
|
---|
107 | **
|
---|
108 | ** 7) When constructing a precession formulation that refers to the GCRS
|
---|
109 | ** pole rather than the dynamical pole, it may (depending on the
|
---|
110 | ** choice of angles) be necessary to introduce the frame bias
|
---|
111 | ** explicitly.
|
---|
112 | **
|
---|
113 | ** 8) It is permissible to re-use the same variable in the returned
|
---|
114 | ** arguments. The quantities are stored in the stated order.
|
---|
115 | **
|
---|
116 | ** Reference:
|
---|
117 | **
|
---|
118 | ** Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
|
---|
119 | **
|
---|
120 | ** Called:
|
---|
121 | ** eraObl06 mean obliquity, IAU 2006
|
---|
122 | **
|
---|
123 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
124 | ** Derived, with permission, from the SOFA library. See notes at end of file.
|
---|
125 | */
|
---|
126 | {
|
---|
127 | double t;
|
---|
128 |
|
---|
129 | /* Interval between fundamental date J2000.0 and given date (JC). */
|
---|
130 | t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC;
|
---|
131 |
|
---|
132 | /* Obliquity at J2000.0. */
|
---|
133 |
|
---|
134 | *eps0 = 84381.406 * ERFA_DAS2R;
|
---|
135 |
|
---|
136 | /* Luni-solar precession. */
|
---|
137 |
|
---|
138 | *psia = ( 5038.481507 +
|
---|
139 | ( -1.0790069 +
|
---|
140 | ( -0.00114045 +
|
---|
141 | ( 0.000132851 +
|
---|
142 | ( -0.0000000951 )
|
---|
143 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
144 |
|
---|
145 | /* Inclination of mean equator with respect to the J2000.0 ecliptic. */
|
---|
146 |
|
---|
147 | *oma = *eps0 + ( -0.025754 +
|
---|
148 | ( 0.0512623 +
|
---|
149 | ( -0.00772503 +
|
---|
150 | ( -0.000000467 +
|
---|
151 | ( 0.0000003337 )
|
---|
152 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
153 |
|
---|
154 | /* Ecliptic pole x, J2000.0 ecliptic triad. */
|
---|
155 |
|
---|
156 | *bpa = ( 4.199094 +
|
---|
157 | ( 0.1939873 +
|
---|
158 | ( -0.00022466 +
|
---|
159 | ( -0.000000912 +
|
---|
160 | ( 0.0000000120 )
|
---|
161 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
162 |
|
---|
163 | /* Ecliptic pole -y, J2000.0 ecliptic triad. */
|
---|
164 |
|
---|
165 | *bqa = ( -46.811015 +
|
---|
166 | ( 0.0510283 +
|
---|
167 | ( 0.00052413 +
|
---|
168 | ( -0.000000646 +
|
---|
169 | ( -0.0000000172 )
|
---|
170 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
171 |
|
---|
172 | /* Angle between moving and J2000.0 ecliptics. */
|
---|
173 |
|
---|
174 | *pia = ( 46.998973 +
|
---|
175 | ( -0.0334926 +
|
---|
176 | ( -0.00012559 +
|
---|
177 | ( 0.000000113 +
|
---|
178 | ( -0.0000000022 )
|
---|
179 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
180 |
|
---|
181 | /* Longitude of ascending node of the moving ecliptic. */
|
---|
182 |
|
---|
183 | *bpia = ( 629546.7936 +
|
---|
184 | ( -867.95758 +
|
---|
185 | ( 0.157992 +
|
---|
186 | ( -0.0005371 +
|
---|
187 | ( -0.00004797 +
|
---|
188 | ( 0.000000072 )
|
---|
189 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
190 |
|
---|
191 | /* Mean obliquity of the ecliptic. */
|
---|
192 |
|
---|
193 | *epsa = eraObl06(date1, date2);
|
---|
194 |
|
---|
195 | /* Planetary precession. */
|
---|
196 |
|
---|
197 | *chia = ( 10.556403 +
|
---|
198 | ( -2.3814292 +
|
---|
199 | ( -0.00121197 +
|
---|
200 | ( 0.000170663 +
|
---|
201 | ( -0.0000000560 )
|
---|
202 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
203 |
|
---|
204 | /* Equatorial precession: minus the third of the 323 Euler angles. */
|
---|
205 |
|
---|
206 | *za = ( -2.650545 +
|
---|
207 | ( 2306.077181 +
|
---|
208 | ( 1.0927348 +
|
---|
209 | ( 0.01826837 +
|
---|
210 | ( -0.000028596 +
|
---|
211 | ( -0.0000002904 )
|
---|
212 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
213 |
|
---|
214 | /* Equatorial precession: minus the first of the 323 Euler angles. */
|
---|
215 |
|
---|
216 | *zetaa = ( 2.650545 +
|
---|
217 | ( 2306.083227 +
|
---|
218 | ( 0.2988499 +
|
---|
219 | ( 0.01801828 +
|
---|
220 | ( -0.000005971 +
|
---|
221 | ( -0.0000003173 )
|
---|
222 | * t) * t) * t) * t) * t) * ERFA_DAS2R;
|
---|
223 |
|
---|
224 | /* Equatorial precession: second of the 323 Euler angles. */
|
---|
225 |
|
---|
226 | *thetaa = ( 2004.191903 +
|
---|
227 | ( -0.4294934 +
|
---|
228 | ( -0.04182264 +
|
---|
229 | ( -0.000007089 +
|
---|
230 | ( -0.0000001274 )
|
---|
231 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
232 |
|
---|
233 | /* General precession. */
|
---|
234 |
|
---|
235 | *pa = ( 5028.796195 +
|
---|
236 | ( 1.1054348 +
|
---|
237 | ( 0.00007964 +
|
---|
238 | ( -0.000023857 +
|
---|
239 | ( 0.0000000383 )
|
---|
240 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
241 |
|
---|
242 | /* Fukushima-Williams angles for precession. */
|
---|
243 |
|
---|
244 | *gam = ( 10.556403 +
|
---|
245 | ( 0.4932044 +
|
---|
246 | ( -0.00031238 +
|
---|
247 | ( -0.000002788 +
|
---|
248 | ( 0.0000000260 )
|
---|
249 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
250 |
|
---|
251 | *phi = *eps0 + ( -46.811015 +
|
---|
252 | ( 0.0511269 +
|
---|
253 | ( 0.00053289 +
|
---|
254 | ( -0.000000440 +
|
---|
255 | ( -0.0000000176 )
|
---|
256 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
257 |
|
---|
258 | *psi = ( 5038.481507 +
|
---|
259 | ( 1.5584176 +
|
---|
260 | ( -0.00018522 +
|
---|
261 | ( -0.000026452 +
|
---|
262 | ( -0.0000000148 )
|
---|
263 | * t) * t) * t) * t) * t * ERFA_DAS2R;
|
---|
264 |
|
---|
265 | return;
|
---|
266 |
|
---|
267 | }
|
---|
268 | /*----------------------------------------------------------------------
|
---|
269 | **
|
---|
270 | **
|
---|
271 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
272 | ** All rights reserved.
|
---|
273 | **
|
---|
274 | ** This library is derived, with permission, from the International
|
---|
275 | ** Astronomical Union's "Standards of Fundamental Astronomy" library,
|
---|
276 | ** available from http://www.iausofa.org.
|
---|
277 | **
|
---|
278 | ** The ERFA version is intended to retain identical functionality to
|
---|
279 | ** the SOFA library, but made distinct through different function and
|
---|
280 | ** file names, as set out in the SOFA license conditions. The SOFA
|
---|
281 | ** original has a role as a reference standard for the IAU and IERS,
|
---|
282 | ** and consequently redistribution is permitted only in its unaltered
|
---|
283 | ** state. The ERFA version is not subject to this restriction and
|
---|
284 | ** therefore can be included in distributions which do not support the
|
---|
285 | ** concept of "read only" software.
|
---|
286 | **
|
---|
287 | ** Although the intent is to replicate the SOFA API (other than
|
---|
288 | ** replacement of prefix names) and results (with the exception of
|
---|
289 | ** bugs; any that are discovered will be fixed), SOFA is not
|
---|
290 | ** responsible for any errors found in this version of the library.
|
---|
291 | **
|
---|
292 | ** If you wish to acknowledge the SOFA heritage, please acknowledge
|
---|
293 | ** that you are using a library derived from SOFA, rather than SOFA
|
---|
294 | ** itself.
|
---|
295 | **
|
---|
296 | **
|
---|
297 | ** TERMS AND CONDITIONS
|
---|
298 | **
|
---|
299 | ** Redistribution and use in source and binary forms, with or without
|
---|
300 | ** modification, are permitted provided that the following conditions
|
---|
301 | ** are met:
|
---|
302 | **
|
---|
303 | ** 1 Redistributions of source code must retain the above copyright
|
---|
304 | ** notice, this list of conditions and the following disclaimer.
|
---|
305 | **
|
---|
306 | ** 2 Redistributions in binary form must reproduce the above copyright
|
---|
307 | ** notice, this list of conditions and the following disclaimer in
|
---|
308 | ** the documentation and/or other materials provided with the
|
---|
309 | ** distribution.
|
---|
310 | **
|
---|
311 | ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
|
---|
312 | ** the International Astronomical Union nor the names of its
|
---|
313 | ** contributors may be used to endorse or promote products derived
|
---|
314 | ** from this software without specific prior written permission.
|
---|
315 | **
|
---|
316 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
317 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
318 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
---|
319 | ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
---|
320 | ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
321 | ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
---|
322 | ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
323 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
---|
324 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
325 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
326 | ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
---|
327 | ** POSSIBILITY OF SUCH DAMAGE.
|
---|
328 | **
|
---|
329 | */
|
---|