1 | #include "erfa.h"
|
---|
2 |
|
---|
3 | void eraXys00b(double date1, double date2,
|
---|
4 | double *x, double *y, double *s)
|
---|
5 | /*
|
---|
6 | ** - - - - - - - - - -
|
---|
7 | ** e r a X y s 0 0 b
|
---|
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 2000B
|
---|
12 | ** precession-nutation model.
|
---|
13 | **
|
---|
14 | ** Given:
|
---|
15 | ** date1,date2 double TT as a 2-part Julian Date (Note 1)
|
---|
16 | **
|
---|
17 | ** Returned:
|
---|
18 | ** x,y double Celestial Intermediate Pole (Note 2)
|
---|
19 | ** s double the CIO locator s (Note 2)
|
---|
20 | **
|
---|
21 | ** Notes:
|
---|
22 | **
|
---|
23 | ** 1) The TT date date1+date2 is a Julian Date, apportioned in any
|
---|
24 | ** convenient way between the two arguments. For example,
|
---|
25 | ** JD(TT)=2450123.7 could be expressed in any of these ways,
|
---|
26 | ** among others:
|
---|
27 | **
|
---|
28 | ** date1 date2
|
---|
29 | **
|
---|
30 | ** 2450123.7 0.0 (JD method)
|
---|
31 | ** 2451545.0 -1421.3 (J2000 method)
|
---|
32 | ** 2400000.5 50123.2 (MJD method)
|
---|
33 | ** 2450123.5 0.2 (date & time method)
|
---|
34 | **
|
---|
35 | ** The JD method is the most natural and convenient to use in
|
---|
36 | ** cases where the loss of several decimal digits of resolution
|
---|
37 | ** is acceptable. The J2000 method is best matched to the way
|
---|
38 | ** the argument is handled internally and will deliver the
|
---|
39 | ** optimum resolution. The MJD method and the date & time methods
|
---|
40 | ** are both good compromises between resolution and convenience.
|
---|
41 | **
|
---|
42 | ** 2) The Celestial Intermediate Pole coordinates are the x,y
|
---|
43 | ** components of the unit vector in the Geocentric Celestial
|
---|
44 | ** Reference System.
|
---|
45 | **
|
---|
46 | ** 3) The CIO locator s (in radians) positions the Celestial
|
---|
47 | ** Intermediate Origin on the equator of the CIP.
|
---|
48 | **
|
---|
49 | ** 4) The present function is faster, but slightly less accurate (about
|
---|
50 | ** 1 mas in X,Y), than the eraXys00a function.
|
---|
51 | **
|
---|
52 | ** Called:
|
---|
53 | ** eraPnm00b classical NPB matrix, IAU 2000B
|
---|
54 | ** eraBpn2xy extract CIP X,Y coordinates from NPB matrix
|
---|
55 | ** eraS00 the CIO locator s, given X,Y, IAU 2000A
|
---|
56 | **
|
---|
57 | ** Reference:
|
---|
58 | **
|
---|
59 | ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
|
---|
60 | ** IERS Technical Note No. 32, BKG (2004)
|
---|
61 | **
|
---|
62 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
63 | ** Derived, with permission, from the SOFA library. See notes at end of file.
|
---|
64 | */
|
---|
65 | {
|
---|
66 | double rbpn[3][3];
|
---|
67 |
|
---|
68 | /* Form the bias-precession-nutation matrix, IAU 2000A. */
|
---|
69 | eraPnm00b(date1, date2, rbpn);
|
---|
70 |
|
---|
71 | /* Extract X,Y. */
|
---|
72 | eraBpn2xy(rbpn, x, y);
|
---|
73 |
|
---|
74 | /* Obtain s. */
|
---|
75 | *s = eraS00(date1, date2, *x, *y);
|
---|
76 |
|
---|
77 | return;
|
---|
78 |
|
---|
79 | }
|
---|
80 | /*----------------------------------------------------------------------
|
---|
81 | **
|
---|
82 | **
|
---|
83 | ** Copyright (C) 2013-2015, NumFOCUS Foundation.
|
---|
84 | ** All rights reserved.
|
---|
85 | **
|
---|
86 | ** This library is derived, with permission, from the International
|
---|
87 | ** Astronomical Union's "Standards of Fundamental Astronomy" library,
|
---|
88 | ** available from http://www.iausofa.org.
|
---|
89 | **
|
---|
90 | ** The ERFA version is intended to retain identical functionality to
|
---|
91 | ** the SOFA library, but made distinct through different function and
|
---|
92 | ** file names, as set out in the SOFA license conditions. The SOFA
|
---|
93 | ** original has a role as a reference standard for the IAU and IERS,
|
---|
94 | ** and consequently redistribution is permitted only in its unaltered
|
---|
95 | ** state. The ERFA version is not subject to this restriction and
|
---|
96 | ** therefore can be included in distributions which do not support the
|
---|
97 | ** concept of "read only" software.
|
---|
98 | **
|
---|
99 | ** Although the intent is to replicate the SOFA API (other than
|
---|
100 | ** replacement of prefix names) and results (with the exception of
|
---|
101 | ** bugs; any that are discovered will be fixed), SOFA is not
|
---|
102 | ** responsible for any errors found in this version of the library.
|
---|
103 | **
|
---|
104 | ** If you wish to acknowledge the SOFA heritage, please acknowledge
|
---|
105 | ** that you are using a library derived from SOFA, rather than SOFA
|
---|
106 | ** itself.
|
---|
107 | **
|
---|
108 | **
|
---|
109 | ** TERMS AND CONDITIONS
|
---|
110 | **
|
---|
111 | ** Redistribution and use in source and binary forms, with or without
|
---|
112 | ** modification, are permitted provided that the following conditions
|
---|
113 | ** are met:
|
---|
114 | **
|
---|
115 | ** 1 Redistributions of source code must retain the above copyright
|
---|
116 | ** notice, this list of conditions and the following disclaimer.
|
---|
117 | **
|
---|
118 | ** 2 Redistributions in binary form must reproduce the above copyright
|
---|
119 | ** notice, this list of conditions and the following disclaimer in
|
---|
120 | ** the documentation and/or other materials provided with the
|
---|
121 | ** distribution.
|
---|
122 | **
|
---|
123 | ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
|
---|
124 | ** the International Astronomical Union nor the names of its
|
---|
125 | ** contributors may be used to endorse or promote products derived
|
---|
126 | ** from this software without specific prior written permission.
|
---|
127 | **
|
---|
128 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
129 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
130 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
---|
131 | ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
---|
132 | ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
133 | ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
---|
134 | ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
135 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
---|
136 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
137 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
138 | ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
---|
139 | ** POSSIBILITY OF SUCH DAMAGE.
|
---|
140 | **
|
---|
141 | */
|
---|