source: trunk/FACT++/sofa/src/gst00a.c@ 18368

Last change on this file since 18368 was 18346, checked in by tbretz, 11 years ago
File size: 7.3 KB
Line 
1#include "sofa.h"
2
3double iauGst00a(double uta, double utb, double tta, double ttb)
4/*
5** - - - - - - - - - -
6** i a u G s t 0 0 a
7** - - - - - - - - - -
8**
9** Greenwich apparent sidereal time (consistent with IAU 2000
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: canonical model.
16**
17** Given:
18** uta,utb double UT1 as a 2-part Julian Date (Notes 1,2)
19** tta,ttb double TT as a 2-part Julian Date (Notes 1,2)
20**
21** Returned (function value):
22** double Greenwich apparent sidereal time (radians)
23**
24** Notes:
25**
26** 1) The UT1 and TT dates uta+utb and tta+ttb respectively, are both
27** Julian Dates, apportioned in any convenient way between the
28** argument pairs. For example, JD=2450123.7 could be expressed in
29** any of these ways, among others:
30**
31** Part A Part B
32**
33** 2450123.7 0.0 (JD method)
34** 2451545.0 -1421.3 (J2000 method)
35** 2400000.5 50123.2 (MJD method)
36** 2450123.5 0.2 (date & time method)
37**
38** The JD method is the most natural and convenient to use in
39** cases where the loss of several decimal digits of resolution
40** is acceptable (in the case of UT; the TT is not at all critical
41** in this respect). The J2000 and MJD methods are good compromises
42** between resolution and convenience. For UT, the date & time
43** method is best matched to the algorithm that is used by the Earth
44** Rotation Angle function, called internally: maximum precision is
45** delivered when the uta argument is for 0hrs UT1 on the day in
46** question and the utb argument lies in the range 0 to 1, or vice
47** versa.
48**
49** 2) Both UT1 and TT are required, UT1 to predict the Earth rotation
50** and TT to predict the effects of precession-nutation. If UT1 is
51** used for both purposes, errors of order 100 microarcseconds
52** result.
53**
54** 3) This GAST is compatible with the IAU 2000 resolutions and must be
55** used only in conjunction with other IAU 2000 compatible
56** components such as precession-nutation.
57**
58** 4) The result is returned in the range 0 to 2pi.
59**
60** 5) The algorithm is from Capitaine et al. (2003) and IERS
61** Conventions 2003.
62**
63** Called:
64** iauGmst00 Greenwich mean sidereal time, IAU 2000
65** iauEe00a equation of the equinoxes, IAU 2000A
66** iauAnp normalize angle into range 0 to 2pi
67**
68** References:
69**
70** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
71** implement the IAU 2000 definition of UT1", Astronomy &
72** Astrophysics, 406, 1135-1149 (2003)
73**
74** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
75** IERS Technical Note No. 32, BKG (2004)
76**
77** This revision: 2013 June 18
78**
79** SOFA release 2015-02-09
80**
81** Copyright (C) 2015 IAU SOFA Board. See notes at end.
82*/
83{
84 double gmst00, ee00a, gst;
85
86 gmst00 = iauGmst00(uta, utb, tta, ttb);
87 ee00a = iauEe00a(tta, ttb);
88 gst = iauAnp(gmst00 + ee00a);
89
90 return gst;
91
92/*----------------------------------------------------------------------
93**
94** Copyright (C) 2015
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}
Note: See TracBrowser for help on using the repository browser.