source: trunk/FACT++/sofa/src/gmst00.c@ 18346

Last change on this file since 18346 was 18346, checked in by tbretz, 9 years ago
File size: 7.5 KB
Line 
1#include "sofa.h"
2
3double iauGmst00(double uta, double utb, double tta, double ttb)
4/*
5** - - - - - - - - - -
6** i a u G m s t 0 0
7** - - - - - - - - - -
8**
9** Greenwich mean sidereal time (model 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 mean 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. If UT1 is used for
51** both purposes, errors of order 100 microarcseconds result.
52**
53** 3) This GMST is compatible with the IAU 2000 resolutions and must be
54** used only in conjunction with other IAU 2000 compatible
55** components such as precession-nutation and equation of the
56** equinoxes.
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** iauEra00 Earth rotation angle, IAU 2000
65** iauAnp normalize angle into range 0 to 2pi
66**
67** References:
68**
69** Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
70** implement the IAU 2000 definition of UT1", Astronomy &
71** Astrophysics, 406, 1135-1149 (2003)
72**
73** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
74** IERS Technical Note No. 32, BKG (2004)
75**
76** This revision: 2013 June 18
77**
78** SOFA release 2015-02-09
79**
80** Copyright (C) 2015 IAU SOFA Board. See notes at end.
81*/
82{
83 double t, gmst;
84
85/* TT Julian centuries since J2000.0. */
86 t = ((tta - DJ00) + ttb) / DJC;
87
88/* Greenwich Mean Sidereal Time, IAU 2000. */
89 gmst = iauAnp(iauEra00(uta, utb) +
90 ( 0.014506 +
91 ( 4612.15739966 +
92 ( 1.39667721 +
93 ( -0.00009344 +
94 ( 0.00001882 )
95 * t) * t) * t) * t) * DAS2R);
96
97 return gmst;
98
99/*----------------------------------------------------------------------
100**
101** Copyright (C) 2015
102** Standards Of Fundamental Astronomy Board
103** of the International Astronomical Union.
104**
105** =====================
106** SOFA Software License
107** =====================
108**
109** NOTICE TO USER:
110**
111** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
112** CONDITIONS WHICH APPLY TO ITS USE.
113**
114** 1. The Software is owned by the IAU SOFA Board ("SOFA").
115**
116** 2. Permission is granted to anyone to use the SOFA software for any
117** purpose, including commercial applications, free of charge and
118** without payment of royalties, subject to the conditions and
119** restrictions listed below.
120**
121** 3. You (the user) may copy and distribute SOFA source code to others,
122** and use and adapt its code and algorithms in your own software,
123** on a world-wide, royalty-free basis. That portion of your
124** distribution that does not consist of intact and unchanged copies
125** of SOFA source code files is a "derived work" that must comply
126** with the following requirements:
127**
128** a) Your work shall be marked or carry a statement that it
129** (i) uses routines and computations derived by you from
130** software provided by SOFA under license to you; and
131** (ii) does not itself constitute software provided by and/or
132** endorsed by SOFA.
133**
134** b) The source code of your derived work must contain descriptions
135** of how the derived work is based upon, contains and/or differs
136** from the original SOFA software.
137**
138** c) The names of all routines in your derived work shall not
139** include the prefix "iau" or "sofa" or trivial modifications
140** thereof such as changes of case.
141**
142** d) The origin of the SOFA components of your derived work must
143** not be misrepresented; you must not claim that you wrote the
144** original software, nor file a patent application for SOFA
145** software or algorithms embedded in the SOFA software.
146**
147** e) These requirements must be reproduced intact in any source
148** distribution and shall apply to anyone to whom you have
149** granted a further right to modify the source code of your
150** derived work.
151**
152** Note that, as originally distributed, the SOFA software is
153** intended to be a definitive implementation of the IAU standards,
154** and consequently third-party modifications are discouraged. All
155** variations, no matter how minor, must be explicitly marked as
156** such, as explained above.
157**
158** 4. You shall not cause the SOFA software to be brought into
159** disrepute, either by misuse, or use for inappropriate tasks, or
160** by inappropriate modification.
161**
162** 5. The SOFA software is provided "as is" and SOFA makes no warranty
163** as to its use or performance. SOFA does not and cannot warrant
164** the performance or results which the user may obtain by using the
165** SOFA software. SOFA makes no warranties, express or implied, as
166** to non-infringement of third party rights, merchantability, or
167** fitness for any particular purpose. In no event will SOFA be
168** liable to the user for any consequential, incidental, or special
169** damages, including any lost profits or lost savings, even if a
170** SOFA representative has been advised of such damages, or for any
171** claim by any third party.
172**
173** 6. The provision of any version of the SOFA software under the terms
174** and conditions specified herein does not imply that future
175** versions will also be made available under the same terms and
176** conditions.
177*
178** In any published work or commercial product which uses the SOFA
179** software directly, acknowledgement (see www.iausofa.org) is
180** appreciated.
181**
182** Correspondence concerning SOFA software should be addressed as
183** follows:
184**
185** By email: sofa@ukho.gov.uk
186** By post: IAU SOFA Center
187** HM Nautical Almanac Office
188** UK Hydrographic Office
189** Admiralty Way, Taunton
190** Somerset, TA1 2DN
191** United Kingdom
192**
193**--------------------------------------------------------------------*/
194}
Note: See TracBrowser for help on using the repository browser.