source: trunk/FACT++/sofa/src/gst94.c@ 18355

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 6.9 KB
Line 
1#include "sofa.h"
2
3double iauGst94(double uta, double utb)
4/*
5** - - - - - - - - -
6** i a u G s t 9 4
7** - - - - - - - - -
8**
9** Greenwich apparent sidereal time (consistent with IAU 1982/94
10** resolutions).
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 1982 and 1994 resolutions,
48** except that accuracy has been compromised for the sake of
49** convenience in that UT is used instead of TDB (or TT) to compute
50** the equation of the equinoxes.
51**
52** 3) This GAST must be used only in conjunction with contemporaneous
53** IAU standards such as 1976 precession, 1980 obliquity and 1982
54** nutation. It is not compatible with the IAU 2000 resolutions.
55**
56** 4) The result is returned in the range 0 to 2pi.
57**
58** Called:
59** iauGmst82 Greenwich mean sidereal time, IAU 1982
60** iauEqeq94 equation of the equinoxes, IAU 1994
61** iauAnp normalize angle into range 0 to 2pi
62**
63** References:
64**
65** Explanatory Supplement to the Astronomical Almanac,
66** P. Kenneth Seidelmann (ed), University Science Books (1992)
67**
68** IAU Resolution C7, Recommendation 3 (1994)
69**
70** This revision: 2008 May 16
71**
72** SOFA release 2015-02-09
73**
74** Copyright (C) 2015 IAU SOFA Board. See notes at end.
75*/
76{
77 double gmst82, eqeq94, gst;
78
79 gmst82 = iauGmst82(uta, utb);
80 eqeq94 = iauEqeq94(uta, utb);
81 gst = iauAnp(gmst82 + eqeq94);
82
83 return gst;
84
85/*----------------------------------------------------------------------
86**
87** Copyright (C) 2015
88** Standards Of Fundamental Astronomy Board
89** of the International Astronomical Union.
90**
91** =====================
92** SOFA Software License
93** =====================
94**
95** NOTICE TO USER:
96**
97** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
98** CONDITIONS WHICH APPLY TO ITS USE.
99**
100** 1. The Software is owned by the IAU SOFA Board ("SOFA").
101**
102** 2. Permission is granted to anyone to use the SOFA software for any
103** purpose, including commercial applications, free of charge and
104** without payment of royalties, subject to the conditions and
105** restrictions listed below.
106**
107** 3. You (the user) may copy and distribute SOFA source code to others,
108** and use and adapt its code and algorithms in your own software,
109** on a world-wide, royalty-free basis. That portion of your
110** distribution that does not consist of intact and unchanged copies
111** of SOFA source code files is a "derived work" that must comply
112** with the following requirements:
113**
114** a) Your work shall be marked or carry a statement that it
115** (i) uses routines and computations derived by you from
116** software provided by SOFA under license to you; and
117** (ii) does not itself constitute software provided by and/or
118** endorsed by SOFA.
119**
120** b) The source code of your derived work must contain descriptions
121** of how the derived work is based upon, contains and/or differs
122** from the original SOFA software.
123**
124** c) The names of all routines in your derived work shall not
125** include the prefix "iau" or "sofa" or trivial modifications
126** thereof such as changes of case.
127**
128** d) The origin of the SOFA components of your derived work must
129** not be misrepresented; you must not claim that you wrote the
130** original software, nor file a patent application for SOFA
131** software or algorithms embedded in the SOFA software.
132**
133** e) These requirements must be reproduced intact in any source
134** distribution and shall apply to anyone to whom you have
135** granted a further right to modify the source code of your
136** derived work.
137**
138** Note that, as originally distributed, the SOFA software is
139** intended to be a definitive implementation of the IAU standards,
140** and consequently third-party modifications are discouraged. All
141** variations, no matter how minor, must be explicitly marked as
142** such, as explained above.
143**
144** 4. You shall not cause the SOFA software to be brought into
145** disrepute, either by misuse, or use for inappropriate tasks, or
146** by inappropriate modification.
147**
148** 5. The SOFA software is provided "as is" and SOFA makes no warranty
149** as to its use or performance. SOFA does not and cannot warrant
150** the performance or results which the user may obtain by using the
151** SOFA software. SOFA makes no warranties, express or implied, as
152** to non-infringement of third party rights, merchantability, or
153** fitness for any particular purpose. In no event will SOFA be
154** liable to the user for any consequential, incidental, or special
155** damages, including any lost profits or lost savings, even if a
156** SOFA representative has been advised of such damages, or for any
157** claim by any third party.
158**
159** 6. The provision of any version of the SOFA software under the terms
160** and conditions specified herein does not imply that future
161** versions will also be made available under the same terms and
162** conditions.
163*
164** In any published work or commercial product which uses the SOFA
165** software directly, acknowledgement (see www.iausofa.org) is
166** appreciated.
167**
168** Correspondence concerning SOFA software should be addressed as
169** follows:
170**
171** By email: sofa@ukho.gov.uk
172** By post: IAU SOFA Center
173** HM Nautical Almanac Office
174** UK Hydrographic Office
175** Admiralty Way, Taunton
176** Somerset, TA1 2DN
177** United Kingdom
178**
179**--------------------------------------------------------------------*/
180}
Note: See TracBrowser for help on using the repository browser.