| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauAtciqn(double rc, double dc, double pr, double pd,
|
|---|
| 4 | double px, double rv, iauASTROM *astrom,
|
|---|
| 5 | int n, iauLDBODY b[], double *ri, double *di)
|
|---|
| 6 | /*
|
|---|
| 7 | ** - - - - - - - - - -
|
|---|
| 8 | ** i a u A t c i q n
|
|---|
| 9 | ** - - - - - - - - - -
|
|---|
| 10 | **
|
|---|
| 11 | ** Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
|
|---|
| 12 | ** star-independent astrometry parameters plus a list of light-
|
|---|
| 13 | ** deflecting bodies.
|
|---|
| 14 | **
|
|---|
| 15 | ** Use of this function is appropriate when efficiency is important and
|
|---|
| 16 | ** where many star positions are to be transformed for one date. The
|
|---|
| 17 | ** star-independent parameters can be obtained by calling one of the
|
|---|
| 18 | ** functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
|
|---|
| 19 | **
|
|---|
| 20 | ** If the only light-deflecting body to be taken into account is the
|
|---|
| 21 | ** Sun, the iauAtciq function can be used instead. If in addition the
|
|---|
| 22 | ** parallax and proper motions are zero, the iauAtciqz function can be
|
|---|
| 23 | ** used.
|
|---|
| 24 | **
|
|---|
| 25 | ** This function is part of the International Astronomical Union's
|
|---|
| 26 | ** SOFA (Standards of Fundamental Astronomy) software collection.
|
|---|
| 27 | **
|
|---|
| 28 | ** Status: support function.
|
|---|
| 29 | **
|
|---|
| 30 | ** Given:
|
|---|
| 31 | ** rc,dc double ICRS RA,Dec at J2000.0 (radians)
|
|---|
| 32 | ** pr double RA proper motion (radians/year; Note 3)
|
|---|
| 33 | ** pd double Dec proper motion (radians/year)
|
|---|
| 34 | ** px double parallax (arcsec)
|
|---|
| 35 | ** rv double radial velocity (km/s, +ve if receding)
|
|---|
| 36 | ** astrom iauASTROM* star-independent astrometry parameters:
|
|---|
| 37 | ** pmt double PM time interval (SSB, Julian years)
|
|---|
| 38 | ** eb double[3] SSB to observer (vector, au)
|
|---|
| 39 | ** eh double[3] Sun to observer (unit vector)
|
|---|
| 40 | ** em double distance from Sun to observer (au)
|
|---|
| 41 | ** v double[3] barycentric observer velocity (vector, c)
|
|---|
| 42 | ** bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
|
|---|
| 43 | ** bpn double[3][3] bias-precession-nutation matrix
|
|---|
| 44 | ** along double longitude + s' (radians)
|
|---|
| 45 | ** xpl double polar motion xp wrt local meridian (radians)
|
|---|
| 46 | ** ypl double polar motion yp wrt local meridian (radians)
|
|---|
| 47 | ** sphi double sine of geodetic latitude
|
|---|
| 48 | ** cphi double cosine of geodetic latitude
|
|---|
| 49 | ** diurab double magnitude of diurnal aberration vector
|
|---|
| 50 | ** eral double "local" Earth rotation angle (radians)
|
|---|
| 51 | ** refa double refraction constant A (radians)
|
|---|
| 52 | ** refb double refraction constant B (radians)
|
|---|
| 53 | ** n int number of bodies (Note 3)
|
|---|
| 54 | ** b iauLDBODY[n] data for each of the n bodies (Notes 3,4):
|
|---|
| 55 | ** bm double mass of the body (solar masses, Note 5)
|
|---|
| 56 | ** dl double deflection limiter (Note 6)
|
|---|
| 57 | ** pv [2][3] barycentric PV of the body (au, au/day)
|
|---|
| 58 | **
|
|---|
| 59 | ** Returned:
|
|---|
| 60 | ** ri,di double CIRS RA,Dec (radians)
|
|---|
| 61 | **
|
|---|
| 62 | ** Notes:
|
|---|
| 63 | **
|
|---|
| 64 | ** 1) Star data for an epoch other than J2000.0 (for example from the
|
|---|
| 65 | ** Hipparcos catalog, which has an epoch of J1991.25) will require a
|
|---|
| 66 | ** preliminary call to iauPmsafe before use.
|
|---|
| 67 | **
|
|---|
| 68 | ** 2) The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
|
|---|
| 69 | **
|
|---|
| 70 | ** 3) The struct b contains n entries, one for each body to be
|
|---|
| 71 | ** considered. If n = 0, no gravitational light deflection will be
|
|---|
| 72 | ** applied, not even for the Sun.
|
|---|
| 73 | **
|
|---|
| 74 | ** 4) The struct b should include an entry for the Sun as well as for
|
|---|
| 75 | ** any planet or other body to be taken into account. The entries
|
|---|
| 76 | ** should be in the order in which the light passes the body.
|
|---|
| 77 | **
|
|---|
| 78 | ** 5) In the entry in the b struct for body i, the mass parameter
|
|---|
| 79 | ** b[i].bm can, as required, be adjusted in order to allow for such
|
|---|
| 80 | ** effects as quadrupole field.
|
|---|
| 81 | **
|
|---|
| 82 | ** 6) The deflection limiter parameter b[i].dl is phi^2/2, where phi is
|
|---|
| 83 | ** the angular separation (in radians) between star and body at
|
|---|
| 84 | ** which limiting is applied. As phi shrinks below the chosen
|
|---|
| 85 | ** threshold, the deflection is artificially reduced, reaching zero
|
|---|
| 86 | ** for phi = 0. Example values suitable for a terrestrial
|
|---|
| 87 | ** observer, together with masses, are as follows:
|
|---|
| 88 | **
|
|---|
| 89 | ** body i b[i].bm b[i].dl
|
|---|
| 90 | **
|
|---|
| 91 | ** Sun 1.0 6e-6
|
|---|
| 92 | ** Jupiter 0.00095435 3e-9
|
|---|
| 93 | ** Saturn 0.00028574 3e-10
|
|---|
| 94 | **
|
|---|
| 95 | ** 7) For efficiency, validation of the contents of the b array is
|
|---|
| 96 | ** omitted. The supplied masses must be greater than zero, the
|
|---|
| 97 | ** position and velocity vectors must be right, and the deflection
|
|---|
| 98 | ** limiter greater than zero.
|
|---|
| 99 | **
|
|---|
| 100 | ** Called:
|
|---|
| 101 | ** iauPmpx proper motion and parallax
|
|---|
| 102 | ** iauLdn light deflection by n bodies
|
|---|
| 103 | ** iauAb stellar aberration
|
|---|
| 104 | ** iauRxp product of r-matrix and pv-vector
|
|---|
| 105 | ** iauC2s p-vector to spherical
|
|---|
| 106 | ** iauAnp normalize angle into range 0 to 2pi
|
|---|
| 107 | **
|
|---|
| 108 | ** This revision: 2013 October 9
|
|---|
| 109 | **
|
|---|
| 110 | ** SOFA release 2015-02-09
|
|---|
| 111 | **
|
|---|
| 112 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 113 | */
|
|---|
| 114 | {
|
|---|
| 115 | double pco[3], pnat[3], ppr[3], pi[3], w;
|
|---|
| 116 |
|
|---|
| 117 | /* Proper motion and parallax, giving BCRS coordinate direction. */
|
|---|
| 118 | iauPmpx(rc, dc, pr, pd, px, rv, astrom->pmt, astrom->eb, pco);
|
|---|
| 119 |
|
|---|
| 120 | /* Light deflection, giving BCRS natural direction. */
|
|---|
| 121 | iauLdn(n, b, astrom->eb, pco, pnat);
|
|---|
| 122 |
|
|---|
| 123 | /* Aberration, giving GCRS proper direction. */
|
|---|
| 124 | iauAb(pnat, astrom->v, astrom->em, astrom->bm1, ppr);
|
|---|
| 125 |
|
|---|
| 126 | /* Bias-precession-nutation, giving CIRS proper direction. */
|
|---|
| 127 | iauRxp(astrom->bpn, ppr, pi);
|
|---|
| 128 |
|
|---|
| 129 | /* CIRS RA,Dec. */
|
|---|
| 130 | iauC2s(pi, &w, di);
|
|---|
| 131 | *ri = iauAnp(w);
|
|---|
| 132 |
|
|---|
| 133 | /* Finished. */
|
|---|
| 134 |
|
|---|
| 135 | /*----------------------------------------------------------------------
|
|---|
| 136 | **
|
|---|
| 137 | ** Copyright (C) 2015
|
|---|
| 138 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 139 | ** of the International Astronomical Union.
|
|---|
| 140 | **
|
|---|
| 141 | ** =====================
|
|---|
| 142 | ** SOFA Software License
|
|---|
| 143 | ** =====================
|
|---|
| 144 | **
|
|---|
| 145 | ** NOTICE TO USER:
|
|---|
| 146 | **
|
|---|
| 147 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 148 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 149 | **
|
|---|
| 150 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 151 | **
|
|---|
| 152 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 153 | ** purpose, including commercial applications, free of charge and
|
|---|
| 154 | ** without payment of royalties, subject to the conditions and
|
|---|
| 155 | ** restrictions listed below.
|
|---|
| 156 | **
|
|---|
| 157 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 158 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 159 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 160 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 161 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 162 | ** with the following requirements:
|
|---|
| 163 | **
|
|---|
| 164 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 165 | ** (i) uses routines and computations derived by you from
|
|---|
| 166 | ** software provided by SOFA under license to you; and
|
|---|
| 167 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 168 | ** endorsed by SOFA.
|
|---|
| 169 | **
|
|---|
| 170 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 171 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 172 | ** from the original SOFA software.
|
|---|
| 173 | **
|
|---|
| 174 | ** c) The names of all routines in your derived work shall not
|
|---|
| 175 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 176 | ** thereof such as changes of case.
|
|---|
| 177 | **
|
|---|
| 178 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 179 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 180 | ** original software, nor file a patent application for SOFA
|
|---|
| 181 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 182 | **
|
|---|
| 183 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 184 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 185 | ** granted a further right to modify the source code of your
|
|---|
| 186 | ** derived work.
|
|---|
| 187 | **
|
|---|
| 188 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 189 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 190 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 191 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 192 | ** such, as explained above.
|
|---|
| 193 | **
|
|---|
| 194 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 195 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 196 | ** by inappropriate modification.
|
|---|
| 197 | **
|
|---|
| 198 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 199 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 200 | ** the performance or results which the user may obtain by using the
|
|---|
| 201 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 202 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 203 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 204 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 205 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 206 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 207 | ** claim by any third party.
|
|---|
| 208 | **
|
|---|
| 209 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 210 | ** and conditions specified herein does not imply that future
|
|---|
| 211 | ** versions will also be made available under the same terms and
|
|---|
| 212 | ** conditions.
|
|---|
| 213 | *
|
|---|
| 214 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 215 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 216 | ** appreciated.
|
|---|
| 217 | **
|
|---|
| 218 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 219 | ** follows:
|
|---|
| 220 | **
|
|---|
| 221 | ** By email: sofa@ukho.gov.uk
|
|---|
| 222 | ** By post: IAU SOFA Center
|
|---|
| 223 | ** HM Nautical Almanac Office
|
|---|
| 224 | ** UK Hydrographic Office
|
|---|
| 225 | ** Admiralty Way, Taunton
|
|---|
| 226 | ** Somerset, TA1 2DN
|
|---|
| 227 | ** United Kingdom
|
|---|
| 228 | **
|
|---|
| 229 | **--------------------------------------------------------------------*/
|
|---|
| 230 |
|
|---|
| 231 | }
|
|---|