1 #include "erfa.h"
2 
eraEe00a(double date1,double date2)3 double eraEe00a(double date1, double date2)
4 /*
5 **  - - - - - - - - -
6 **   e r a E e 0 0 a
7 **  - - - - - - - - -
8 **
9 **  Equation of the equinoxes, compatible with IAU 2000 resolutions.
10 **
11 **  Given:
12 **     date1,date2  double    TT as a 2-part Julian Date (Note 1)
13 **
14 **  Returned (function value):
15 **                  double    equation of the equinoxes (Note 2)
16 **
17 **  Notes:
18 **
19 **  1) The TT date date1+date2 is a Julian Date, apportioned in any
20 **     convenient way between the two arguments.  For example,
21 **     JD(TT)=2450123.7 could be expressed in any of these ways,
22 **     among others:
23 **
24 **            date1          date2
25 **
26 **         2450123.7           0.0       (JD method)
27 **         2451545.0       -1421.3       (J2000 method)
28 **         2400000.5       50123.2       (MJD method)
29 **         2450123.5           0.2       (date & time method)
30 **
31 **     The JD method is the most natural and convenient to use in
32 **     cases where the loss of several decimal digits of resolution
33 **     is acceptable.  The J2000 method is best matched to the way
34 **     the argument is handled internally and will deliver the
35 **     optimum resolution.  The MJD method and the date & time methods
36 **     are both good compromises between resolution and convenience.
37 **
38 **  2) The result, which is in radians, operates in the following sense:
39 **
40 **        Greenwich apparent ST = GMST + equation of the equinoxes
41 **
42 **  3) The result is compatible with the IAU 2000 resolutions.  For
43 **     further details, see IERS Conventions 2003 and Capitaine et al.
44 **     (2002).
45 **
46 **  Called:
47 **     eraPr00      IAU 2000 precession adjustments
48 **     eraObl80     mean obliquity, IAU 1980
49 **     eraNut00a    nutation, IAU 2000A
50 **     eraEe00      equation of the equinoxes, IAU 2000
51 **
52 **  References:
53 **
54 **     Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
55 **     implement the IAU 2000 definition of UT1", Astronomy &
56 **     Astrophysics, 406, 1135-1149 (2003).
57 **
58 **     McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
59 **     IERS Technical Note No. 32, BKG (2004).
60 **
61 **  This revision:  2021 May 11
62 **
63 **  Copyright (C) 2013-2021, NumFOCUS Foundation.
64 **  Derived, with permission, from the SOFA library.  See notes at end of file.
65 */
66 {
67    double dpsipr, depspr, epsa, dpsi, deps, ee;
68 
69 
70 /* IAU 2000 precession-rate adjustments. */
71    eraPr00(date1, date2, &dpsipr, &depspr);
72 
73 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
74    epsa = eraObl80(date1, date2) + depspr;
75 
76 /* Nutation in longitude. */
77    eraNut00a(date1, date2, &dpsi, &deps);
78 
79 /* Equation of the equinoxes. */
80    ee = eraEe00(date1, date2, epsa, dpsi);
81 
82    return ee;
83 
84 /* Finished. */
85 
86 }
87 /*----------------------------------------------------------------------
88 **
89 **
90 **  Copyright (C) 2013-2021, NumFOCUS Foundation.
91 **  All rights reserved.
92 **
93 **  This library is derived, with permission, from the International
94 **  Astronomical Union's "Standards of Fundamental Astronomy" library,
95 **  available from http://www.iausofa.org.
96 **
97 **  The ERFA version is intended to retain identical functionality to
98 **  the SOFA library, but made distinct through different function and
99 **  file names, as set out in the SOFA license conditions.  The SOFA
100 **  original has a role as a reference standard for the IAU and IERS,
101 **  and consequently redistribution is permitted only in its unaltered
102 **  state.  The ERFA version is not subject to this restriction and
103 **  therefore can be included in distributions which do not support the
104 **  concept of "read only" software.
105 **
106 **  Although the intent is to replicate the SOFA API (other than
107 **  replacement of prefix names) and results (with the exception of
108 **  bugs;  any that are discovered will be fixed), SOFA is not
109 **  responsible for any errors found in this version of the library.
110 **
111 **  If you wish to acknowledge the SOFA heritage, please acknowledge
112 **  that you are using a library derived from SOFA, rather than SOFA
113 **  itself.
114 **
115 **
116 **  TERMS AND CONDITIONS
117 **
118 **  Redistribution and use in source and binary forms, with or without
119 **  modification, are permitted provided that the following conditions
120 **  are met:
121 **
122 **  1 Redistributions of source code must retain the above copyright
123 **    notice, this list of conditions and the following disclaimer.
124 **
125 **  2 Redistributions in binary form must reproduce the above copyright
126 **    notice, this list of conditions and the following disclaimer in
127 **    the documentation and/or other materials provided with the
128 **    distribution.
129 **
130 **  3 Neither the name of the Standards Of Fundamental Astronomy Board,
131 **    the International Astronomical Union nor the names of its
132 **    contributors may be used to endorse or promote products derived
133 **    from this software without specific prior written permission.
134 **
135 **  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
136 **  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
137 **  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
138 **  FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
139 **  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
140 **  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
141 **  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
142 **  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
143 **  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
144 **  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
145 **  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
146 **  POSSIBILITY OF SUCH DAMAGE.
147 **
148 */
149