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

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 7.0 KB
Line 
1#include "sofa.h"
2
3double iauGst06a(double uta, double utb, double tta, double ttb)
4/*
5** - - - - - - - - - -
6** i a u G s t 0 6 a
7** - - - - - - - - - -
8**
9** Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
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/2006 resolutions and
55** must be used only in conjunction with IAU 2006 precession and
56** IAU 2000A nutation.
57**
58** 4) The result is returned in the range 0 to 2pi.
59**
60** Called:
61** iauPnm06a classical NPB matrix, IAU 2006/2000A
62** iauGst06 Greenwich apparent ST, IAU 2006, given NPB matrix
63**
64** Reference:
65**
66** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
67**
68** This revision: 2013 June 18
69**
70** SOFA release 2015-02-09
71**
72** Copyright (C) 2015 IAU SOFA Board. See notes at end.
73*/
74{
75 double rnpb[3][3], gst;
76
77/* Classical nutation x precession x bias matrix, IAU 2000A. */
78 iauPnm06a(tta, ttb, rnpb);
79
80/* Greenwich apparent sidereal time. */
81 gst = iauGst06(uta, utb, tta, ttb, rnpb);
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.