source: trunk/FACT++/sofa/src/eo06a.c@ 18355

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 6.8 KB
Line 
1#include "sofa.h"
2
3double iauEo06a(double date1, double date2)
4/*
5** - - - - - - - - -
6** i a u E o 0 6 a
7** - - - - - - - - -
8**
9** Equation of the origins, IAU 2006 precession and IAU 2000A nutation.
10**
11** This function is part of the International Astronomical Union's
12** SOFA (Standards Of Fundamental Astronomy) software collection.
13**
14** Status: support function.
15**
16** Given:
17** date1,date2 double TT as a 2-part Julian Date (Note 1)
18**
19** Returned (function value):
20** double equation of the origins in radians
21**
22** Notes:
23**
24** 1) The TT date date1+date2 is a Julian Date, apportioned in any
25** convenient way between the two arguments. For example,
26** JD(TT)=2450123.7 could be expressed in any of these ways,
27** among others:
28**
29** date1 date2
30**
31** 2450123.7 0.0 (JD method)
32** 2451545.0 -1421.3 (J2000 method)
33** 2400000.5 50123.2 (MJD method)
34** 2450123.5 0.2 (date & time method)
35**
36** The JD method is the most natural and convenient to use in
37** cases where the loss of several decimal digits of resolution
38** is acceptable. The J2000 method is best matched to the way
39** the argument is handled internally and will deliver the
40** optimum resolution. The MJD method and the date & time methods
41** are both good compromises between resolution and convenience.
42**
43** 2) The equation of the origins is the distance between the true
44** equinox and the celestial intermediate origin and, equivalently,
45** the difference between Earth rotation angle and Greenwich
46** apparent sidereal time (ERA-GST). It comprises the precession
47** (since J2000.0) in right ascension plus the equation of the
48** equinoxes (including the small correction terms).
49**
50** Called:
51** iauPnm06a classical NPB matrix, IAU 2006/2000A
52** iauBpn2xy extract CIP X,Y coordinates from NPB matrix
53** iauS06 the CIO locator s, given X,Y, IAU 2006
54** iauEors equation of the origins, given NPB matrix and s
55**
56** References:
57**
58** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
59**
60** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
61**
62** This revision: 2013 June 18
63**
64** SOFA release 2015-02-09
65**
66** Copyright (C) 2015 IAU SOFA Board. See notes at end.
67*/
68{
69 double r[3][3], x, y, s, eo;
70
71/* Classical nutation x precession x bias matrix. */
72 iauPnm06a(date1, date2, r);
73
74/* Extract CIP coordinates. */
75 iauBpn2xy(r, &x, &y);
76
77/* The CIO locator, s. */
78 s = iauS06(date1, date2, x, y);
79
80/* Solve for the EO. */
81 eo = iauEors(r, s);
82
83 return eo;
84
85/*----------------------------------------------------------------------
86**
87** Copyright (C) 2015
88** Standards Of Fundamental Astronomy Board
89** of the International Astronomical Union.
90**
91** =====================
92** SOFA Software License
93** =====================
94**
95** NOTICE TO USER:
96**
97** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
98** CONDITIONS WHICH APPLY TO ITS USE.
99**
100** 1. The Software is owned by the IAU SOFA Board ("SOFA").
101**
102** 2. Permission is granted to anyone to use the SOFA software for any
103** purpose, including commercial applications, free of charge and
104** without payment of royalties, subject to the conditions and
105** restrictions listed below.
106**
107** 3. You (the user) may copy and distribute SOFA source code to others,
108** and use and adapt its code and algorithms in your own software,
109** on a world-wide, royalty-free basis. That portion of your
110** distribution that does not consist of intact and unchanged copies
111** of SOFA source code files is a "derived work" that must comply
112** with the following requirements:
113**
114** a) Your work shall be marked or carry a statement that it
115** (i) uses routines and computations derived by you from
116** software provided by SOFA under license to you; and
117** (ii) does not itself constitute software provided by and/or
118** endorsed by SOFA.
119**
120** b) The source code of your derived work must contain descriptions
121** of how the derived work is based upon, contains and/or differs
122** from the original SOFA software.
123**
124** c) The names of all routines in your derived work shall not
125** include the prefix "iau" or "sofa" or trivial modifications
126** thereof such as changes of case.
127**
128** d) The origin of the SOFA components of your derived work must
129** not be misrepresented; you must not claim that you wrote the
130** original software, nor file a patent application for SOFA
131** software or algorithms embedded in the SOFA software.
132**
133** e) These requirements must be reproduced intact in any source
134** distribution and shall apply to anyone to whom you have
135** granted a further right to modify the source code of your
136** derived work.
137**
138** Note that, as originally distributed, the SOFA software is
139** intended to be a definitive implementation of the IAU standards,
140** and consequently third-party modifications are discouraged. All
141** variations, no matter how minor, must be explicitly marked as
142** such, as explained above.
143**
144** 4. You shall not cause the SOFA software to be brought into
145** disrepute, either by misuse, or use for inappropriate tasks, or
146** by inappropriate modification.
147**
148** 5. The SOFA software is provided "as is" and SOFA makes no warranty
149** as to its use or performance. SOFA does not and cannot warrant
150** the performance or results which the user may obtain by using the
151** SOFA software. SOFA makes no warranties, express or implied, as
152** to non-infringement of third party rights, merchantability, or
153** fitness for any particular purpose. In no event will SOFA be
154** liable to the user for any consequential, incidental, or special
155** damages, including any lost profits or lost savings, even if a
156** SOFA representative has been advised of such damages, or for any
157** claim by any third party.
158**
159** 6. The provision of any version of the SOFA software under the terms
160** and conditions specified herein does not imply that future
161** versions will also be made available under the same terms and
162** conditions.
163*
164** In any published work or commercial product which uses the SOFA
165** software directly, acknowledgement (see www.iausofa.org) is
166** appreciated.
167**
168** Correspondence concerning SOFA software should be addressed as
169** follows:
170**
171** By email: sofa@ukho.gov.uk
172** By post: IAU SOFA Center
173** HM Nautical Almanac Office
174** UK Hydrographic Office
175** Admiralty Way, Taunton
176** Somerset, TA1 2DN
177** United Kingdom
178**
179**--------------------------------------------------------------------*/
180}
Note: See TracBrowser for help on using the repository browser.