1 #include "sofa.h"
2 
iauEe00a(double date1,double date2)3 double iauEe00a(double date1, double date2)
4 /*
5 **  - - - - - - - - -
6 **   i a u E e 0 0 a
7 **  - - - - - - - - -
8 **
9 **  Equation of the equinoxes, compatible with IAU 2000 resolutions.
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 equinoxes (Note 2)
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 result, which is in radians, operates in the following sense:
44 **
45 **        Greenwich apparent ST = GMST + equation of the equinoxes
46 **
47 **  3) The result is compatible with the IAU 2000 resolutions.  For
48 **     further details, see IERS Conventions 2003 and Capitaine et al.
49 **     (2002).
50 **
51 **  Called:
52 **     iauPr00      IAU 2000 precession adjustments
53 **     iauObl80     mean obliquity, IAU 1980
54 **     iauNut00a    nutation, IAU 2000A
55 **     iauEe00      equation of the equinoxes, IAU 2000
56 **
57 **  References:
58 **
59 **     Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
60 **     implement the IAU 2000 definition of UT1", Astronomy &
61 **     Astrophysics, 406, 1135-1149 (2003).
62 **
63 **     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
64 **     IERS Technical Note No. 32, BKG (2004).
65 **
66 **  This revision:  2021 May 11
67 **
68 **  SOFA release 2021-05-12
69 **
70 **  Copyright (C) 2021 IAU SOFA Board.  See notes at end.
71 */
72 {
73    double dpsipr, depspr, epsa, dpsi, deps, ee;
74 
75 
76 /* IAU 2000 precession-rate adjustments. */
77    iauPr00(date1, date2, &dpsipr, &depspr);
78 
79 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
80    epsa = iauObl80(date1, date2) + depspr;
81 
82 /* Nutation in longitude. */
83    iauNut00a(date1, date2, &dpsi, &deps);
84 
85 /* Equation of the equinoxes. */
86    ee = iauEe00(date1, date2, epsa, dpsi);
87 
88    return ee;
89 
90 /* Finished. */
91 
92 /*----------------------------------------------------------------------
93 **
94 **  Copyright (C) 2021
95 **  Standards Of Fundamental Astronomy Board
96 **  of the International Astronomical Union.
97 **
98 **  =====================
99 **  SOFA Software License
100 **  =====================
101 **
102 **  NOTICE TO USER:
103 **
104 **  BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
105 **  CONDITIONS WHICH APPLY TO ITS USE.
106 **
107 **  1. The Software is owned by the IAU SOFA Board ("SOFA").
108 **
109 **  2. Permission is granted to anyone to use the SOFA software for any
110 **     purpose, including commercial applications, free of charge and
111 **     without payment of royalties, subject to the conditions and
112 **     restrictions listed below.
113 **
114 **  3. You (the user) may copy and distribute SOFA source code to others,
115 **     and use and adapt its code and algorithms in your own software,
116 **     on a world-wide, royalty-free basis.  That portion of your
117 **     distribution that does not consist of intact and unchanged copies
118 **     of SOFA source code files is a "derived work" that must comply
119 **     with the following requirements:
120 **
121 **     a) Your work shall be marked or carry a statement that it
122 **        (i) uses routines and computations derived by you from
123 **        software provided by SOFA under license to you; and
124 **        (ii) does not itself constitute software provided by and/or
125 **        endorsed by SOFA.
126 **
127 **     b) The source code of your derived work must contain descriptions
128 **        of how the derived work is based upon, contains and/or differs
129 **        from the original SOFA software.
130 **
131 **     c) The names of all routines in your derived work shall not
132 **        include the prefix "iau" or "sofa" or trivial modifications
133 **        thereof such as changes of case.
134 **
135 **     d) The origin of the SOFA components of your derived work must
136 **        not be misrepresented;  you must not claim that you wrote the
137 **        original software, nor file a patent application for SOFA
138 **        software or algorithms embedded in the SOFA software.
139 **
140 **     e) These requirements must be reproduced intact in any source
141 **        distribution and shall apply to anyone to whom you have
142 **        granted a further right to modify the source code of your
143 **        derived work.
144 **
145 **     Note that, as originally distributed, the SOFA software is
146 **     intended to be a definitive implementation of the IAU standards,
147 **     and consequently third-party modifications are discouraged.  All
148 **     variations, no matter how minor, must be explicitly marked as
149 **     such, as explained above.
150 **
151 **  4. You shall not cause the SOFA software to be brought into
152 **     disrepute, either by misuse, or use for inappropriate tasks, or
153 **     by inappropriate modification.
154 **
155 **  5. The SOFA software is provided "as is" and SOFA makes no warranty
156 **     as to its use or performance.   SOFA does not and cannot warrant
157 **     the performance or results which the user may obtain by using the
158 **     SOFA software.  SOFA makes no warranties, express or implied, as
159 **     to non-infringement of third party rights, merchantability, or
160 **     fitness for any particular purpose.  In no event will SOFA be
161 **     liable to the user for any consequential, incidental, or special
162 **     damages, including any lost profits or lost savings, even if a
163 **     SOFA representative has been advised of such damages, or for any
164 **     claim by any third party.
165 **
166 **  6. The provision of any version of the SOFA software under the terms
167 **     and conditions specified herein does not imply that future
168 **     versions will also be made available under the same terms and
169 **     conditions.
170 *
171 **  In any published work or commercial product which uses the SOFA
172 **  software directly, acknowledgement (see www.iausofa.org) is
173 **  appreciated.
174 **
175 **  Correspondence concerning SOFA software should be addressed as
176 **  follows:
177 **
178 **      By email:  sofa@ukho.gov.uk
179 **      By post:   IAU SOFA Center
180 **                 HM Nautical Almanac Office
181 **                 UK Hydrographic Office
182 **                 Admiralty Way, Taunton
183 **                 Somerset, TA1 2DN
184 **                 United Kingdom
185 **
186 **--------------------------------------------------------------------*/
187 }
188