source: trunk/FACT++/sofa/src/h2fk5.c@ 18369

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