source: trunk/FACT++/sofa/src/eect00.c@ 18365

Last change on this file since 18365 was 18346, checked in by tbretz, 10 years ago
File size: 12.1 KB
Line 
1#include "sofa.h"
2
3double iauEect00(double date1, double date2)
4/*
5** - - - - - - - - - -
6** i a u E e c t 0 0
7** - - - - - - - - - -
8**
9** Equation of the equinoxes complementary terms, consistent with
10** IAU 2000 resolutions.
11**
12** This function is part of the International Astronomical Union's
13** SOFA (Standards Of Fundamental Astronomy) software collection.
14**
15** Status: canonical model.
16**
17** Given:
18** date1,date2 double TT as a 2-part Julian Date (Note 1)
19**
20** Returned (function value):
21** double complementary terms (Note 2)
22**
23** Notes:
24**
25** 1) The TT date date1+date2 is a Julian Date, apportioned in any
26** convenient way between the two arguments. For example,
27** JD(TT)=2450123.7 could be expressed in any of these ways,
28** among others:
29**
30** date1 date2
31**
32** 2450123.7 0.0 (JD method)
33** 2451545.0 -1421.3 (J2000 method)
34** 2400000.5 50123.2 (MJD method)
35** 2450123.5 0.2 (date & time method)
36**
37** The JD method is the most natural and convenient to use in
38** cases where the loss of several decimal digits of resolution
39** is acceptable. The J2000 method is best matched to the way
40** the argument is handled internally and will deliver the
41** optimum resolution. The MJD method and the date & time methods
42** are both good compromises between resolution and convenience.
43**
44** 2) The "complementary terms" are part of the equation of the
45** equinoxes (EE), classically the difference between apparent and
46** mean Sidereal Time:
47**
48** GAST = GMST + EE
49**
50** with:
51**
52** EE = dpsi * cos(eps)
53**
54** where dpsi is the nutation in longitude and eps is the obliquity
55** of date. However, if the rotation of the Earth were constant in
56** an inertial frame the classical formulation would lead to
57** apparent irregularities in the UT1 timescale traceable to side-
58** effects of precession-nutation. In order to eliminate these
59** effects from UT1, "complementary terms" were introduced in 1994
60** (IAU, 1994) and took effect from 1997 (Capitaine and Gontier,
61** 1993):
62**
63** GAST = GMST + CT + EE
64**
65** By convention, the complementary terms are included as part of
66** the equation of the equinoxes rather than as part of the mean
67** Sidereal Time. This slightly compromises the "geometrical"
68** interpretation of mean sidereal time but is otherwise
69** inconsequential.
70**
71** The present function computes CT in the above expression,
72** compatible with IAU 2000 resolutions (Capitaine et al., 2002, and
73** IERS Conventions 2003).
74**
75** Called:
76** iauFal03 mean anomaly of the Moon
77** iauFalp03 mean anomaly of the Sun
78** iauFaf03 mean argument of the latitude of the Moon
79** iauFad03 mean elongation of the Moon from the Sun
80** iauFaom03 mean longitude of the Moon's ascending node
81** iauFave03 mean longitude of Venus
82** iauFae03 mean longitude of Earth
83** iauFapa03 general accumulated precession in longitude
84**
85** References:
86**
87** Capitaine, N. & Gontier, A.-M., Astron. Astrophys., 275,
88** 645-650 (1993)
89**
90** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
91** implement the IAU 2000 definition of UT1", Astronomy &
92** Astrophysics, 406, 1135-1149 (2003)
93**
94** IAU Resolution C7, Recommendation 3 (1994)
95**
96** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
97** IERS Technical Note No. 32, BKG (2004)
98**
99** This revision: 2013 June 18
100**
101** SOFA release 2015-02-09
102**
103** Copyright (C) 2015 IAU SOFA Board. See notes at end.
104*/
105{
106/* Time since J2000.0, in Julian centuries */
107 double t;
108
109/* Miscellaneous */
110 int i, j;
111 double a, s0, s1;
112
113/* Fundamental arguments */
114 double fa[14];
115
116/* Returned value. */
117 double eect;
118
119/* ----------------------------------------- */
120/* The series for the EE complementary terms */
121/* ----------------------------------------- */
122
123 typedef struct {
124 int nfa[8]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */
125 double s, c; /* sine and cosine coefficients */
126 } TERM;
127
128/* Terms of order t^0 */
129 static const TERM e0[] = {
130
131 /* 1-10 */
132 {{ 0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6 },
133 {{ 0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6 },
134 {{ 0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6 },
135 {{ 0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6 },
136 {{ 0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6 },
137 {{ 0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6 },
138 {{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6 },
139 {{ 0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6 },
140 {{ 0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6 },
141 {{ 0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6 },
142
143 /* 11-20 */
144 {{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6 },
145 {{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6 },
146 {{ 0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6 },
147 {{ 0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6 },
148 {{ 0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6 },
149 {{ 0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6 },
150 {{ 0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6 },
151 {{ 0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6 },
152 {{ 1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6 },
153 {{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6 },
154
155 /* 21-30 */
156 {{ 0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 },
157 {{ 0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6 },
158 {{ 0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6 },
159 {{ 0, 0, 0, 0, 0, 8,-13, -1}, -0.10e-6, 0.05e-6 },
160 {{ 0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6 },
161 {{ 2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 },
162 {{ 1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6 },
163 {{ 0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6 },
164 {{ 1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 },
165 {{ 0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6 },
166
167 /* 31-33 */
168 {{ 0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6 },
169 {{ 1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6 },
170 {{ 1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6 }
171 };
172
173/* Terms of order t^1 */
174 static const TERM e1[] = {
175 {{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6 }
176 };
177
178/* Number of terms in the series */
179 const int NE0 = (int) (sizeof e0 / sizeof (TERM));
180 const int NE1 = (int) (sizeof e1 / sizeof (TERM));
181
182/*--------------------------------------------------------------------*/
183
184/* Interval between fundamental epoch J2000.0 and current date (JC). */
185 t = ((date1 - DJ00) + date2) / DJC;
186
187/* Fundamental Arguments (from IERS Conventions 2003) */
188
189/* Mean anomaly of the Moon. */
190 fa[0] = iauFal03(t);
191
192/* Mean anomaly of the Sun. */
193 fa[1] = iauFalp03(t);
194
195/* Mean longitude of the Moon minus that of the ascending node. */
196 fa[2] = iauFaf03(t);
197
198/* Mean elongation of the Moon from the Sun. */
199 fa[3] = iauFad03(t);
200
201/* Mean longitude of the ascending node of the Moon. */
202 fa[4] = iauFaom03(t);
203
204/* Mean longitude of Venus. */
205 fa[5] = iauFave03(t);
206
207/* Mean longitude of Earth. */
208 fa[6] = iauFae03(t);
209
210/* General precession in longitude. */
211 fa[7] = iauFapa03(t);
212
213/* Evaluate the EE complementary terms. */
214 s0 = 0.0;
215 s1 = 0.0;
216
217 for (i = NE0-1; i >= 0; i--) {
218 a = 0.0;
219 for (j = 0; j < 8; j++) {
220 a += (double)(e0[i].nfa[j]) * fa[j];
221 }
222 s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
223 }
224
225 for (i = NE1-1; i >= 0; i--) {
226 a = 0.0;
227 for (j = 0; j < 8; j++) {
228 a += (double)(e1[i].nfa[j]) * fa[j];
229 }
230 s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
231 }
232
233 eect = (s0 + s1 * t ) * DAS2R;
234
235 return eect;
236
237/*----------------------------------------------------------------------
238**
239** Copyright (C) 2015
240** Standards Of Fundamental Astronomy Board
241** of the International Astronomical Union.
242**
243** =====================
244** SOFA Software License
245** =====================
246**
247** NOTICE TO USER:
248**
249** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
250** CONDITIONS WHICH APPLY TO ITS USE.
251**
252** 1. The Software is owned by the IAU SOFA Board ("SOFA").
253**
254** 2. Permission is granted to anyone to use the SOFA software for any
255** purpose, including commercial applications, free of charge and
256** without payment of royalties, subject to the conditions and
257** restrictions listed below.
258**
259** 3. You (the user) may copy and distribute SOFA source code to others,
260** and use and adapt its code and algorithms in your own software,
261** on a world-wide, royalty-free basis. That portion of your
262** distribution that does not consist of intact and unchanged copies
263** of SOFA source code files is a "derived work" that must comply
264** with the following requirements:
265**
266** a) Your work shall be marked or carry a statement that it
267** (i) uses routines and computations derived by you from
268** software provided by SOFA under license to you; and
269** (ii) does not itself constitute software provided by and/or
270** endorsed by SOFA.
271**
272** b) The source code of your derived work must contain descriptions
273** of how the derived work is based upon, contains and/or differs
274** from the original SOFA software.
275**
276** c) The names of all routines in your derived work shall not
277** include the prefix "iau" or "sofa" or trivial modifications
278** thereof such as changes of case.
279**
280** d) The origin of the SOFA components of your derived work must
281** not be misrepresented; you must not claim that you wrote the
282** original software, nor file a patent application for SOFA
283** software or algorithms embedded in the SOFA software.
284**
285** e) These requirements must be reproduced intact in any source
286** distribution and shall apply to anyone to whom you have
287** granted a further right to modify the source code of your
288** derived work.
289**
290** Note that, as originally distributed, the SOFA software is
291** intended to be a definitive implementation of the IAU standards,
292** and consequently third-party modifications are discouraged. All
293** variations, no matter how minor, must be explicitly marked as
294** such, as explained above.
295**
296** 4. You shall not cause the SOFA software to be brought into
297** disrepute, either by misuse, or use for inappropriate tasks, or
298** by inappropriate modification.
299**
300** 5. The SOFA software is provided "as is" and SOFA makes no warranty
301** as to its use or performance. SOFA does not and cannot warrant
302** the performance or results which the user may obtain by using the
303** SOFA software. SOFA makes no warranties, express or implied, as
304** to non-infringement of third party rights, merchantability, or
305** fitness for any particular purpose. In no event will SOFA be
306** liable to the user for any consequential, incidental, or special
307** damages, including any lost profits or lost savings, even if a
308** SOFA representative has been advised of such damages, or for any
309** claim by any third party.
310**
311** 6. The provision of any version of the SOFA software under the terms
312** and conditions specified herein does not imply that future
313** versions will also be made available under the same terms and
314** conditions.
315*
316** In any published work or commercial product which uses the SOFA
317** software directly, acknowledgement (see www.iausofa.org) is
318** appreciated.
319**
320** Correspondence concerning SOFA software should be addressed as
321** follows:
322**
323** By email: sofa@ukho.gov.uk
324** By post: IAU SOFA Center
325** HM Nautical Almanac Office
326** UK Hydrographic Office
327** Admiralty Way, Taunton
328** Somerset, TA1 2DN
329** United Kingdom
330**
331**--------------------------------------------------------------------*/
332}
Note: See TracBrowser for help on using the repository browser.