source: branches/FACT++_part_filenames/erfa/src/p06e.c@ 18732

Last change on this file since 18732 was 18711, checked in by tbretz, 8 years ago
Updated to ERFA 1.3.0 (no relevant code change except the leap second at the beginning of 2017)
File size: 11.9 KB
Line 
1#include "erfa.h"
2
3void 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-2016, NumFOCUS Foundation.
124** Derived, with permission, from the SOFA library. See notes at end of file.
125*/
126{
127 double t;
128
129
130/* Interval between fundamental date J2000.0 and given date (JC). */
131 t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC;
132
133/* Obliquity at J2000.0. */
134
135 *eps0 = 84381.406 * ERFA_DAS2R;
136
137/* Luni-solar precession. */
138
139 *psia = ( 5038.481507 +
140 ( -1.0790069 +
141 ( -0.00114045 +
142 ( 0.000132851 +
143 ( -0.0000000951 )
144 * t) * t) * t) * t) * t * ERFA_DAS2R;
145
146/* Inclination of mean equator with respect to the J2000.0 ecliptic. */
147
148 *oma = *eps0 + ( -0.025754 +
149 ( 0.0512623 +
150 ( -0.00772503 +
151 ( -0.000000467 +
152 ( 0.0000003337 )
153 * t) * t) * t) * t) * t * ERFA_DAS2R;
154
155/* Ecliptic pole x, J2000.0 ecliptic triad. */
156
157 *bpa = ( 4.199094 +
158 ( 0.1939873 +
159 ( -0.00022466 +
160 ( -0.000000912 +
161 ( 0.0000000120 )
162 * t) * t) * t) * t) * t * ERFA_DAS2R;
163
164/* Ecliptic pole -y, J2000.0 ecliptic triad. */
165
166 *bqa = ( -46.811015 +
167 ( 0.0510283 +
168 ( 0.00052413 +
169 ( -0.000000646 +
170 ( -0.0000000172 )
171 * t) * t) * t) * t) * t * ERFA_DAS2R;
172
173/* Angle between moving and J2000.0 ecliptics. */
174
175 *pia = ( 46.998973 +
176 ( -0.0334926 +
177 ( -0.00012559 +
178 ( 0.000000113 +
179 ( -0.0000000022 )
180 * t) * t) * t) * t) * t * ERFA_DAS2R;
181
182/* Longitude of ascending node of the moving ecliptic. */
183
184 *bpia = ( 629546.7936 +
185 ( -867.95758 +
186 ( 0.157992 +
187 ( -0.0005371 +
188 ( -0.00004797 +
189 ( 0.000000072 )
190 * t) * t) * t) * t) * t) * ERFA_DAS2R;
191
192/* Mean obliquity of the ecliptic. */
193
194 *epsa = eraObl06(date1, date2);
195
196/* Planetary precession. */
197
198 *chia = ( 10.556403 +
199 ( -2.3814292 +
200 ( -0.00121197 +
201 ( 0.000170663 +
202 ( -0.0000000560 )
203 * t) * t) * t) * t) * t * ERFA_DAS2R;
204
205/* Equatorial precession: minus the third of the 323 Euler angles. */
206
207 *za = ( -2.650545 +
208 ( 2306.077181 +
209 ( 1.0927348 +
210 ( 0.01826837 +
211 ( -0.000028596 +
212 ( -0.0000002904 )
213 * t) * t) * t) * t) * t) * ERFA_DAS2R;
214
215/* Equatorial precession: minus the first of the 323 Euler angles. */
216
217 *zetaa = ( 2.650545 +
218 ( 2306.083227 +
219 ( 0.2988499 +
220 ( 0.01801828 +
221 ( -0.000005971 +
222 ( -0.0000003173 )
223 * t) * t) * t) * t) * t) * ERFA_DAS2R;
224
225/* Equatorial precession: second of the 323 Euler angles. */
226
227 *thetaa = ( 2004.191903 +
228 ( -0.4294934 +
229 ( -0.04182264 +
230 ( -0.000007089 +
231 ( -0.0000001274 )
232 * t) * t) * t) * t) * t * ERFA_DAS2R;
233
234/* General precession. */
235
236 *pa = ( 5028.796195 +
237 ( 1.1054348 +
238 ( 0.00007964 +
239 ( -0.000023857 +
240 ( 0.0000000383 )
241 * t) * t) * t) * t) * t * ERFA_DAS2R;
242
243/* Fukushima-Williams angles for precession. */
244
245 *gam = ( 10.556403 +
246 ( 0.4932044 +
247 ( -0.00031238 +
248 ( -0.000002788 +
249 ( 0.0000000260 )
250 * t) * t) * t) * t) * t * ERFA_DAS2R;
251
252 *phi = *eps0 + ( -46.811015 +
253 ( 0.0511269 +
254 ( 0.00053289 +
255 ( -0.000000440 +
256 ( -0.0000000176 )
257 * t) * t) * t) * t) * t * ERFA_DAS2R;
258
259 *psi = ( 5038.481507 +
260 ( 1.5584176 +
261 ( -0.00018522 +
262 ( -0.000026452 +
263 ( -0.0000000148 )
264 * t) * t) * t) * t) * t * ERFA_DAS2R;
265
266 return;
267
268}
269/*----------------------------------------------------------------------
270**
271**
272** Copyright (C) 2013-2016, NumFOCUS Foundation.
273** All rights reserved.
274**
275** This library is derived, with permission, from the International
276** Astronomical Union's "Standards of Fundamental Astronomy" library,
277** available from http://www.iausofa.org.
278**
279** The ERFA version is intended to retain identical functionality to
280** the SOFA library, but made distinct through different function and
281** file names, as set out in the SOFA license conditions. The SOFA
282** original has a role as a reference standard for the IAU and IERS,
283** and consequently redistribution is permitted only in its unaltered
284** state. The ERFA version is not subject to this restriction and
285** therefore can be included in distributions which do not support the
286** concept of "read only" software.
287**
288** Although the intent is to replicate the SOFA API (other than
289** replacement of prefix names) and results (with the exception of
290** bugs; any that are discovered will be fixed), SOFA is not
291** responsible for any errors found in this version of the library.
292**
293** If you wish to acknowledge the SOFA heritage, please acknowledge
294** that you are using a library derived from SOFA, rather than SOFA
295** itself.
296**
297**
298** TERMS AND CONDITIONS
299**
300** Redistribution and use in source and binary forms, with or without
301** modification, are permitted provided that the following conditions
302** are met:
303**
304** 1 Redistributions of source code must retain the above copyright
305** notice, this list of conditions and the following disclaimer.
306**
307** 2 Redistributions in binary form must reproduce the above copyright
308** notice, this list of conditions and the following disclaimer in
309** the documentation and/or other materials provided with the
310** distribution.
311**
312** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
313** the International Astronomical Union nor the names of its
314** contributors may be used to endorse or promote products derived
315** from this software without specific prior written permission.
316**
317** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
318** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
319** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
320** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
321** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
322** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
323** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
324** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
325** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
326** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
327** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
328** POSSIBILITY OF SUCH DAMAGE.
329**
330*/
Note: See TracBrowser for help on using the repository browser.