1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
use crate::;
/// Space motion pv−vector to star catalog data
///
/// Convert star position+velocity vector to catalog coordinates.
///
/// This function is part of the International Astronomical Union's
/// SOFA (Standards of Fundamental Astronomy) software collection.
///
/// Status: support function.
///
/// Given (Note 1):
/// ```
/// pv double[2][3] pv-vector (au, au/day)
/// ```
/// Returned (Note 2):
/// ```
/// ra double right ascension (radians)
/// dec double declination (radians)
/// pmr double RA proper motion (radians/year)
/// pmd double Dec proper motion (radians/year)
/// px double parallax (arcsec)
/// rv double radial velocity (km/s, positive = receding)
/// ```
/// Returned (function value):
/// ```
/// int status:
/// 0 = OK
/// -1 = superluminal speed (Note 5)
/// -2 = null position vector
/// ```
/// Notes:
///
/// 1) The specified pv-vector is the coordinate direction (and its rate
/// of change) for the date at which the light leaving the star
/// reached the solar-system barycenter.
///
/// 2) The star data returned by this function are "observables" for an
/// imaginary observer at the solar-system barycenter. Proper motion
/// and radial velocity are, strictly, in terms of barycentric
/// coordinate time, TCB. For most practical applications, it is
/// permissible to neglect the distinction between TCB and ordinary
/// "proper" time on Earth (TT/TAI). The result will, as a rule, be
/// limited by the intrinsic accuracy of the proper-motion and
/// radial-velocity data; moreover, the supplied pv-vector is likely
/// to be merely an intermediate result (for example generated by the
/// function iauStarpv), so that a change of time unit will cancel
/// out overall.
///
/// In accordance with normal star-catalog conventions, the object's
/// right ascension and declination are freed from the effects of
/// secular aberration. The frame, which is aligned to the catalog
/// equator and equinox, is Lorentzian and centered on the SSB.
///
/// Summarizing, the specified pv-vector is for most stars almost
/// identical to the result of applying the standard geometrical
/// "space motion" transformation to the catalog data. The
/// differences, which are the subject of the Stumpff paper cited
/// below, are:
///
/// (i) In stars with significant radial velocity and proper motion,
/// the constantly changing light-time distorts the apparent proper
/// motion. Note that this is a classical, not a relativistic,
/// effect.
///
/// (ii) The transformation complies with special relativity.
///
/// 3) Care is needed with units. The star coordinates are in radians
/// and the proper motions in radians per Julian year, but the
/// parallax is in arcseconds; the radial velocity is in km/s, but
/// the pv-vector result is in au and au/day.
///
/// 4) The proper motions are the rate of change of the right ascension
/// and declination at the catalog epoch and are in radians per Julian
/// year. The RA proper motion is in terms of coordinate angle, not
/// true angle, and will thus be numerically larger at high
/// declinations.
///
/// 5) Straight-line motion at constant speed in the inertial frame is
/// assumed. If the speed is greater than or equal to the speed of
/// light, the function aborts with an error status.
///
/// 6) The inverse transformation is performed by the function iauStarpv.
///
/// Called:
/// ```
/// iauPn decompose p-vector into modulus and direction
/// iauPdp scalar product of two p-vectors
/// iauSxp multiply p-vector by scalar
/// iauPmp p-vector minus p-vector
/// iauPm modulus of p-vector
/// iauPpp p-vector plus p-vector
/// iauPv2s pv-vector to spherical
/// iauAnp normalize angle into range 0 to 2pi
/// ```
/// Reference:
///
/// Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.