FACT++  1.0
atciq.c
Go to the documentation of this file.
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-2015, 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 /* Proper motion and parallax, giving BCRS coordinate direction. */
74  eraPmpx(rc, dc, pr, pd, px, rv, astrom->pmt, astrom->eb, 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-2015, 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 */
void eraPmpx(double rc, double dc, double pr, double pd, double px, double rv, double pmt, double pob[3], double pco[3])
Definition: pmpx.c:3
void eraAb(double pnat[3], double v[3], double s, double bm1, double ppr[3])
Definition: ab.c:3
double pmt
Definition: erfam.h:17
double eh[3]
Definition: erfam.h:19
void eraAtciq(double rc, double dc, double pr, double pd, double px, double rv, eraASTROM *astrom, double *ri, double *di)
Definition: atciq.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 eb[3]
Definition: erfam.h:18
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