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
35 #include <Time/fg_time.hxx>
39 #include "mercury.hxx"
42 #include "jupiter.hxx"
45 #include "neptune.hxx"
61 // 9 planets, minus earth, minus pluto which we don't draw = 7
62 // planets[i][0] = Right Ascension
63 // planets[i][1] = Declination
64 // planets[i][2] = Magnitude
73 FGEphemeris( const string &path );
78 // Update (recalculate) the positions of all objects for the
80 void update(FGTime *t, double lat);
83 inline Star *get_sun() const { return our_sun; }
84 inline double getSunRightAscension() const {
85 return our_sun->getRightAscension();
87 inline double getSunDeclination() const {
88 return our_sun->getDeclination();
92 inline Moon *get_moon() const { return moon; }
93 inline double getMoonRightAscension() const {
94 return moon->getRightAscension();
96 inline double getMoonDeclination() const {
97 return moon->getDeclination();
101 inline int getNumPlanets() const { return nplanets; }
102 inline sgdVec3 *getPlanets() { return planets; }
105 inline int getNumStars() const { return stars->getNumStars(); }
106 inline sgdVec3 *getStars() { return stars->getStars(); }
110 #endif // _EPHEMERIS_HXX