source: branches/FACT++_lidctrl_new_eth/erfa/src/xys06a.c@ 18795

Last change on this file since 18795 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: 5.5 KB
Line 
1#include "erfa.h"
2
3void eraXys06a(double date1, double date2,
4 double *x, double *y, double *s)
5/*
6** - - - - - - - - - -
7** e r a X y s 0 6 a
8** - - - - - - - - - -
9**
10** For a given TT date, compute the X,Y coordinates of the Celestial
11** Intermediate Pole and the CIO locator s, using the IAU 2006
12** precession and IAU 2000A nutation models.
13**
14** Given:
15** date1,date2 double TT as a 2-part Julian Date (Note 1)
16**
17** Returned:
18** x,y double Celestial Intermediate Pole (Note 2)
19** s double the CIO locator s (Note 2)
20**
21** Notes:
22**
23** 1) The TT date date1+date2 is a Julian Date, apportioned in any
24** convenient way between the two arguments. For example,
25** JD(TT)=2450123.7 could be expressed in any of these ways,
26** among others:
27**
28** date1 date2
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
37** is acceptable. The J2000 method is best matched to the way
38** the argument is handled internally and will deliver the
39** optimum resolution. The MJD method and the date & time methods
40** are both good compromises between resolution and convenience.
41**
42** 2) The Celestial Intermediate Pole coordinates are the x,y components
43** of the unit vector in the Geocentric Celestial Reference System.
44**
45** 3) The CIO locator s (in radians) positions the Celestial
46** Intermediate Origin on the equator of the CIP.
47**
48** 4) Series-based solutions for generating X and Y are also available:
49** see Capitaine & Wallace (2006) and eraXy06.
50**
51** Called:
52** eraPnm06a classical NPB matrix, IAU 2006/2000A
53** eraBpn2xy extract CIP X,Y coordinates from NPB matrix
54** eraS06 the CIO locator s, given X,Y, IAU 2006
55**
56** References:
57**
58** Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
59**
60** Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
61**
62** Copyright (C) 2013-2016, NumFOCUS Foundation.
63** Derived, with permission, from the SOFA library. See notes at end of file.
64*/
65{
66 double rbpn[3][3];
67
68
69/* Form the bias-precession-nutation matrix, IAU 2006/2000A. */
70 eraPnm06a(date1, date2, rbpn);
71
72/* Extract X,Y. */
73 eraBpn2xy(rbpn, x, y);
74
75/* Obtain s. */
76 *s = eraS06(date1, date2, *x, *y);
77
78 return;
79
80}
81/*----------------------------------------------------------------------
82**
83**
84** Copyright (C) 2013-2016, NumFOCUS Foundation.
85** All rights reserved.
86**
87** This library is derived, with permission, from the International
88** Astronomical Union's "Standards of Fundamental Astronomy" library,
89** available from http://www.iausofa.org.
90**
91** The ERFA version is intended to retain identical functionality to
92** the SOFA library, but made distinct through different function and
93** file names, as set out in the SOFA license conditions. The SOFA
94** original has a role as a reference standard for the IAU and IERS,
95** and consequently redistribution is permitted only in its unaltered
96** state. The ERFA version is not subject to this restriction and
97** therefore can be included in distributions which do not support the
98** concept of "read only" software.
99**
100** Although the intent is to replicate the SOFA API (other than
101** replacement of prefix names) and results (with the exception of
102** bugs; any that are discovered will be fixed), SOFA is not
103** responsible for any errors found in this version of the library.
104**
105** If you wish to acknowledge the SOFA heritage, please acknowledge
106** that you are using a library derived from SOFA, rather than SOFA
107** itself.
108**
109**
110** TERMS AND CONDITIONS
111**
112** Redistribution and use in source and binary forms, with or without
113** modification, are permitted provided that the following conditions
114** are met:
115**
116** 1 Redistributions of source code must retain the above copyright
117** notice, this list of conditions and the following disclaimer.
118**
119** 2 Redistributions in binary form must reproduce the above copyright
120** notice, this list of conditions and the following disclaimer in
121** the documentation and/or other materials provided with the
122** distribution.
123**
124** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
125** the International Astronomical Union nor the names of its
126** contributors may be used to endorse or promote products derived
127** from this software without specific prior written permission.
128**
129** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
130** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
131** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
132** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
133** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
134** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
135** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
136** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
137** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
138** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
139** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
140** POSSIBILITY OF SUCH DAMAGE.
141**
142*/
Note: See TracBrowser for help on using the repository browser.