~ubuntu-branches/ubuntu/precise/stellarium/precise

« back to all changes in this revision

Viewing changes to src/planetsephems/vsop87.h

  • Committer: Bazaar Package Importer
  • Author(s): Cédric Delfosse
  • Date: 2008-05-19 21:28:23 UTC
  • mfrom: (3.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080519212823-m5nfiuntxstxzxj7
Tags: 0.9.1-4
Add libxcursor-dev, libxfixes-dev, libxinerama-dev, libqt4-opengl-dev to
build-deps (Closes: #479906)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 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.
 
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
 
 
46
 
 
47
#ifndef _VSOP87_H_
 
48
#define _VSOP87_H_
 
49
 
 
50
#ifdef __cplusplus
 
51
extern "C" {
 
52
#endif
 
53
 
 
54
#define VSOP87_MERCURY  0
 
55
#define VSOP87_VENUS    1
 
56
#define VSOP87_EMB      2
 
57
#define VSOP87_MARS     3
 
58
#define VSOP87_JUPITER  4
 
59
#define VSOP87_SATURN   5
 
60
#define VSOP87_URANUS   6
 
61
#define VSOP87_NEPTUNE  7
 
62
 
 
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.
 
69
  */
 
70
 
 
71
void GetVsop87OsculatingCoor(double jd0,double jd,int body,double *xyz);
 
72
  /* The oculating orbit of epoch jd0, evatuated at jd, is returned.
 
73
  */
 
74
 
 
75
#ifdef __cplusplus
 
76
}
 
77
#endif
 
78
 
 
79
#endif