source: branches/FACT++_lidctrl_new_eth/erfa/src/c2t00b.c@ 20115

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