source: trunk/FACT++/erfa/src/c2t06a.c@ 18350

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