1
/************************************************************************
3
The PLANETARY SOLUTION VSOP87 by Bretagnon P. and Francou G. can be found at
4
ftp://ftp.imcce.fr/pub/ephem/planets/vsop87
6
I (Johannes Gajdosik) have just taken the data obtained from above
7
(VSOP87.mer,...,VSOP87.nep) and rearranged it into this piece of software.
9
I can neigther allow nor forbid the usage of VSOP87.
10
The copyright notice below covers not the work of Bretagnon P. and Francou G.
11
but just my work, that is the compilation of the VSOP87 data
12
into the software supplied in this file.
15
Copyright (c) 2006 Johannes Gajdosik
17
Permission is hereby granted, free of charge, to any person obtaining a
18
copy of this software and associated documentation files (the "Software"),
19
to deal in the Software without restriction, including without limitation
20
the rights to use, copy, modify, merge, publish, distribute, sublicense,
21
and/or sell copies of the Software, and to permit persons to whom the
22
Software is furnished to do so, subject to the following conditions:
24
The above copyright notice and this permission notice shall be included
25
in all copies or substantial portions of the Software.
27
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
35
This is my implementation of the VSOP87 planetary solution.
36
I tried to optimize for speed by rearranging the terms so that
37
for a given touple of (a[0],a[1],...,a[11]) the values
38
(cos,sin)(a[0]*lambda[0](T)+...a[11]*lambda[11](T))
39
have only to be calculated once.
40
Furthermore I used the addition formulas
42
so that for given T the functions cos and sin have only to be called 12 times.
44
****************************************************************/
54
#define VSOP87_MERCURY 0
55
#define VSOP87_VENUS 1
58
#define VSOP87_JUPITER 4
59
#define VSOP87_SATURN 5
60
#define VSOP87_URANUS 6
61
#define VSOP87_NEPTUNE 7
63
void GetVsop87Coor(double jd,int body,double *xyz);
64
/* Return the rectangular coordinates of the given planet
65
and the given julian date jd expressed in dynamical time (TAI+32.184s).
66
The origin of the xyz-coordinates is the center of the sun.
67
The reference frame is "dynamical equinox and ecliptic J2000",
68
which is the reference frame in VSOP87 and VSOP87A.
71
void GetVsop87OsculatingCoor(double jd0,double jd,int body,double *xyz);
72
/* The oculating orbit of epoch jd0, evatuated at jd, is returned.