Stellarium  0.90.0
gust86.h
1 /************************************************************************
2 
3 COMPUTATION OF THE COORDINATES OF THE URANIAN SATELLITES (GUST86),
4 version 0.1 (1988,1995) by LASKAR J. and JACOBSON, R. can be found at
5 ftp://ftp.imcce.fr/pub/ephem/satel/gust86
6 
7 I (Johannes Gajdosik) have just taken the Fortran code and data
8 obtained from above and rearranged it into this piece of software.
9 
10 I can neither allow nor forbid the usage of the GUST86 theory.
11 The copyright notice below covers not the works of LASKAR J. and JACOBSON, R.,
12 but just my work, that is the compilation of the GUST86 theory
13 into the software supplied in this file.
14 
15 
16 Copyright (c) 2005 Johannes Gajdosik
17 
18 Permission is hereby granted, free of charge, to any person obtaining a
19 copy of this software and associated documentation files (the "Software"),
20 to deal in the Software without restriction, including without limitation
21 the rights to use, copy, modify, merge, publish, distribute, sublicense,
22 and/or sell copies of the Software, and to permit persons to whom the
23 Software is furnished to do so, subject to the following conditions:
24 
25 The above copyright notice and this permission notice shall be included
26 in all copies or substantial portions of the Software.
27 
28 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
34 SOFTWARE.
35 
36 My implementation of GUST86 has the following modifications:
37 1) Rotate results to "dynamical equinox and ecliptic J2000",
38  the reference frame of VSOP87 and VSOP87A:
39  The rotation matrix Gust86ToJ2000 can be derived from gust86.f,
40  the rotation J2000ToVsop87 can be derived from vsop87.doc.
41 2) units used in calculations: julian day, AU, rad
42 3) use the same function EllipticToRectangular that I use in TASS17.
43 4) calculate the orbital elements not for every new jd but rather reuse
44  the previousely calculated elements if possible
45 
46  WARNING! Due to static internal variables, this function is not reentrant and not parallelizable!
47 ****************************************************************/
48 
49 
50 #ifndef _GUST86_H_
51 #define _GUST86_H_
52 
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56 
57 #define GUST86_MIRANDA 0
58 #define GUST86_ARIEL 1
59 #define GUST86_UMBRIEL 2
60 #define GUST86_TITANIA 3
61 #define GUST86_OBERON 4
62 
63 void GetGust86Coor(const double jd, const int body, double *xyz);
64  /* Return the rectangular coordinates of the given satellite
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 planet.
67  The reference frame is "dynamical equinox and ecliptic J2000",
68  which is the reference frame in VSOP87 and VSOP87A.
69 
70  According to vsop87.doc VSOP87 coordinates can be transformed to
71  FK5 (=J2000=ICRF for our accuracy requirements) by
72  X cos(psi) -sin(psi) 0 1 0 0 X
73  Y = sin(psi) cos(psi) 0 * 0 cos(eps) -sin(eps) * Y
74  Z FK5 0 0 1 0 sin(eps) cos(eps) Z VSOP87
75  with psi = -0.0000275 degrees = -0.099 arcsec and
76  eps = 23.4392803055556 degrees = 23d26m21.4091sec.
77 
78  http://ssd.jpl.nasa.gov/horizons_doc.html#frames says:
79  "J2000" selects an Earth Mean-Equator and dynamical Equinox of
80  Epoch J2000.0 inertial reference system, where the Epoch of J2000.0
81  is the Julian date 2451545.0. "Mean" indicates nutation effects are
82  ignored in the frame definition. The system is aligned with the
83  IAU-sponsored J2000 frame of the Radio Source Catalog of the
84  International Earth Rotational Service (ICRF).
85  The ICRF is thought to differ from FK5 by at most 0.01 arcsec.
86 
87  From this I conclude that in the context of stellarium
88  ICRF, J2000 and FK5 are the same, while the transformation
89  ICRF <-> VSOP87 must be done with the matrix given above.
90  */
91 
92 void GetGust86OsculatingCoor(const double jd0, const double jd, const int body, double *xyz);
93  /* The oculating orbit of epoch jd0, evaluated at jd, is returned.
94  */
95 
96 #ifdef __cplusplus
97 }
98 #endif
99 
100 #endif