FACT++  1.0
atciqz.c
Go to the documentation of this file.
1 #include "erfa.h"
2 
3 void 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-2015, 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 /* BCRS coordinate direction (unit vector). */
73  eraS2c(rc, dc, pco);
74 
75 /* Light deflection by the Sun, giving BCRS natural direction. */
76  eraLdsun(pco, astrom->eh, astrom->em, pnat);
77 
78 /* Aberration, giving GCRS proper direction. */
79  eraAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr);
80 
81 /* Bias-precession-nutation, giving CIRS proper direction. */
82  eraRxp(astrom->bpn, ppr, pi);
83 
84 /* CIRS RA,Dec. */
85  eraC2s(pi, &w, di);
86  *ri = eraAnp(w);
87 
88 /* Finished. */
89 
90 }
91 /*----------------------------------------------------------------------
92 **
93 **
94 ** Copyright (C) 2013-2015, NumFOCUS Foundation.
95 ** All rights reserved.
96 **
97 ** This library is derived, with permission, from the International
98 ** Astronomical Union's "Standards of Fundamental Astronomy" library,
99 ** available from http://www.iausofa.org.
100 **
101 ** The ERFA version is intended to retain identical functionality to
102 ** the SOFA library, but made distinct through different function and
103 ** file names, as set out in the SOFA license conditions. The SOFA
104 ** original has a role as a reference standard for the IAU and IERS,
105 ** and consequently redistribution is permitted only in its unaltered
106 ** state. The ERFA version is not subject to this restriction and
107 ** therefore can be included in distributions which do not support the
108 ** concept of "read only" software.
109 **
110 ** Although the intent is to replicate the SOFA API (other than
111 ** replacement of prefix names) and results (with the exception of
112 ** bugs; any that are discovered will be fixed), SOFA is not
113 ** responsible for any errors found in this version of the library.
114 **
115 ** If you wish to acknowledge the SOFA heritage, please acknowledge
116 ** that you are using a library derived from SOFA, rather than SOFA
117 ** itself.
118 **
119 **
120 ** TERMS AND CONDITIONS
121 **
122 ** Redistribution and use in source and binary forms, with or without
123 ** modification, are permitted provided that the following conditions
124 ** are met:
125 **
126 ** 1 Redistributions of source code must retain the above copyright
127 ** notice, this list of conditions and the following disclaimer.
128 **
129 ** 2 Redistributions in binary form must reproduce the above copyright
130 ** notice, this list of conditions and the following disclaimer in
131 ** the documentation and/or other materials provided with the
132 ** distribution.
133 **
134 ** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
135 ** the International Astronomical Union nor the names of its
136 ** contributors may be used to endorse or promote products derived
137 ** from this software without specific prior written permission.
138 **
139 ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
140 ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
141 ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
142 ** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
143 ** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
144 ** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
145 ** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
146 ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
147 ** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
148 ** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
149 ** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
150 ** POSSIBILITY OF SUCH DAMAGE.
151 **
152 */
void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3])
Definition: ab.c:3
double eh[3]
Definition: erfam.h:19
void eraS2c(double theta, double phi, double c[3])
Definition: s2c.c:3
void eraAtciqz(double rc, double dc, eraASTROM *astrom, double *ri, double *di)
Definition: atciqz.c:3
void eraC2s(double p[3], double *theta, double *phi)
Definition: c2s.c:3
void eraRxp(double r[3][3], double p[3], double rp[3])
Definition: rxp.c:3
double bpn[3][3]
Definition: erfam.h:23
double v[3]
Definition: erfam.h:21
double eraAnp(double a)
Definition: anp.c:3
double em
Definition: erfam.h:20
double bm1
Definition: erfam.h:22
void eraLdsun(double p[3], double e[3], double em, double p1[3])
Definition: ldsun.c:3