source: branches/FACT++_lidctrl_usb/erfa/src/c2t00a.c@ 19185

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