1 // ephemeris.hxx -- Top level class for calculating current positions of
2 // astronomical objects
4 // Written by Curtis Olson, started March 2000.
6 // Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #ifndef _EPHEMERIS_HXX
26 #define _EPHEMERIS_HXX
31 #include <Time/fg_time.hxx>
35 #include "mercury.hxx"
38 #include "jupiter.hxx"
41 #include "neptune.hxx"
57 // 9 planets, minus earth, minus pluto which we don't draw = 7
58 // planets[i][0] = Right Ascension
59 // planets[i][1] = Declination
60 // planets[i][2] = Magnitude
69 FGEphemeris( const string &path );
74 // Update (recalculate) the positions of all objects for the
76 void update(FGTime *t, double lat);
79 inline Star *get_sun() const { return our_sun; }
80 inline double getSunRightAscension() const {
81 return our_sun->getRightAscension();
83 inline double getSunDeclination() const {
84 return our_sun->getDeclination();
88 inline Moon *get_moon() const { return moon; }
89 inline double getMoonRightAscension() const {
90 return moon->getRightAscension();
92 inline double getMoonDeclination() const {
93 return moon->getDeclination();
97 inline int getNumPlanets() const { return nplanets; }
98 inline sgdVec3 *getPlanets() { return planets; }
101 inline int getNumStars() const { return stars->getNumStars(); }
102 inline sgdVec3 *getStars() { return stars->getStars(); }
106 #endif // _EPHEMERIS_HXX