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