1 // ephemeris.hxx -- Top level class for calculating current positions of
2 // astronomical objects
4 // Top level interface written by Curtis Olson, started March 2000.
6 // All the core code underneath this is written by Durk Talsma. See
7 // the headers of all the other individual files for details.
9 // Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU Library General Public
13 // License as published by the Free Software Foundation; either
14 // version 2 of the License, or (at your option) any later version.
16 // This library is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 // Library General Public License for more details.
21 // You should have received a copy of the GNU Library General Public
22 // License along with this library; if not, write to the
23 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 // Boston, MA 02111-1307, USA.
29 #ifndef _EPHEMERIS_HXX
30 #define _EPHEMERIS_HXX
39 #include <simgear/ephemeris/star.hxx>
40 #include <simgear/ephemeris/moonpos.hxx>
41 #include <simgear/ephemeris/mercury.hxx>
42 #include <simgear/ephemeris/venus.hxx>
43 #include <simgear/ephemeris/mars.hxx>
44 #include <simgear/ephemeris/jupiter.hxx>
45 #include <simgear/ephemeris/saturn.hxx>
46 #include <simgear/ephemeris/uranus.hxx>
47 #include <simgear/ephemeris/neptune.hxx>
48 #include <simgear/ephemeris/stardata.hxx>
63 // 9 planets, minus earth, minus pluto which we don't draw = 7
64 // planets[i][0] = Right Ascension
65 // planets[i][1] = Declination
66 // planets[i][2] = Magnitude
75 SGEphemeris( const string &path );
80 // Update (recalculate) the positions of all objects for the
82 void update(double mjd, double lst, double lat);
85 inline Star *get_sun() const { return our_sun; }
86 inline double getSunRightAscension() const {
87 return our_sun->getRightAscension();
89 inline double getSunDeclination() const {
90 return our_sun->getDeclination();
94 inline MoonPos *get_moon() const { return moon; }
95 inline double getMoonRightAscension() const {
96 return moon->getRightAscension();
98 inline double getMoonDeclination() const {
99 return moon->getDeclination();
103 inline int getNumPlanets() const { return nplanets; }
104 inline sgdVec3 *getPlanets() { return planets; }
107 inline int getNumStars() const { return stars->getNumStars(); }
108 inline sgdVec3 *getStars() { return stars->getStars(); }
112 #endif // _EPHEMERIS_HXX