source: trunk/FACT++/erfa/src/c2t00a.c@ 18679

Last change on this file since 18679 was 18348, checked in by tbretz, 9 years ago
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-2015, 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/* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */
84 eraC2i00a(tta, ttb, rc2i );
85
86/* Predict the Earth rotation angle for this UT1. */
87 era = eraEra00(uta, utb);
88
89/* Estimate s'. */
90 sp = eraSp00(tta, ttb);
91
92/* Form the polar motion matrix. */
93 eraPom00(xp, yp, sp, rpom);
94
95/* Combine to form the celestial-to-terrestrial matrix. */
96 eraC2tcio(rc2i, era, rpom, rc2t);
97
98 return;
99
100}
101/*----------------------------------------------------------------------
102**
103**
104** Copyright (C) 2013-2015, NumFOCUS Foundation.
105** All rights reserved.
106**
107** This library is derived, with permission, from the International
108** Astronomical Union's "Standards of Fundamental Astronomy" library,
109** available from http://www.iausofa.org.
110**
111** The ERFA version is intended to retain identical functionality to
112** the SOFA library, but made distinct through different function and
113** file names, as set out in the SOFA license conditions. The SOFA
114** original has a role as a reference standard for the IAU and IERS,
115** and consequently redistribution is permitted only in its unaltered
116** state. The ERFA version is not subject to this restriction and
117** therefore can be included in distributions which do not support the
118** concept of "read only" software.
119**
120** Although the intent is to replicate the SOFA API (other than
121** replacement of prefix names) and results (with the exception of
122** bugs; any that are discovered will be fixed), SOFA is not
123** responsible for any errors found in this version of the library.
124**
125** If you wish to acknowledge the SOFA heritage, please acknowledge
126** that you are using a library derived from SOFA, rather than SOFA
127** itself.
128**
129**
130** TERMS AND CONDITIONS
131**
132** Redistribution and use in source and binary forms, with or without
133** modification, are permitted provided that the following conditions
134** are met:
135**
136** 1 Redistributions of source code must retain the above copyright
137** notice, this list of conditions and the following disclaimer.
138**
139** 2 Redistributions in binary form must reproduce the above copyright
140** notice, this list of conditions and the following disclaimer in
141** the documentation and/or other materials provided with the
142** distribution.
143**
144** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
145** the International Astronomical Union nor the names of its
146** contributors may be used to endorse or promote products derived
147** from this software without specific prior written permission.
148**
149** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
150** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
151** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
152** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
153** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
154** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
155** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
156** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
157** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
158** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
159** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
160** POSSIBILITY OF SUCH DAMAGE.
161**
162*/
Note: See TracBrowser for help on using the repository browser.