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-2017, 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 |
|
---|
69 | /* Form the bias-precession-nutation matrix, IAU 2000A. */
|
---|
70 | eraPnm00b(date1, date2, rbpn);
|
---|
71 |
|
---|
72 | /* Extract X,Y. */
|
---|
73 | eraBpn2xy(rbpn, x, y);
|
---|
74 |
|
---|
75 | /* Obtain s. */
|
---|
76 | *s = eraS00(date1, date2, *x, *y);
|
---|
77 |
|
---|
78 | return;
|
---|
79 |
|
---|
80 | }
|
---|
81 | /*----------------------------------------------------------------------
|
---|
82 | **
|
---|
83 | **
|
---|
84 | ** Copyright (C) 2013-2017, NumFOCUS Foundation.
|
---|
85 | ** All rights reserved.
|
---|
86 | **
|
---|
87 | ** This library is derived, with permission, from the International
|
---|
88 | ** Astronomical Union's "Standards of Fundamental Astronomy" library,
|
---|
89 | ** available from http://www.iausofa.org.
|
---|
90 | **
|
---|
91 | ** The ERFA version is intended to retain identical functionality to
|
---|
92 | ** the SOFA library, but made distinct through different function and
|
---|
93 | ** file names, as set out in the SOFA license conditions. The SOFA
|
---|
94 | ** original has a role as a reference standard for the IAU and IERS,
|
---|
95 | ** and consequently redistribution is permitted only in its unaltered
|
---|
96 | ** state. The ERFA version is not subject to this restriction and
|
---|
97 | ** therefore can be included in distributions which do not support the
|
---|
98 | ** concept of "read only" software.
|
---|
99 | **
|
---|
100 | ** Although the intent is to replicate the SOFA API (other than
|
---|
101 | ** replacement of prefix names) and results (with the exception of
|
---|
102 | ** bugs; any that are discovered will be fixed), SOFA is not
|
---|
103 | ** responsible for any errors found in this version of the library.
|
---|
104 | **
|
---|
105 | ** If you wish to acknowledge the SOFA heritage, please acknowledge
|
---|
106 | ** that you are using a library derived from SOFA, rather than SOFA
|
---|
107 | ** itself.
|
---|
108 | **
|
---|
109 | **
|
---|
110 | ** TERMS AND CONDITIONS
|
---|
111 | **
|
---|
112 | ** Redistribution and use in source and binary forms, with or without
|
---|
113 | ** modification, are permitted provided that the following conditions
|
---|
114 | ** are met:
|
---|
115 | **
|
---|
116 | ** 1 Redistributions of source code must retain the above copyright
|
---|
117 | ** notice, this list of conditions and the following disclaimer.
|
---|
118 | **
|
---|
119 | ** 2 Redistributions in binary form must reproduce the above copyright
|
---|
120 | ** notice, this list of conditions and the following disclaimer in
|
---|
121 | ** the documentation and/or other materials provided with the
|
---|
122 | ** distribution.
|
---|
123 | **
|
---|
124 | ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
|
---|
125 | ** the International Astronomical Union nor the names of its
|
---|
126 | ** contributors may be used to endorse or promote products derived
|
---|
127 | ** from this software without specific prior written permission.
|
---|
128 | **
|
---|
129 | ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
---|
130 | ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
---|
131 | ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
---|
132 | ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
---|
133 | ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
134 | ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
---|
135 | ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
136 | ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
---|
137 | ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
138 | ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
---|
139 | ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
---|
140 | ** POSSIBILITY OF SUCH DAMAGE.
|
---|
141 | **
|
---|
142 | */
|
---|