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

Last change on this file since 18355 was 18346, checked in by tbretz, 11 years ago
File size: 7.6 KB
Line 
1#include "sofa.h"
2
3double iauS00a(double date1, double date2)
4/*
5** - - - - - - - -
6** i a u S 0 0 a
7** - - - - - - - -
8**
9** The CIO locator s, positioning the Celestial Intermediate Origin on
10** the equator of the Celestial Intermediate Pole, using the IAU 2000A
11** precession-nutation model.
12**
13** This function is part of the International Astronomical Union's
14** SOFA (Standards Of Fundamental Astronomy) software collection.
15**
16** Status: support function.
17**
18** Given:
19** date1,date2 double TT as a 2-part Julian Date (Note 1)
20**
21** Returned (function value):
22** double the CIO locator s in radians (Note 2)
23**
24** Notes:
25**
26** 1) The TT date date1+date2 is a Julian Date, apportioned in any
27** convenient way between the two arguments. For example,
28** JD(TT)=2450123.7 could be expressed in any of these ways,
29** among others:
30**
31** date1 date2
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. The J2000 method is best matched to the way
41** the argument is handled internally and will deliver the
42** optimum resolution. The MJD method and the date & time methods
43** are both good compromises between resolution and convenience.
44**
45** 2) The CIO locator s is the difference between the right ascensions
46** of the same point in two systems. The two systems are the GCRS
47** and the CIP,CIO, and the point is the ascending node of the
48** CIP equator. The CIO locator s remains a small fraction of
49** 1 arcsecond throughout 1900-2100.
50**
51** 3) The series used to compute s is in fact for s+XY/2, where X and Y
52** are the x and y components of the CIP unit vector; this series
53** is more compact than a direct series for s would be. The present
54** function uses the full IAU 2000A nutation model when predicting
55** the CIP position. Faster results, with no significant loss of
56** accuracy, can be obtained via the function iauS00b, which uses
57** instead the IAU 2000B truncated model.
58**
59** Called:
60** iauPnm00a classical NPB matrix, IAU 2000A
61** iauBnp2xy extract CIP X,Y from the BPN matrix
62** iauS00 the CIO locator s, given X,Y, IAU 2000A
63**
64** References:
65**
66** Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
67** "Expressions for the Celestial Intermediate Pole and Celestial
68** Ephemeris Origin consistent with the IAU 2000A precession-
69** nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
70**
71** n.b. The celestial ephemeris origin (CEO) was renamed "celestial
72** intermediate origin" (CIO) by IAU 2006 Resolution 2.
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 rbpn[3][3], x, y, s;
85
86/* Bias-precession-nutation-matrix, IAU 2000A. */
87 iauPnm00a(date1, date2, rbpn);
88
89/* Extract the CIP coordinates. */
90 iauBpn2xy(rbpn, &x, &y);
91
92/* Compute the CIO locator s, given the CIP coordinates. */
93 s = iauS00(date1, date2, x, y);
94
95 return s;
96
97/*----------------------------------------------------------------------
98**
99** Copyright (C) 2015
100** Standards Of Fundamental Astronomy Board
101** of the International Astronomical Union.
102**
103** =====================
104** SOFA Software License
105** =====================
106**
107** NOTICE TO USER:
108**
109** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
110** CONDITIONS WHICH APPLY TO ITS USE.
111**
112** 1. The Software is owned by the IAU SOFA Board ("SOFA").
113**
114** 2. Permission is granted to anyone to use the SOFA software for any
115** purpose, including commercial applications, free of charge and
116** without payment of royalties, subject to the conditions and
117** restrictions listed below.
118**
119** 3. You (the user) may copy and distribute SOFA source code to others,
120** and use and adapt its code and algorithms in your own software,
121** on a world-wide, royalty-free basis. That portion of your
122** distribution that does not consist of intact and unchanged copies
123** of SOFA source code files is a "derived work" that must comply
124** with the following requirements:
125**
126** a) Your work shall be marked or carry a statement that it
127** (i) uses routines and computations derived by you from
128** software provided by SOFA under license to you; and
129** (ii) does not itself constitute software provided by and/or
130** endorsed by SOFA.
131**
132** b) The source code of your derived work must contain descriptions
133** of how the derived work is based upon, contains and/or differs
134** from the original SOFA software.
135**
136** c) The names of all routines in your derived work shall not
137** include the prefix "iau" or "sofa" or trivial modifications
138** thereof such as changes of case.
139**
140** d) The origin of the SOFA components of your derived work must
141** not be misrepresented; you must not claim that you wrote the
142** original software, nor file a patent application for SOFA
143** software or algorithms embedded in the SOFA software.
144**
145** e) These requirements must be reproduced intact in any source
146** distribution and shall apply to anyone to whom you have
147** granted a further right to modify the source code of your
148** derived work.
149**
150** Note that, as originally distributed, the SOFA software is
151** intended to be a definitive implementation of the IAU standards,
152** and consequently third-party modifications are discouraged. All
153** variations, no matter how minor, must be explicitly marked as
154** such, as explained above.
155**
156** 4. You shall not cause the SOFA software to be brought into
157** disrepute, either by misuse, or use for inappropriate tasks, or
158** by inappropriate modification.
159**
160** 5. The SOFA software is provided "as is" and SOFA makes no warranty
161** as to its use or performance. SOFA does not and cannot warrant
162** the performance or results which the user may obtain by using the
163** SOFA software. SOFA makes no warranties, express or implied, as
164** to non-infringement of third party rights, merchantability, or
165** fitness for any particular purpose. In no event will SOFA be
166** liable to the user for any consequential, incidental, or special
167** damages, including any lost profits or lost savings, even if a
168** SOFA representative has been advised of such damages, or for any
169** claim by any third party.
170**
171** 6. The provision of any version of the SOFA software under the terms
172** and conditions specified herein does not imply that future
173** versions will also be made available under the same terms and
174** conditions.
175*
176** In any published work or commercial product which uses the SOFA
177** software directly, acknowledgement (see www.iausofa.org) is
178** appreciated.
179**
180** Correspondence concerning SOFA software should be addressed as
181** follows:
182**
183** By email: sofa@ukho.gov.uk
184** By post: IAU SOFA Center
185** HM Nautical Almanac Office
186** UK Hydrographic Office
187** Admiralty Way, Taunton
188** Somerset, TA1 2DN
189** United Kingdom
190**
191**--------------------------------------------------------------------*/
192}
Note: See TracBrowser for help on using the repository browser.