source: branches/FACT++_part_filenames/erfa/src/c2txy.c@ 20051

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