Stellarium  0.90.0
vsop87.h
1 /************************************************************************
2 
3 The PLANETARY SOLUTION VSOP87 by Bretagnon P. and Francou G. can be found at
4 ftp://ftp.imcce.fr/pub/ephem/planets/vsop87
5 
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.
8 
9 I can neither 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.
13 
14 
15 Copyright (c) 2006 Johannes Gajdosik
16 
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:
23 
24 The above copyright notice and this permission notice shall be included
25 in all copies or substantial portions of the Software.
26 
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
33 SOFTWARE.
34 
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
41  (cos,sin)(x+y) = ...
42 so that for given T the functions cos and sin have only to be called 12 times.
43 
44 
45 ATTENTION! Due to static caching this solution is not reentrant and cannot be parallelized to run in several threads.
46 
47 ****************************************************************/
48 
49 
50 #ifndef _VSOP87_H_
51 #define _VSOP87_H_
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 void GetVsop87Coor(double jd,int body,double *xyz);
58  /* Return the rectangular coordinates of the given planet
59  and the given julian date jd expressed in dynamical time (TAI+32.184s).
60  The origin of the xyz-coordinates is the center of the sun.
61  The reference frame is "dynamical equinox and ecliptic J2000",
62  which is the reference frame in VSOP87 and VSOP87A.
63  */
64 
65 void GetVsop87OsculatingCoor(const double jd0,const double jd, const int body,double *xyz);
66  /* The oculating orbit of epoch jd0, evaluated at jd, is returned.
67  */
68 
69 #ifdef __cplusplus
70 }
71 #endif
72 
73 #endif