File Coverage

erfasrc/src/c2t06a.c
Criterion Covered Total %
statement 0 7 0.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 0 7 0.0


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