FACT++  1.0
c2txy.c
Go to the documentation of this file.
1 #include "erfa.h"
2 
3 void eraC2txy(double tta, double ttb, double uta, double utb,
4  double x, double y, double xp, double yp,
5  double rc2t[3][3])
6 /*
7 ** - - - - - - - - -
8 ** e r a C 2 t x y
9 ** - - - - - - - - -
10 **
11 ** Form the celestial to terrestrial matrix given the date, the UT1,
12 ** the CIP coordinates and the polar motion. IAU 2000.
13 **
14 ** Given:
15 ** tta,ttb double TT as a 2-part Julian Date (Note 1)
16 ** uta,utb double UT1 as a 2-part Julian Date (Note 1)
17 ** x,y double Celestial Intermediate Pole (Note 2)
18 ** xp,yp double coordinates of the pole (radians, Note 3)
19 **
20 ** Returned:
21 ** rc2t double[3][3] celestial-to-terrestrial matrix (Note 4)
22 **
23 ** Notes:
24 **
25 ** 1) The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
26 ** apportioned in any convenient way between the arguments uta and
27 ** utb. For example, JD(UT1)=2450123.7 could be expressed in any o
28 ** these ways, among others:
29 **
30 ** uta utb
31 **
32 ** 2450123.7 0.0 (JD method)
33 ** 2451545.0 -1421.3 (J2000 method)
34 ** 2400000.5 50123.2 (MJD method)
35 ** 2450123.5 0.2 (date & time method)
36 **
37 ** The JD method is the most natural and convenient to use in
38 ** cases where the loss of several decimal digits of resolution is
39 ** acceptable. The J2000 and MJD methods are good compromises
40 ** between resolution and convenience. In the case of uta,utb, the
41 ** date & time method is best matched to the Earth rotation angle
42 ** algorithm used: maximum precision is delivered when the uta
43 ** argument is for 0hrs UT1 on the day in question and the utb
44 ** argument lies in the range 0 to 1, or vice versa.
45 **
46 ** 2) The Celestial Intermediate Pole coordinates are the x,y
47 ** components of the unit vector in the Geocentric Celestial
48 ** Reference System.
49 **
50 ** 3) The arguments xp and yp are the coordinates (in radians) of the
51 ** Celestial Intermediate Pole with respect to the International
52 ** Terrestrial Reference System (see IERS Conventions 2003),
53 ** measured along the meridians to 0 and 90 deg west respectively.
54 **
55 ** 4) The matrix rc2t transforms from celestial to terrestrial
56 ** coordinates:
57 **
58 ** [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
59 **
60 ** = rc2t * [CRS]
61 **
62 ** where [CRS] is a vector in the Geocentric Celestial Reference
63 ** System and [TRS] is a vector in the International Terrestrial
64 ** Reference System (see IERS Conventions 2003), ERA is the Earth
65 ** Rotation Angle and RPOM is the polar motion matrix.
66 **
67 ** 5) Although its name does not include "00", This function is in fact
68 ** specific to the IAU 2000 models.
69 **
70 ** Called:
71 ** eraC2ixy celestial-to-intermediate matrix, given X,Y
72 ** eraEra00 Earth rotation angle, IAU 2000
73 ** eraSp00 the TIO locator s', IERS 2000
74 ** eraPom00 polar motion matrix
75 ** eraC2tcio form CIO-based celestial-to-terrestrial matrix
76 **
77 ** Reference:
78 **
79 ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
80 ** IERS Technical Note No. 32, BKG (2004)
81 **
82 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
83 ** Derived, with permission, from the SOFA library. See notes at end of file.
84 */
85 {
86  double rc2i[3][3], era, sp, rpom[3][3];
87 
88 /* Form the celestial-to-intermediate matrix for this TT. */
89  eraC2ixy(tta, ttb, x, y, rc2i);
90 
91 /* Predict the Earth rotation angle for this UT1. */
92  era = eraEra00(uta, utb);
93 
94 /* Estimate s'. */
95  sp = eraSp00(tta, ttb);
96 
97 /* Form the polar motion matrix. */
98  eraPom00(xp, yp, sp, rpom);
99 
100 /* Combine to form the celestial-to-terrestrial matrix. */
101  eraC2tcio(rc2i, era, rpom, rc2t);
102 
103  return;
104 
105 }
106 /*----------------------------------------------------------------------
107 **
108 **
109 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
110 ** All rights reserved.
111 **
112 ** This library is derived, with permission, from the International
113 ** Astronomical Union's "Standards of Fundamental Astronomy" library,
114 ** available from http://www.iausofa.org.
115 **
116 ** The ERFA version is intended to retain identical functionality to
117 ** the SOFA library, but made distinct through different function and
118 ** file names, as set out in the SOFA license conditions. The SOFA
119 ** original has a role as a reference standard for the IAU and IERS,
120 ** and consequently redistribution is permitted only in its unaltered
121 ** state. The ERFA version is not subject to this restriction and
122 ** therefore can be included in distributions which do not support the
123 ** concept of "read only" software.
124 **
125 ** Although the intent is to replicate the SOFA API (other than
126 ** replacement of prefix names) and results (with the exception of
127 ** bugs; any that are discovered will be fixed), SOFA is not
128 ** responsible for any errors found in this version of the library.
129 **
130 ** If you wish to acknowledge the SOFA heritage, please acknowledge
131 ** that you are using a library derived from SOFA, rather than SOFA
132 ** itself.
133 **
134 **
135 ** TERMS AND CONDITIONS
136 **
137 ** Redistribution and use in source and binary forms, with or without
138 ** modification, are permitted provided that the following conditions
139 ** are met:
140 **
141 ** 1 Redistributions of source code must retain the above copyright
142 ** notice, this list of conditions and the following disclaimer.
143 **
144 ** 2 Redistributions in binary form must reproduce the above copyright
145 ** notice, this list of conditions and the following disclaimer in
146 ** the documentation and/or other materials provided with the
147 ** distribution.
148 **
149 ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
150 ** the International Astronomical Union nor the names of its
151 ** contributors may be used to endorse or promote products derived
152 ** from this software without specific prior written permission.
153 **
154 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
155 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
156 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
157 ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
158 ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
159 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
160 ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
161 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
162 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
163 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
164 ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
165 ** POSSIBILITY OF SUCH DAMAGE.
166 **
167 */
double eraSp00(double date1, double date2)
Definition: sp00.c:3
void eraC2txy(double tta, double ttb, double uta, double utb, double x, double y, double xp, double yp, double rc2t[3][3])
Definition: c2txy.c:3
double eraEra00(double dj1, double dj2)
Definition: era00.c:3
void eraC2ixy(double date1, double date2, double x, double y, double rc2i[3][3])
Definition: c2ixy.c:3
void eraPom00(double xp, double yp, double sp, double rpom[3][3])
Definition: pom00.c:3
void eraC2tcio(double rc2i[3][3], double era, double rpom[3][3], double rc2t[3][3])
Definition: c2tcio.c:3