source: branches/FACT++_lidctrl_usb/erfa/src/atciqz.c@ 19758

Last change on this file since 19758 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.1 KB
Line 
1#include "erfa.h"
2
3void eraAtciqz(double rc, double dc, eraASTROM *astrom,
4 double *ri, double *di)
5/*
6** - - - - - - - - - -
7** e r a A t c i q z
8** - - - - - - - - - -
9**
10** Quick ICRS to CIRS transformation, given precomputed star-
11** independent astrometry parameters, and assuming zero parallax and
12** proper motion.
13**
14** Use of this function is appropriate when efficiency is important and
15** where many star positions are to be transformed for one date. The
16** star-independent parameters can be obtained by calling one of the
17** functions eraApci[13], eraApcg[13], eraApco[13] or eraApcs[13].
18**
19** The corresponding function for the case of non-zero parallax and
20** proper motion is eraAtciq.
21**
22** Given:
23** rc,dc double ICRS astrometric RA,Dec (radians)
24** astrom eraASTROM* star-independent astrometry parameters:
25** pmt double PM time interval (SSB, Julian years)
26** eb double[3] SSB to observer (vector, au)
27** eh double[3] Sun to observer (unit vector)
28** em double distance from Sun to observer (au)
29** v double[3] barycentric observer velocity (vector, c)
30** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
31** bpn double[3][3] bias-precession-nutation matrix
32** along double longitude + s' (radians)
33** xpl double polar motion xp wrt local meridian (radians)
34** ypl double polar motion yp wrt local meridian (radians)
35** sphi double sine of geodetic latitude
36** cphi double cosine of geodetic latitude
37** diurab double magnitude of diurnal aberration vector
38** eral double "local" Earth rotation angle (radians)
39** refa double refraction constant A (radians)
40** refb double refraction constant B (radians)
41**
42** Returned:
43** ri,di double CIRS RA,Dec (radians)
44**
45** Note:
46**
47** All the vectors are with respect to BCRS axes.
48**
49** References:
50**
51** Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
52** the Astronomical Almanac, 3rd ed., University Science Books
53** (2013).
54**
55** Klioner, Sergei A., "A practical relativistic model for micro-
56** arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
57**
58** Called:
59** eraS2c spherical coordinates to unit vector
60** eraLdsun light deflection due to Sun
61** eraAb stellar aberration
62** eraRxp product of r-matrix and p-vector
63** eraC2s p-vector to spherical
64** eraAnp normalize angle into range +/- pi
65**
66** Copyright (C) 2013-2016, NumFOCUS Foundation.
67** Derived, with permission, from the SOFA library. See notes at end of file.
68*/
69{
70 double pco[3], pnat[3], ppr[3], pi[3], w;
71
72
73/* BCRS coordinate direction (unit vector). */
74 eraS2c(rc, dc, pco);
75
76/* Light deflection by the Sun, giving BCRS natural direction. */
77 eraLdsun(pco, astrom->eh, astrom->em, pnat);
78
79/* Aberration, giving GCRS proper direction. */
80 eraAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr);
81
82/* Bias-precession-nutation, giving CIRS proper direction. */
83 eraRxp(astrom->bpn, ppr, pi);
84
85/* CIRS RA,Dec. */
86 eraC2s(pi, &w, di);
87 *ri = eraAnp(w);
88
89/* Finished. */
90
91}
92/*----------------------------------------------------------------------
93**
94**
95** Copyright (C) 2013-2016, NumFOCUS Foundation.
96** All rights reserved.
97**
98** This library is derived, with permission, from the International
99** Astronomical Union's "Standards of Fundamental Astronomy" library,
100** available from http://www.iausofa.org.
101**
102** The ERFA version is intended to retain identical functionality to
103** the SOFA library, but made distinct through different function and
104** file names, as set out in the SOFA license conditions. The SOFA
105** original has a role as a reference standard for the IAU and IERS,
106** and consequently redistribution is permitted only in its unaltered
107** state. The ERFA version is not subject to this restriction and
108** therefore can be included in distributions which do not support the
109** concept of "read only" software.
110**
111** Although the intent is to replicate the SOFA API (other than
112** replacement of prefix names) and results (with the exception of
113** bugs; any that are discovered will be fixed), SOFA is not
114** responsible for any errors found in this version of the library.
115**
116** If you wish to acknowledge the SOFA heritage, please acknowledge
117** that you are using a library derived from SOFA, rather than SOFA
118** itself.
119**
120**
121** TERMS AND CONDITIONS
122**
123** Redistribution and use in source and binary forms, with or without
124** modification, are permitted provided that the following conditions
125** are met:
126**
127** 1 Redistributions of source code must retain the above copyright
128** notice, this list of conditions and the following disclaimer.
129**
130** 2 Redistributions in binary form must reproduce the above copyright
131** notice, this list of conditions and the following disclaimer in
132** the documentation and/or other materials provided with the
133** distribution.
134**
135** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
136** the International Astronomical Union nor the names of its
137** contributors may be used to endorse or promote products derived
138** from this software without specific prior written permission.
139**
140** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
141** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
142** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
143** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
144** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
145** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
146** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
147** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
148** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
149** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
150** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
151** POSSIBILITY OF SUCH DAMAGE.
152**
153*/
Note: See TracBrowser for help on using the repository browser.