source: branches/FACT++_part_filenames/erfa/src/fk52h.c@ 19133

Last change on this file since 19133 was 18711, checked in by tbretz, 8 years ago
Updated to ERFA 1.3.0 (no relevant code change except the leap second at the beginning of 2017)
File size: 5.8 KB
Line 
1#include "erfa.h"
2
3void eraFk52h(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** e r a F k 5 2 h
10** - - - - - - - - -
11**
12** Transform FK5 (J2000.0) star data into the Hipparcos system.
13**
14** Given (all FK5, equinox J2000.0, epoch J2000.0):
15** r5 double RA (radians)
16** d5 double Dec (radians)
17** dr5 double proper motion in RA (dRA/dt, rad/Jyear)
18** dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
19** px5 double parallax (arcsec)
20** rv5 double radial velocity (km/s, positive = receding)
21**
22** Returned (all Hipparcos, epoch J2000.0):
23** rh double RA (radians)
24** dh double Dec (radians)
25** drh double proper motion in RA (dRA/dt, rad/Jyear)
26** ddh double proper motion in Dec (dDec/dt, rad/Jyear)
27** pxh double parallax (arcsec)
28** rvh double radial velocity (km/s, positive = receding)
29**
30** Notes:
31**
32** 1) This function transforms FK5 star positions and proper motions
33** into the system of the Hipparcos catalog.
34**
35** 2) The proper motions in RA are dRA/dt rather than
36** cos(Dec)*dRA/dt, and are per year rather than per century.
37**
38** 3) The FK5 to Hipparcos transformation is modeled as a pure
39** rotation and spin; zonal errors in the FK5 catalog are not
40** taken into account.
41**
42** 4) See also eraH2fk5, eraFk5hz, eraHfk5z.
43**
44** Called:
45** eraStarpv star catalog data to space motion pv-vector
46** eraFk5hip FK5 to Hipparcos rotation and spin
47** eraRxp product of r-matrix and p-vector
48** eraPxp vector product of two p-vectors
49** eraPpp p-vector plus p-vector
50** eraPvstar space motion pv-vector to star catalog data
51**
52** Reference:
53**
54** F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
55**
56** Copyright (C) 2013-2016, NumFOCUS Foundation.
57** Derived, with permission, from the SOFA library. See notes at end of file.
58*/
59{
60 int i;
61 double pv5[2][3], r5h[3][3], s5h[3], wxp[3], vv[3], pvh[2][3];
62
63
64/* FK5 barycentric position/velocity pv-vector (normalized). */
65 eraStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
66
67/* FK5 to Hipparcos orientation matrix and spin vector. */
68 eraFk5hip(r5h, s5h);
69
70/* Make spin units per day instead of per year. */
71 for ( i = 0; i < 3; s5h[i++] /= 365.25 );
72
73/* Orient the FK5 position into the Hipparcos system. */
74 eraRxp(r5h, pv5[0], pvh[0]);
75
76/* Apply spin to the position giving an extra space motion component. */
77 eraPxp(pv5[0], s5h, wxp);
78
79/* Add this component to the FK5 space motion. */
80 eraPpp(wxp, pv5[1], vv);
81
82/* Orient the FK5 space motion into the Hipparcos system. */
83 eraRxp(r5h, vv, pvh[1]);
84
85/* Hipparcos pv-vector to spherical. */
86 eraPvstar(pvh, rh, dh, drh, ddh, pxh, rvh);
87
88 return;
89
90}
91/*----------------------------------------------------------------------
92**
93**
94** Copyright (C) 2013-2016, NumFOCUS Foundation.
95** All rights reserved.
96**
97** This library is derived, with permission, from the International
98** Astronomical Union's "Standards of Fundamental Astronomy" library,
99** available from http://www.iausofa.org.
100**
101** The ERFA version is intended to retain identical functionality to
102** the SOFA library, but made distinct through different function and
103** file names, as set out in the SOFA license conditions. The SOFA
104** original has a role as a reference standard for the IAU and IERS,
105** and consequently redistribution is permitted only in its unaltered
106** state. The ERFA version is not subject to this restriction and
107** therefore can be included in distributions which do not support the
108** concept of "read only" software.
109**
110** Although the intent is to replicate the SOFA API (other than
111** replacement of prefix names) and results (with the exception of
112** bugs; any that are discovered will be fixed), SOFA is not
113** responsible for any errors found in this version of the library.
114**
115** If you wish to acknowledge the SOFA heritage, please acknowledge
116** that you are using a library derived from SOFA, rather than SOFA
117** itself.
118**
119**
120** TERMS AND CONDITIONS
121**
122** Redistribution and use in source and binary forms, with or without
123** modification, are permitted provided that the following conditions
124** are met:
125**
126** 1 Redistributions of source code must retain the above copyright
127** notice, this list of conditions and the following disclaimer.
128**
129** 2 Redistributions in binary form must reproduce the above copyright
130** notice, this list of conditions and the following disclaimer in
131** the documentation and/or other materials provided with the
132** distribution.
133**
134** 3 Neither the name of the Standards Of Fundamental Astronomy Board,
135** the International Astronomical Union nor the names of its
136** contributors may be used to endorse or promote products derived
137** from this software without specific prior written permission.
138**
139** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
140** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
141** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
142** FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
143** COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
144** INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
145** BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
146** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
147** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
148** LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
149** ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
150** POSSIBILITY OF SUCH DAMAGE.
151**
152*/
Note: See TracBrowser for help on using the repository browser.