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

Last change on this file since 18365 was 18346, checked in by tbretz, 10 years ago
File size: 6.8 KB
Line 
1#include "sofa.h"
2
3double iauEqeq94(double date1, double date2)
4/*
5** - - - - - - - - - -
6** i a u E q e q 9 4
7** - - - - - - - - - -
8**
9** Equation of the equinoxes, IAU 1994 model.
10**
11** This function is part of the International Astronomical Union's
12** SOFA (Standards Of Fundamental Astronomy) software collection.
13**
14** Status: canonical model.
15**
16** Given:
17** date1,date2 double TDB date (Note 1)
18**
19** Returned (function value):
20** double equation of the equinoxes (Note 2)
21**
22** Notes:
23**
24** 1) The 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 result, which is in radians, operates in the following sense:
44**
45** Greenwich apparent ST = GMST + equation of the equinoxes
46**
47** Called:
48** iauAnpm normalize angle into range +/- pi
49** iauNut80 nutation, IAU 1980
50** iauObl80 mean obliquity, IAU 1980
51**
52** References:
53**
54** IAU Resolution C7, Recommendation 3 (1994).
55**
56** Capitaine, N. & Gontier, A.-M., 1993, Astron. Astrophys., 275,
57** 645-650.
58**
59** This revision: 2013 August 31
60**
61** SOFA release 2015-02-09
62**
63** Copyright (C) 2015 IAU SOFA Board. See notes at end.
64*/
65{
66 double t, om, dpsi, deps, eps0, ee;
67
68/* Interval between fundamental epoch J2000.0 and given date (JC). */
69 t = ((date1 - DJ00) + date2) / DJC;
70
71/* Longitude of the mean ascending node of the lunar orbit on the */
72/* ecliptic, measured from the mean equinox of date. */
73 om = iauAnpm((450160.280 + (-482890.539
74 + (7.455 + 0.008 * t) * t) * t) * DAS2R
75 + fmod(-5.0 * t, 1.0) * D2PI);
76
77/* Nutation components and mean obliquity. */
78 iauNut80(date1, date2, &dpsi, &deps);
79 eps0 = iauObl80(date1, date2);
80
81/* Equation of the equinoxes. */
82 ee = dpsi*cos(eps0) + DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om));
83
84 return ee;
85
86/*----------------------------------------------------------------------
87**
88** Copyright (C) 2015
89** Standards Of Fundamental Astronomy Board
90** of the International Astronomical Union.
91**
92** =====================
93** SOFA Software License
94** =====================
95**
96** NOTICE TO USER:
97**
98** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
99** CONDITIONS WHICH APPLY TO ITS USE.
100**
101** 1. The Software is owned by the IAU SOFA Board ("SOFA").
102**
103** 2. Permission is granted to anyone to use the SOFA software for any
104** purpose, including commercial applications, free of charge and
105** without payment of royalties, subject to the conditions and
106** restrictions listed below.
107**
108** 3. You (the user) may copy and distribute SOFA source code to others,
109** and use and adapt its code and algorithms in your own software,
110** on a world-wide, royalty-free basis. That portion of your
111** distribution that does not consist of intact and unchanged copies
112** of SOFA source code files is a "derived work" that must comply
113** with the following requirements:
114**
115** a) Your work shall be marked or carry a statement that it
116** (i) uses routines and computations derived by you from
117** software provided by SOFA under license to you; and
118** (ii) does not itself constitute software provided by and/or
119** endorsed by SOFA.
120**
121** b) The source code of your derived work must contain descriptions
122** of how the derived work is based upon, contains and/or differs
123** from the original SOFA software.
124**
125** c) The names of all routines in your derived work shall not
126** include the prefix "iau" or "sofa" or trivial modifications
127** thereof such as changes of case.
128**
129** d) The origin of the SOFA components of your derived work must
130** not be misrepresented; you must not claim that you wrote the
131** original software, nor file a patent application for SOFA
132** software or algorithms embedded in the SOFA software.
133**
134** e) These requirements must be reproduced intact in any source
135** distribution and shall apply to anyone to whom you have
136** granted a further right to modify the source code of your
137** derived work.
138**
139** Note that, as originally distributed, the SOFA software is
140** intended to be a definitive implementation of the IAU standards,
141** and consequently third-party modifications are discouraged. All
142** variations, no matter how minor, must be explicitly marked as
143** such, as explained above.
144**
145** 4. You shall not cause the SOFA software to be brought into
146** disrepute, either by misuse, or use for inappropriate tasks, or
147** by inappropriate modification.
148**
149** 5. The SOFA software is provided "as is" and SOFA makes no warranty
150** as to its use or performance. SOFA does not and cannot warrant
151** the performance or results which the user may obtain by using the
152** SOFA software. SOFA makes no warranties, express or implied, as
153** to non-infringement of third party rights, merchantability, or
154** fitness for any particular purpose. In no event will SOFA be
155** liable to the user for any consequential, incidental, or special
156** damages, including any lost profits or lost savings, even if a
157** SOFA representative has been advised of such damages, or for any
158** claim by any third party.
159**
160** 6. The provision of any version of the SOFA software under the terms
161** and conditions specified herein does not imply that future
162** versions will also be made available under the same terms and
163** conditions.
164*
165** In any published work or commercial product which uses the SOFA
166** software directly, acknowledgement (see www.iausofa.org) is
167** appreciated.
168**
169** Correspondence concerning SOFA software should be addressed as
170** follows:
171**
172** By email: sofa@ukho.gov.uk
173** By post: IAU SOFA Center
174** HM Nautical Almanac Office
175** UK Hydrographic Office
176** Admiralty Way, Taunton
177** Somerset, TA1 2DN
178** United Kingdom
179**
180**--------------------------------------------------------------------*/
181}
Note: See TracBrowser for help on using the repository browser.