Stellarium  0.90.0
EphemWrapper.hpp
1 /*
2 Copyright (C) 2003 Fabien Chereau
3 Copyright (C) 2015 Holger Niessner
4 Copyright (C) 2015 Georg Zotti
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU Library General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
19 */
20 
21 /*
22  * This class provides a wrapper to multiple methods to calculate ephemerides.
23  * Depending on availability of extra data files, the class uses:
24  * - VSOP87 and ELP82B
25  * - DE430
26  * - DE431
27  *
28  * Extending the old stellplanet-class, this updated version now
29  * includes access to DE430 and DE431 for a more precise, yet storage-space intensive solution.
30  */
31 
32 #ifndef _EPHEMWRAPPER_HPP_
33 #define _EPHEMWRAPPER_HPP_
34 
35 #define DE430_FILENAME "linux_p1550p2650.430"
36 #define DE431_FILENAME "lnxm13000p17000.431"
37 
39 public:
40  static void init_de430(const char* filepath);
41  static void init_de431(const char* filepath);
42  static bool jd_fits_de430(const double jd);
43  static bool jd_fits_de431(const double jd);
44 };
45 
46 // These functions have an unused void pointer to be compatible to PosFuncType in SolarSystem and Planet classes.
47 void get_sun_helio_coordsv(double jd,double xyz[3], void*);
48 void get_mercury_helio_coordsv(double jd,double xyz[3], void*);
49 void get_venus_helio_coordsv(double jd,double xyz[3], void*);
50 void get_earth_helio_coordsv(double jd,double xyz[3], void*);
51 void get_mars_helio_coordsv(double jd,double xyz[3], void*);
52 void get_jupiter_helio_coordsv(double jd,double xyz[3], void*);
53 void get_saturn_helio_coordsv(double jd,double xyz[3], void*);
54 void get_uranus_helio_coordsv(double jd,double xyz[3], void*);
55 void get_neptune_helio_coordsv(double jd,double xyz[3], void*);
56 void get_pluto_helio_coordsv(double jd,double xyz[3], void*);
57 
58 void get_mercury_helio_osculating_coords(double jd0,double jd,double xyz[3]);
59 void get_venus_helio_osculating_coords(double jd0,double jd,double xyz[3]);
60 void get_earth_helio_osculating_coords(double jd0,double jd,double xyz[3]);
61 void get_mars_helio_osculating_coords(double jd0,double jd,double xyz[3]);
62 void get_jupiter_helio_osculating_coords(double jd0,double jd,double xyz[3]);
63 void get_saturn_helio_osculating_coords(double jd0,double jd,double xyz[3]);
64 void get_uranus_helio_osculating_coords(double jd0,double jd,double xyz[3]);
65 void get_neptune_helio_osculating_coords(double jd0,double jd,double xyz[3]);
66 void get_pluto_helio_osculating_coords(double jd0,double jd,double xyz[3]);
67 
68 void get_lunar_parent_coordsv(double jde, double xyz[3], void*);
69 
70 void get_phobos_parent_coordsv(double jd,double xyz[3], void*);
71 void get_deimos_parent_coordsv(double jd,double xyz[3], void*);
72 
73 void get_io_parent_coordsv(double jd,double xyz[3], void*);
74 void get_europa_parent_coordsv(double jd,double xyz[3], void*);
75 void get_ganymede_parent_coordsv(double jd,double xyz[3], void*);
76 void get_callisto_parent_coordsv(double jd,double xyz[3], void*);
77 
78 void get_mimas_parent_coordsv(double jd,double xyz[3], void*);
79 void get_enceladus_parent_coordsv(double jd,double xyz[3], void*);
80 void get_tethys_parent_coordsv(double jd,double xyz[3], void*);
81 void get_dione_parent_coordsv(double jd,double xyz[3], void*);
82 void get_rhea_parent_coordsv(double jd,double xyz[3], void*);
83 void get_titan_parent_coordsv(double jd,double xyz[3], void*);
84 void get_hyperion_parent_coordsv(double jd,double xyz[3], void*);
85 void get_iapetus_parent_coordsv(double jd,double xyz[3], void*);
86 
87 void get_miranda_parent_coordsv(double jd,double xyz[3], void*);
88 void get_ariel_parent_coordsv(double jd,double xyz[3], void*);
89 void get_umbriel_parent_coordsv(double jd,double xyz[3], void*);
90 void get_titania_parent_coordsv(double jd,double xyz[3], void*);
91 void get_oberon_parent_coordsv(double jd,double xyz[3], void*);
92 
93 #endif // _EPHEMWRAPPER_HPP_
94 
95