source: trunk/FACT++/sofa/src/xys06a.c@ 18365

Last change on this file since 18365 was 18346, checked in by tbretz, 10 years ago
File size: 6.9 KB
Line 
1#include "sofa.h"
2
3void iauXys06a(double date1, double date2,
4 double *x, double *y, double *s)
5/*
6** - - - - - - - - - -
7** i a u X y s 0 6 a
8** - - - - - - - - - -
9**
10** For a given TT date, compute the X,Y coordinates of the Celestial
11** Intermediate Pole and the CIO locator s, using the IAU 2006
12** precession and IAU 2000A nutation models.
13**
14** This function is part of the International Astronomical Union's
15** SOFA (Standards Of Fundamental Astronomy) software collection.
16**
17** Status: support function.
18**
19** Given:
20** date1,date2 double TT as a 2-part Julian Date (Note 1)
21**
22** Returned:
23** x,y double Celestial Intermediate Pole (Note 2)
24** s double the CIO locator s (Note 2)
25**
26** Notes:
27**
28** 1) The TT date date1+date2 is a Julian Date, apportioned in any
29** convenient way between the two arguments. For example,
30** JD(TT)=2450123.7 could be expressed in any of these ways,
31** among others:
32**
33** date1 date2
34**
35** 2450123.7 0.0 (JD method)
36** 2451545.0 -1421.3 (J2000 method)
37** 2400000.5 50123.2 (MJD method)
38** 2450123.5 0.2 (date & time method)
39**
40** The JD method is the most natural and convenient to use in
41** cases where the loss of several decimal digits of resolution
42** is acceptable. The J2000 method is best matched to the way
43** the argument is handled internally and will deliver the
44** optimum resolution. The MJD method and the date & time methods
45** are both good compromises between resolution and convenience.
46**
47** 2) The Celestial Intermediate Pole coordinates are the x,y components
48** of the unit vector in the Geocentric Celestial Reference System.
49**
50** 3) The CIO locator s (in radians) positions the Celestial
51** Intermediate Origin on the equator of the CIP.
52**
53** 4) Series-based solutions for generating X and Y are also available:
54** see Capitaine & Wallace (2006) and iauXy06.
55**
56** Called:
57** iauPnm06a classical NPB matrix, IAU 2006/2000A
58** iauBpn2xy extract CIP X,Y coordinates from NPB matrix
59** iauS06 the CIO locator s, given X,Y, IAU 2006
60**
61** References:
62**
63** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
64**
65** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
66**
67** This revision: 2013 June 18
68**
69** SOFA release 2015-02-09
70**
71** Copyright (C) 2015 IAU SOFA Board. See notes at end.
72*/
73{
74 double rbpn[3][3];
75
76/* Form the bias-precession-nutation matrix, IAU 2006/2000A. */
77 iauPnm06a(date1, date2, rbpn);
78
79/* Extract X,Y. */
80 iauBpn2xy(rbpn, x, y);
81
82/* Obtain s. */
83 *s = iauS06(date1, date2, *x, *y);
84
85 return;
86
87/*----------------------------------------------------------------------
88**
89** Copyright (C) 2015
90** Standards Of Fundamental Astronomy Board
91** of the International Astronomical Union.
92**
93** =====================
94** SOFA Software License
95** =====================
96**
97** NOTICE TO USER:
98**
99** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
100** CONDITIONS WHICH APPLY TO ITS USE.
101**
102** 1. The Software is owned by the IAU SOFA Board ("SOFA").
103**
104** 2. Permission is granted to anyone to use the SOFA software for any
105** purpose, including commercial applications, free of charge and
106** without payment of royalties, subject to the conditions and
107** restrictions listed below.
108**
109** 3. You (the user) may copy and distribute SOFA source code to others,
110** and use and adapt its code and algorithms in your own software,
111** on a world-wide, royalty-free basis. That portion of your
112** distribution that does not consist of intact and unchanged copies
113** of SOFA source code files is a "derived work" that must comply
114** with the following requirements:
115**
116** a) Your work shall be marked or carry a statement that it
117** (i) uses routines and computations derived by you from
118** software provided by SOFA under license to you; and
119** (ii) does not itself constitute software provided by and/or
120** endorsed by SOFA.
121**
122** b) The source code of your derived work must contain descriptions
123** of how the derived work is based upon, contains and/or differs
124** from the original SOFA software.
125**
126** c) The names of all routines in your derived work shall not
127** include the prefix "iau" or "sofa" or trivial modifications
128** thereof such as changes of case.
129**
130** d) The origin of the SOFA components of your derived work must
131** not be misrepresented; you must not claim that you wrote the
132** original software, nor file a patent application for SOFA
133** software or algorithms embedded in the SOFA software.
134**
135** e) These requirements must be reproduced intact in any source
136** distribution and shall apply to anyone to whom you have
137** granted a further right to modify the source code of your
138** derived work.
139**
140** Note that, as originally distributed, the SOFA software is
141** intended to be a definitive implementation of the IAU standards,
142** and consequently third-party modifications are discouraged. All
143** variations, no matter how minor, must be explicitly marked as
144** such, as explained above.
145**
146** 4. You shall not cause the SOFA software to be brought into
147** disrepute, either by misuse, or use for inappropriate tasks, or
148** by inappropriate modification.
149**
150** 5. The SOFA software is provided "as is" and SOFA makes no warranty
151** as to its use or performance. SOFA does not and cannot warrant
152** the performance or results which the user may obtain by using the
153** SOFA software. SOFA makes no warranties, express or implied, as
154** to non-infringement of third party rights, merchantability, or
155** fitness for any particular purpose. In no event will SOFA be
156** liable to the user for any consequential, incidental, or special
157** damages, including any lost profits or lost savings, even if a
158** SOFA representative has been advised of such damages, or for any
159** claim by any third party.
160**
161** 6. The provision of any version of the SOFA software under the terms
162** and conditions specified herein does not imply that future
163** versions will also be made available under the same terms and
164** conditions.
165*
166** In any published work or commercial product which uses the SOFA
167** software directly, acknowledgement (see www.iausofa.org) is
168** appreciated.
169**
170** Correspondence concerning SOFA software should be addressed as
171** follows:
172**
173** By email: sofa@ukho.gov.uk
174** By post: IAU SOFA Center
175** HM Nautical Almanac Office
176** UK Hydrographic Office
177** Admiralty Way, Taunton
178** Somerset, TA1 2DN
179** United Kingdom
180**
181**--------------------------------------------------------------------*/
182}
Note: See TracBrowser for help on using the repository browser.