7
* Approximate heliocentric position and velocity of major planet
16
* void palPlanet ( double date, int np, double pv[6], int *j );
19
* date = double (Given)
20
* TDB Modified Julian Date (JD-2400000.5).
22
* planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars,
23
* 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune)
24
* pv = double [6] (Returned)
25
* heliocentric x,y,z,xdot,ydot,zdot, J2000, equatorial triad
26
* in units AU and AU/s.
27
* j = int * (Returned)
28
* - -2 = solution didn't converge.
29
* - -1 = illegal np (1-8)
31
* - +1 = warning: year outside 1000-3000
34
* Calculates the approximate heliocentric position and velocity of
35
* the specified major planet.
38
* TIMJ: Tim Jenness (JAC, Hawaii)
39
* {enter_new_authors_here}
42
* - See SOFA iauPlan94 for details
43
* - Note that Pluto is supported in SLA/F but not in this routine
44
* - Status -2 is equivalent to iauPlan94 status +2.
45
* - Note that velocity units here match the SLA/F documentation.
50
* {enter_further_changes_here}
53
* Copyright (C) 2012 Science and Technology Facilities Council.
54
* All Rights Reserved.
57
* This program is free software; you can redistribute it and/or
58
* modify it under the terms of the GNU General Public License as
59
* published by the Free Software Foundation; either version 3 of
60
* the License, or (at your option) any later version.
62
* This program is distributed in the hope that it will be
63
* useful, but WITHOUT ANY WARRANTY; without even the implied
64
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
65
* PURPOSE. See the GNU General Public License for more details.
67
* You should have received a copy of the GNU General Public License
68
* along with this program; if not, write to the Free Software
69
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
73
* {note_any_bugs_here}
81
void palPlanet ( double date, int np, double pv[6], int *j ) {
84
*j = iauPlan94( PAL__MJD0, date, np, iaupv );
86
/* Convert the outputs to the correct form and also correct AU/d
91
pv[3] = iaupv[1][0] / PAL__SPD;
92
pv[4] = iaupv[1][1] / PAL__SPD;
93
pv[5] = iaupv[1][2] / PAL__SPD;
95
/* SLA compatibility for status */