source: trunk/FACT++/erfa/src/pfw06.c@ 18711

Last change on this file since 18711 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: 6.4 KB
Line 
1#include "erfa.h"
2
3void 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-2016, NumFOCUS Foundation.
77** Derived, with permission, from the SOFA library. See notes at end of file.
78*/
79{
80 double t;
81
82
83/* Interval between fundamental date J2000.0 and given date (JC). */
84 t = ((date1 - ERFA_DJ00) + date2) / ERFA_DJC;
85
86/* P03 bias+precession angles. */
87 *gamb = ( -0.052928 +
88 ( 10.556378 +
89 ( 0.4932044 +
90 ( -0.00031238 +
91 ( -0.000002788 +
92 ( 0.0000000260 )
93 * t) * t) * t) * t) * t) * ERFA_DAS2R;
94 *phib = ( 84381.412819 +
95 ( -46.811016 +
96 ( 0.0511268 +
97 ( 0.00053289 +
98 ( -0.000000440 +
99 ( -0.0000000176 )
100 * t) * t) * t) * t) * t) * ERFA_DAS2R;
101 *psib = ( -0.041775 +
102 ( 5038.481484 +
103 ( 1.5584175 +
104 ( -0.00018522 +
105 ( -0.000026452 +
106 ( -0.0000000148 )
107 * t) * t) * t) * t) * t) * ERFA_DAS2R;
108 *epsa = eraObl06(date1, date2);
109
110 return;
111
112}
113/*----------------------------------------------------------------------
114**
115**
116** Copyright (C) 2013-2016, NumFOCUS Foundation.
117** All rights reserved.
118**
119** This library is derived, with permission, from the International
120** Astronomical Union's "Standards of Fundamental Astronomy" library,
121** available from http://www.iausofa.org.
122**
123** The ERFA version is intended to retain identical functionality to
124** the SOFA library, but made distinct through different function and
125** file names, as set out in the SOFA license conditions. The SOFA
126** original has a role as a reference standard for the IAU and IERS,
127** and consequently redistribution is permitted only in its unaltered
128** state. The ERFA version is not subject to this restriction and
129** therefore can be included in distributions which do not support the
130** concept of "read only" software.
131**
132** Although the intent is to replicate the SOFA API (other than
133** replacement of prefix names) and results (with the exception of
134** bugs; any that are discovered will be fixed), SOFA is not
135** responsible for any errors found in this version of the library.
136**
137** If you wish to acknowledge the SOFA heritage, please acknowledge
138** that you are using a library derived from SOFA, rather than SOFA
139** itself.
140**
141**
142** TERMS AND CONDITIONS
143**
144** Redistribution and use in source and binary forms, with or without
145** modification, are permitted provided that the following conditions
146** are met:
147**
148** 1 Redistributions of source code must retain the above copyright
149** notice, this list of conditions and the following disclaimer.
150**
151** 2 Redistributions in binary form must reproduce the above copyright
152** notice, this list of conditions and the following disclaimer in
153** the documentation and/or other materials provided with the
154** distribution.
155**
156** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
157** the International Astronomical Union nor the names of its
158** contributors may be used to endorse or promote products derived
159** from this software without specific prior written permission.
160**
161** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
162** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
163** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
164** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
165** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
166** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
167** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
168** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
169** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
170** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
171** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
172** POSSIBILITY OF SUCH DAMAGE.
173**
174*/
Note: See TracBrowser for help on using the repository browser.