1 | #include "sofa.h"
|
---|
2 |
|
---|
3 | double iauGst00b(double uta, double utb)
|
---|
4 | /*
|
---|
5 | ** - - - - - - - - - -
|
---|
6 | ** i a u G s t 0 0 b
|
---|
7 | ** - - - - - - - - - -
|
---|
8 | **
|
---|
9 | ** Greenwich apparent sidereal time (consistent with IAU 2000
|
---|
10 | ** resolutions but using the truncated nutation model IAU 2000B).
|
---|
11 | **
|
---|
12 | ** This function is part of the International Astronomical Union's
|
---|
13 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
---|
14 | **
|
---|
15 | ** Status: support function.
|
---|
16 | **
|
---|
17 | ** Given:
|
---|
18 | ** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2)
|
---|
19 | **
|
---|
20 | ** Returned (function value):
|
---|
21 | ** double Greenwich apparent sidereal time (radians)
|
---|
22 | **
|
---|
23 | ** Notes:
|
---|
24 | **
|
---|
25 | ** 1) The UT1 date uta+utb is a Julian Date, apportioned in any
|
---|
26 | ** convenient way between the argument pair. For example,
|
---|
27 | ** JD=2450123.7 could be expressed in any of these ways, among
|
---|
28 | ** others:
|
---|
29 | **
|
---|
30 | ** uta utb
|
---|
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 cases
|
---|
38 | ** where the loss of several decimal digits of resolution is
|
---|
39 | ** acceptable. The J2000 and MJD methods are good compromises
|
---|
40 | ** between resolution and convenience. For UT, the date & time
|
---|
41 | ** method is best matched to the algorithm that is used by the Earth
|
---|
42 | ** Rotation Angle function, called internally: maximum precision is
|
---|
43 | ** delivered when the uta argument is for 0hrs UT1 on the day in
|
---|
44 | ** question and the utb argument lies in the range 0 to 1, or vice
|
---|
45 | ** versa.
|
---|
46 | **
|
---|
47 | ** 2) The result is compatible with the IAU 2000 resolutions, except
|
---|
48 | ** that accuracy has been compromised for the sake of speed and
|
---|
49 | ** convenience in two respects:
|
---|
50 | **
|
---|
51 | ** . UT is used instead of TDB (or TT) to compute the precession
|
---|
52 | ** component of GMST and the equation of the equinoxes. This
|
---|
53 | ** results in errors of order 0.1 mas at present.
|
---|
54 | **
|
---|
55 | ** . The IAU 2000B abridged nutation model (McCarthy & Luzum, 2001)
|
---|
56 | ** is used, introducing errors of up to 1 mas.
|
---|
57 | **
|
---|
58 | ** 3) This GAST is compatible with the IAU 2000 resolutions and must be
|
---|
59 | ** used only in conjunction with other IAU 2000 compatible
|
---|
60 | ** components such as precession-nutation.
|
---|
61 | **
|
---|
62 | ** 4) The result is returned in the range 0 to 2pi.
|
---|
63 | **
|
---|
64 | ** 5) The algorithm is from Capitaine et al. (2003) and IERS
|
---|
65 | ** Conventions 2003.
|
---|
66 | **
|
---|
67 | ** Called:
|
---|
68 | ** iauGmst00 Greenwich mean sidereal time, IAU 2000
|
---|
69 | ** iauEe00b equation of the equinoxes, IAU 2000B
|
---|
70 | ** iauAnp normalize angle into range 0 to 2pi
|
---|
71 | **
|
---|
72 | ** References:
|
---|
73 | **
|
---|
74 | ** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
|
---|
75 | ** implement the IAU 2000 definition of UT1", Astronomy &
|
---|
76 | ** Astrophysics, 406, 1135-1149 (2003)
|
---|
77 | **
|
---|
78 | ** McCarthy, D.D. & Luzum, B.J., "An abridged model of the
|
---|
79 | ** precession-nutation of the celestial pole", Celestial Mechanics &
|
---|
80 | ** Dynamical Astronomy, 85, 37-49 (2003)
|
---|
81 | **
|
---|
82 | ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
|
---|
83 | ** IERS Technical Note No. 32, BKG (2004)
|
---|
84 | **
|
---|
85 | ** This revision: 2013 June 18
|
---|
86 | **
|
---|
87 | ** SOFA release 2015-02-09
|
---|
88 | **
|
---|
89 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
---|
90 | */
|
---|
91 | {
|
---|
92 | double gmst00, ee00b, gst;
|
---|
93 |
|
---|
94 | gmst00 = iauGmst00(uta, utb, uta, utb);
|
---|
95 | ee00b = iauEe00b(uta, utb);
|
---|
96 | gst = iauAnp(gmst00 + ee00b);
|
---|
97 |
|
---|
98 | return gst;
|
---|
99 |
|
---|
100 | /*----------------------------------------------------------------------
|
---|
101 | **
|
---|
102 | ** Copyright (C) 2015
|
---|
103 | ** Standards Of Fundamental Astronomy Board
|
---|
104 | ** of the International Astronomical Union.
|
---|
105 | **
|
---|
106 | ** =====================
|
---|
107 | ** SOFA Software License
|
---|
108 | ** =====================
|
---|
109 | **
|
---|
110 | ** NOTICE TO USER:
|
---|
111 | **
|
---|
112 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
---|
113 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
---|
114 | **
|
---|
115 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
---|
116 | **
|
---|
117 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
---|
118 | ** purpose, including commercial applications, free of charge and
|
---|
119 | ** without payment of royalties, subject to the conditions and
|
---|
120 | ** restrictions listed below.
|
---|
121 | **
|
---|
122 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
---|
123 | ** and use and adapt its code and algorithms in your own software,
|
---|
124 | ** on a world-wide, royalty-free basis. That portion of your
|
---|
125 | ** distribution that does not consist of intact and unchanged copies
|
---|
126 | ** of SOFA source code files is a "derived work" that must comply
|
---|
127 | ** with the following requirements:
|
---|
128 | **
|
---|
129 | ** a) Your work shall be marked or carry a statement that it
|
---|
130 | ** (i) uses routines and computations derived by you from
|
---|
131 | ** software provided by SOFA under license to you; and
|
---|
132 | ** (ii) does not itself constitute software provided by and/or
|
---|
133 | ** endorsed by SOFA.
|
---|
134 | **
|
---|
135 | ** b) The source code of your derived work must contain descriptions
|
---|
136 | ** of how the derived work is based upon, contains and/or differs
|
---|
137 | ** from the original SOFA software.
|
---|
138 | **
|
---|
139 | ** c) The names of all routines in your derived work shall not
|
---|
140 | ** include the prefix "iau" or "sofa" or trivial modifications
|
---|
141 | ** thereof such as changes of case.
|
---|
142 | **
|
---|
143 | ** d) The origin of the SOFA components of your derived work must
|
---|
144 | ** not be misrepresented; you must not claim that you wrote the
|
---|
145 | ** original software, nor file a patent application for SOFA
|
---|
146 | ** software or algorithms embedded in the SOFA software.
|
---|
147 | **
|
---|
148 | ** e) These requirements must be reproduced intact in any source
|
---|
149 | ** distribution and shall apply to anyone to whom you have
|
---|
150 | ** granted a further right to modify the source code of your
|
---|
151 | ** derived work.
|
---|
152 | **
|
---|
153 | ** Note that, as originally distributed, the SOFA software is
|
---|
154 | ** intended to be a definitive implementation of the IAU standards,
|
---|
155 | ** and consequently third-party modifications are discouraged. All
|
---|
156 | ** variations, no matter how minor, must be explicitly marked as
|
---|
157 | ** such, as explained above.
|
---|
158 | **
|
---|
159 | ** 4. You shall not cause the SOFA software to be brought into
|
---|
160 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
---|
161 | ** by inappropriate modification.
|
---|
162 | **
|
---|
163 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
---|
164 | ** as to its use or performance. SOFA does not and cannot warrant
|
---|
165 | ** the performance or results which the user may obtain by using the
|
---|
166 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
---|
167 | ** to non-infringement of third party rights, merchantability, or
|
---|
168 | ** fitness for any particular purpose. In no event will SOFA be
|
---|
169 | ** liable to the user for any consequential, incidental, or special
|
---|
170 | ** damages, including any lost profits or lost savings, even if a
|
---|
171 | ** SOFA representative has been advised of such damages, or for any
|
---|
172 | ** claim by any third party.
|
---|
173 | **
|
---|
174 | ** 6. The provision of any version of the SOFA software under the terms
|
---|
175 | ** and conditions specified herein does not imply that future
|
---|
176 | ** versions will also be made available under the same terms and
|
---|
177 | ** conditions.
|
---|
178 | *
|
---|
179 | ** In any published work or commercial product which uses the SOFA
|
---|
180 | ** software directly, acknowledgement (see www.iausofa.org) is
|
---|
181 | ** appreciated.
|
---|
182 | **
|
---|
183 | ** Correspondence concerning SOFA software should be addressed as
|
---|
184 | ** follows:
|
---|
185 | **
|
---|
186 | ** By email: sofa@ukho.gov.uk
|
---|
187 | ** By post: IAU SOFA Center
|
---|
188 | ** HM Nautical Almanac Office
|
---|
189 | ** UK Hydrographic Office
|
---|
190 | ** Admiralty Way, Taunton
|
---|
191 | ** Somerset, TA1 2DN
|
---|
192 | ** United Kingdom
|
---|
193 | **
|
---|
194 | **--------------------------------------------------------------------*/
|
---|
195 | }
|
---|