FACT++  1.0
c2tpe.c
Go to the documentation of this file.
1 #include "erfa.h"
2 
3 void eraC2tpe(double tta, double ttb, double uta, double utb,
4  double dpsi, double deps, double xp, double yp,
5  double rc2t[3][3])
6 /*
7 ** - - - - - - - - -
8 ** e r a C 2 t p e
9 ** - - - - - - - - -
10 **
11 ** Form the celestial to terrestrial matrix given the date, the UT1,
12 ** the nutation 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 ** dpsi,deps double nutation (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 of
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 caller is responsible for providing the nutation components;
47 ** they are in longitude and obliquity, in radians and are with
48 ** respect to the equinox and ecliptic of date. For high-accuracy
49 ** applications, free core nutation should be included as well as
50 ** any other relevant corrections to the position of the CIP.
51 **
52 ** 3) The arguments xp and yp are the coordinates (in radians) of the
53 ** Celestial Intermediate Pole with respect to the International
54 ** Terrestrial Reference System (see IERS Conventions 2003),
55 ** measured along the meridians to 0 and 90 deg west respectively.
56 **
57 ** 4) The matrix rc2t transforms from celestial to terrestrial
58 ** coordinates:
59 **
60 ** [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
61 **
62 ** = rc2t * [CRS]
63 **
64 ** where [CRS] is a vector in the Geocentric Celestial Reference
65 ** System and [TRS] is a vector in the International Terrestrial
66 ** Reference System (see IERS Conventions 2003), RBPN is the
67 ** bias-precession-nutation matrix, GST is the Greenwich (apparent)
68 ** Sidereal Time and RPOM is the polar motion matrix.
69 **
70 ** 5) Although its name does not include "00", This function is in fact
71 ** specific to the IAU 2000 models.
72 **
73 ** Called:
74 ** eraPn00 bias/precession/nutation results, IAU 2000
75 ** eraGmst00 Greenwich mean sidereal time, IAU 2000
76 ** eraSp00 the TIO locator s', IERS 2000
77 ** eraEe00 equation of the equinoxes, IAU 2000
78 ** eraPom00 polar motion matrix
79 ** eraC2teqx form equinox-based celestial-to-terrestrial matrix
80 **
81 ** Reference:
82 **
83 ** McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
84 ** IERS Technical Note No. 32, BKG (2004)
85 **
86 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
87 ** Derived, with permission, from the SOFA library. See notes at end of file.
88 */
89 {
90  double epsa, rb[3][3], rp[3][3], rbp[3][3], rn[3][3],
91  rbpn[3][3], gmst, ee, sp, rpom[3][3];
92 
93 /* Form the celestial-to-true matrix for this TT. */
94  eraPn00(tta, ttb, dpsi, deps, &epsa, rb, rp, rbp, rn, rbpn);
95 
96 /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
97  gmst = eraGmst00(uta, utb, tta, ttb);
98 
99 /* Predict the equation of the equinoxes given TT and nutation. */
100  ee = eraEe00(tta, ttb, epsa, dpsi);
101 
102 /* Estimate s'. */
103  sp = eraSp00(tta, ttb);
104 
105 /* Form the polar motion matrix. */
106  eraPom00(xp, yp, sp, rpom);
107 
108 /* Combine to form the celestial-to-terrestrial matrix. */
109  eraC2teqx(rbpn, gmst + ee, rpom, rc2t);
110 
111  return;
112 
113 }
114 /*----------------------------------------------------------------------
115 **
116 **
117 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
118 ** All rights reserved.
119 **
120 ** This library is derived, with permission, from the International
121 ** Astronomical Union's "Standards of Fundamental Astronomy" library,
122 ** available from http://www.iausofa.org.
123 **
124 ** The ERFA version is intended to retain identical functionality to
125 ** the SOFA library, but made distinct through different function and
126 ** file names, as set out in the SOFA license conditions. The SOFA
127 ** original has a role as a reference standard for the IAU and IERS,
128 ** and consequently redistribution is permitted only in its unaltered
129 ** state. The ERFA version is not subject to this restriction and
130 ** therefore can be included in distributions which do not support the
131 ** concept of "read only" software.
132 **
133 ** Although the intent is to replicate the SOFA API (other than
134 ** replacement of prefix names) and results (with the exception of
135 ** bugs; any that are discovered will be fixed), SOFA is not
136 ** responsible for any errors found in this version of the library.
137 **
138 ** If you wish to acknowledge the SOFA heritage, please acknowledge
139 ** that you are using a library derived from SOFA, rather than SOFA
140 ** itself.
141 **
142 **
143 ** TERMS AND CONDITIONS
144 **
145 ** Redistribution and use in source and binary forms, with or without
146 ** modification, are permitted provided that the following conditions
147 ** are met:
148 **
149 ** 1 Redistributions of source code must retain the above copyright
150 ** notice, this list of conditions and the following disclaimer.
151 **
152 ** 2 Redistributions in binary form must reproduce the above copyright
153 ** notice, this list of conditions and the following disclaimer in
154 ** the documentation and/or other materials provided with the
155 ** distribution.
156 **
157 ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
158 ** the International Astronomical Union nor the names of its
159 ** contributors may be used to endorse or promote products derived
160 ** from this software without specific prior written permission.
161 **
162 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
163 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
164 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
165 ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
166 ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
167 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
168 ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
169 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
170 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
171 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
172 ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
173 ** POSSIBILITY OF SUCH DAMAGE.
174 **
175 */
double eraGmst00(double uta, double utb, double tta, double ttb)
Definition: gmst00.c:3
double eraSp00(double date1, double date2)
Definition: sp00.c:3
double eraEe00(double date1, double date2, double epsa, double dpsi)
Definition: ee00.c:3
void eraPom00(double xp, double yp, double sp, double rpom[3][3])
Definition: pom00.c:3
void eraC2tpe(double tta, double ttb, double uta, double utb, double dpsi, double deps, double xp, double yp, double rc2t[3][3])
Definition: c2tpe.c:3
void eraC2teqx(double rbpn[3][3], double gst, double rpom[3][3], double rc2t[3][3])
Definition: c2teqx.c:3
void eraPn00(double date1, double date2, double dpsi, double deps, double *epsa, double rb[3][3], double rp[3][3], double rbp[3][3], double rn[3][3], double rbpn[3][3])
Definition: pn00.c:3