| 1 | #include "sofa.h"
|
|---|
| 2 |
|
|---|
| 3 | void iauFk52h(double r5, double d5,
|
|---|
| 4 | double dr5, double dd5, double px5, double rv5,
|
|---|
| 5 | double *rh, double *dh,
|
|---|
| 6 | double *drh, double *ddh, double *pxh, double *rvh)
|
|---|
| 7 | /*
|
|---|
| 8 | ** - - - - - - - - -
|
|---|
| 9 | ** i a u F k 5 2 h
|
|---|
| 10 | ** - - - - - - - - -
|
|---|
| 11 | **
|
|---|
| 12 | ** Transform FK5 (J2000.0) star data into the Hipparcos system.
|
|---|
| 13 | **
|
|---|
| 14 | ** This function is part of the International Astronomical Union's
|
|---|
| 15 | ** SOFA (Standards Of Fundamental Astronomy) software collection.
|
|---|
| 16 | **
|
|---|
| 17 | ** Status: support function.
|
|---|
| 18 | **
|
|---|
| 19 | ** Given (all FK5, equinox J2000.0, epoch J2000.0):
|
|---|
| 20 | ** r5 double RA (radians)
|
|---|
| 21 | ** d5 double Dec (radians)
|
|---|
| 22 | ** dr5 double proper motion in RA (dRA/dt, rad/Jyear)
|
|---|
| 23 | ** dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
|
|---|
| 24 | ** px5 double parallax (arcsec)
|
|---|
| 25 | ** rv5 double radial velocity (km/s, positive = receding)
|
|---|
| 26 | **
|
|---|
| 27 | ** Returned (all Hipparcos, epoch J2000.0):
|
|---|
| 28 | ** rh double RA (radians)
|
|---|
| 29 | ** dh double Dec (radians)
|
|---|
| 30 | ** drh double proper motion in RA (dRA/dt, rad/Jyear)
|
|---|
| 31 | ** ddh double proper motion in Dec (dDec/dt, rad/Jyear)
|
|---|
| 32 | ** pxh double parallax (arcsec)
|
|---|
| 33 | ** rvh double radial velocity (km/s, positive = receding)
|
|---|
| 34 | **
|
|---|
| 35 | ** Notes:
|
|---|
| 36 | **
|
|---|
| 37 | ** 1) This function transforms FK5 star positions and proper motions
|
|---|
| 38 | ** into the system of the Hipparcos catalog.
|
|---|
| 39 | **
|
|---|
| 40 | ** 2) The proper motions in RA are dRA/dt rather than
|
|---|
| 41 | ** cos(Dec)*dRA/dt, and are per year rather than per century.
|
|---|
| 42 | **
|
|---|
| 43 | ** 3) The FK5 to Hipparcos transformation is modeled as a pure
|
|---|
| 44 | ** rotation and spin; zonal errors in the FK5 catalog are not
|
|---|
| 45 | ** taken into account.
|
|---|
| 46 | **
|
|---|
| 47 | ** 4) See also iauH2fk5, iauFk5hz, iauHfk5z.
|
|---|
| 48 | **
|
|---|
| 49 | ** Called:
|
|---|
| 50 | ** iauStarpv star catalog data to space motion pv-vector
|
|---|
| 51 | ** iauFk5hip FK5 to Hipparcos rotation and spin
|
|---|
| 52 | ** iauRxp product of r-matrix and p-vector
|
|---|
| 53 | ** iauPxp vector product of two p-vectors
|
|---|
| 54 | ** iauPpp p-vector plus p-vector
|
|---|
| 55 | ** iauPvstar space motion pv-vector to star catalog data
|
|---|
| 56 | **
|
|---|
| 57 | ** Reference:
|
|---|
| 58 | **
|
|---|
| 59 | ** F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
|
|---|
| 60 | **
|
|---|
| 61 | ** This revision: 2013 June 18
|
|---|
| 62 | **
|
|---|
| 63 | ** SOFA release 2015-02-09
|
|---|
| 64 | **
|
|---|
| 65 | ** Copyright (C) 2015 IAU SOFA Board. See notes at end.
|
|---|
| 66 | */
|
|---|
| 67 | {
|
|---|
| 68 | int i;
|
|---|
| 69 | double pv5[2][3], r5h[3][3], s5h[3], wxp[3], vv[3], pvh[2][3];
|
|---|
| 70 |
|
|---|
| 71 | /* FK5 barycentric position/velocity pv-vector (normalized). */
|
|---|
| 72 | iauStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
|
|---|
| 73 |
|
|---|
| 74 | /* FK5 to Hipparcos orientation matrix and spin vector. */
|
|---|
| 75 | iauFk5hip(r5h, s5h);
|
|---|
| 76 |
|
|---|
| 77 | /* Make spin units per day instead of per year. */
|
|---|
| 78 | for ( i = 0; i < 3; s5h[i++] /= 365.25 );
|
|---|
| 79 |
|
|---|
| 80 | /* Orient the FK5 position into the Hipparcos system. */
|
|---|
| 81 | iauRxp(r5h, pv5[0], pvh[0]);
|
|---|
| 82 |
|
|---|
| 83 | /* Apply spin to the position giving an extra space motion component. */
|
|---|
| 84 | iauPxp(pv5[0], s5h, wxp);
|
|---|
| 85 |
|
|---|
| 86 | /* Add this component to the FK5 space motion. */
|
|---|
| 87 | iauPpp(wxp, pv5[1], vv);
|
|---|
| 88 |
|
|---|
| 89 | /* Orient the FK5 space motion into the Hipparcos system. */
|
|---|
| 90 | iauRxp(r5h, vv, pvh[1]);
|
|---|
| 91 |
|
|---|
| 92 | /* Hipparcos pv-vector to spherical. */
|
|---|
| 93 | iauPvstar(pvh, rh, dh, drh, ddh, pxh, rvh);
|
|---|
| 94 |
|
|---|
| 95 | return;
|
|---|
| 96 |
|
|---|
| 97 | /*----------------------------------------------------------------------
|
|---|
| 98 | **
|
|---|
| 99 | ** Copyright (C) 2015
|
|---|
| 100 | ** Standards Of Fundamental Astronomy Board
|
|---|
| 101 | ** of the International Astronomical Union.
|
|---|
| 102 | **
|
|---|
| 103 | ** =====================
|
|---|
| 104 | ** SOFA Software License
|
|---|
| 105 | ** =====================
|
|---|
| 106 | **
|
|---|
| 107 | ** NOTICE TO USER:
|
|---|
| 108 | **
|
|---|
| 109 | ** BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
|
|---|
| 110 | ** CONDITIONS WHICH APPLY TO ITS USE.
|
|---|
| 111 | **
|
|---|
| 112 | ** 1. The Software is owned by the IAU SOFA Board ("SOFA").
|
|---|
| 113 | **
|
|---|
| 114 | ** 2. Permission is granted to anyone to use the SOFA software for any
|
|---|
| 115 | ** purpose, including commercial applications, free of charge and
|
|---|
| 116 | ** without payment of royalties, subject to the conditions and
|
|---|
| 117 | ** restrictions listed below.
|
|---|
| 118 | **
|
|---|
| 119 | ** 3. You (the user) may copy and distribute SOFA source code to others,
|
|---|
| 120 | ** and use and adapt its code and algorithms in your own software,
|
|---|
| 121 | ** on a world-wide, royalty-free basis. That portion of your
|
|---|
| 122 | ** distribution that does not consist of intact and unchanged copies
|
|---|
| 123 | ** of SOFA source code files is a "derived work" that must comply
|
|---|
| 124 | ** with the following requirements:
|
|---|
| 125 | **
|
|---|
| 126 | ** a) Your work shall be marked or carry a statement that it
|
|---|
| 127 | ** (i) uses routines and computations derived by you from
|
|---|
| 128 | ** software provided by SOFA under license to you; and
|
|---|
| 129 | ** (ii) does not itself constitute software provided by and/or
|
|---|
| 130 | ** endorsed by SOFA.
|
|---|
| 131 | **
|
|---|
| 132 | ** b) The source code of your derived work must contain descriptions
|
|---|
| 133 | ** of how the derived work is based upon, contains and/or differs
|
|---|
| 134 | ** from the original SOFA software.
|
|---|
| 135 | **
|
|---|
| 136 | ** c) The names of all routines in your derived work shall not
|
|---|
| 137 | ** include the prefix "iau" or "sofa" or trivial modifications
|
|---|
| 138 | ** thereof such as changes of case.
|
|---|
| 139 | **
|
|---|
| 140 | ** d) The origin of the SOFA components of your derived work must
|
|---|
| 141 | ** not be misrepresented; you must not claim that you wrote the
|
|---|
| 142 | ** original software, nor file a patent application for SOFA
|
|---|
| 143 | ** software or algorithms embedded in the SOFA software.
|
|---|
| 144 | **
|
|---|
| 145 | ** e) These requirements must be reproduced intact in any source
|
|---|
| 146 | ** distribution and shall apply to anyone to whom you have
|
|---|
| 147 | ** granted a further right to modify the source code of your
|
|---|
| 148 | ** derived work.
|
|---|
| 149 | **
|
|---|
| 150 | ** Note that, as originally distributed, the SOFA software is
|
|---|
| 151 | ** intended to be a definitive implementation of the IAU standards,
|
|---|
| 152 | ** and consequently third-party modifications are discouraged. All
|
|---|
| 153 | ** variations, no matter how minor, must be explicitly marked as
|
|---|
| 154 | ** such, as explained above.
|
|---|
| 155 | **
|
|---|
| 156 | ** 4. You shall not cause the SOFA software to be brought into
|
|---|
| 157 | ** disrepute, either by misuse, or use for inappropriate tasks, or
|
|---|
| 158 | ** by inappropriate modification.
|
|---|
| 159 | **
|
|---|
| 160 | ** 5. The SOFA software is provided "as is" and SOFA makes no warranty
|
|---|
| 161 | ** as to its use or performance. SOFA does not and cannot warrant
|
|---|
| 162 | ** the performance or results which the user may obtain by using the
|
|---|
| 163 | ** SOFA software. SOFA makes no warranties, express or implied, as
|
|---|
| 164 | ** to non-infringement of third party rights, merchantability, or
|
|---|
| 165 | ** fitness for any particular purpose. In no event will SOFA be
|
|---|
| 166 | ** liable to the user for any consequential, incidental, or special
|
|---|
| 167 | ** damages, including any lost profits or lost savings, even if a
|
|---|
| 168 | ** SOFA representative has been advised of such damages, or for any
|
|---|
| 169 | ** claim by any third party.
|
|---|
| 170 | **
|
|---|
| 171 | ** 6. The provision of any version of the SOFA software under the terms
|
|---|
| 172 | ** and conditions specified herein does not imply that future
|
|---|
| 173 | ** versions will also be made available under the same terms and
|
|---|
| 174 | ** conditions.
|
|---|
| 175 | *
|
|---|
| 176 | ** In any published work or commercial product which uses the SOFA
|
|---|
| 177 | ** software directly, acknowledgement (see www.iausofa.org) is
|
|---|
| 178 | ** appreciated.
|
|---|
| 179 | **
|
|---|
| 180 | ** Correspondence concerning SOFA software should be addressed as
|
|---|
| 181 | ** follows:
|
|---|
| 182 | **
|
|---|
| 183 | ** By email: sofa@ukho.gov.uk
|
|---|
| 184 | ** By post: IAU SOFA Center
|
|---|
| 185 | ** HM Nautical Almanac Office
|
|---|
| 186 | ** UK Hydrographic Office
|
|---|
| 187 | ** Admiralty Way, Taunton
|
|---|
| 188 | ** Somerset, TA1 2DN
|
|---|
| 189 | ** United Kingdom
|
|---|
| 190 | **
|
|---|
| 191 | **--------------------------------------------------------------------*/
|
|---|
| 192 | }
|
|---|