]> git.mxchange.org Git - simgear.git/blobdiff - simgear/ephemeris/ephemeris.hxx
Fix a build order problem.
[simgear.git] / simgear / ephemeris / ephemeris.hxx
index 7b9a7c42c17f9f69379de884706acf47f689ad8d..5b4f7a10c7532f3b63482c9ffa8710c7e79a3cb9 100644 (file)
@@ -1,23 +1,27 @@
 // ephemeris.hxx -- Top level class for calculating current positions of
 //                  astronomical objects
 //
-// Written by Curtis Olson, started March 2000.
+// Top level interface written by Curtis Olson, started March 2000.
+//
+// All the core code underneath this is written by Durk Talsma.  See
+// the headers of all the other individual files for details.
 //
 // Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
 //
-// This program is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of the
-// License, or (at your option) any later version.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
 //
-// This program is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// General Public License for more details.
+// Library General Public License for more details.
 //
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the
+// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+// Boston, MA  02111-1307, USA.
 //
 // $Id$
 
 #define _EPHEMERIS_HXX
 
 
-#include <plib/sg.h>
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
 
-#include <Time/fg_time.hxx>
+#include <plib/sg.h>
 
-#include "star.hxx"
-#include "moon.hxx"
-#include "mercury.hxx"
-#include "venus.hxx"
-#include "mars.hxx"
-#include "jupiter.hxx"
-#include "saturn.hxx"
-#include "uranus.hxx"
-#include "neptune.hxx"
+#include <simgear/ephemeris/star.hxx>
+#include <simgear/ephemeris/moonpos.hxx>
+#include <simgear/ephemeris/mercury.hxx>
+#include <simgear/ephemeris/venus.hxx>
+#include <simgear/ephemeris/mars.hxx>
+#include <simgear/ephemeris/jupiter.hxx>
+#include <simgear/ephemeris/saturn.hxx>
+#include <simgear/ephemeris/uranus.hxx>
+#include <simgear/ephemeris/neptune.hxx>
+#include <simgear/ephemeris/stardata.hxx>
 
 
-class FGEphemeris {
+class SGEphemeris {
 
     Star *our_sun;
-    Moon *moon;
+    MoonPos *moon;
     Mercury *mercury;
     Venus *venus;
     Mars *mars;
@@ -59,18 +66,20 @@ class FGEphemeris {
     // planets[i][2] = Magnitude
     int nplanets;
     sgdVec3 planets[7];
-    
+
+    SGStarData *stars;
+
 public:
 
     // Constructor
-    FGEphemeris( void );
+    SGEphemeris( const string &path );
 
     // Destructor
-    ~FGEphemeris( void );
+    ~SGEphemeris( void );
 
     // Update (recalculate) the positions of all objects for the
     // specified time
-    void update(FGTime *t, double lat);
+    void update(double mjd, double lst, double lat);
 
     // sun
     inline Star *get_sun() const { return our_sun; }
@@ -82,7 +91,7 @@ public:
     }
 
     // moon
-    inline Moon *get_moon() const { return moon; }
+    inline MoonPos *get_moon() const { return moon; }
     inline double getMoonRightAscension() const {
        return moon->getRightAscension();
     }
@@ -93,6 +102,10 @@ public:
     // planets
     inline int getNumPlanets() const { return nplanets; }
     inline sgdVec3 *getPlanets() { return planets; }
+
+    // planets
+    inline int getNumStars() const { return stars->getNumStars(); }
+    inline sgdVec3 *getStars() { return stars->getStars(); }
 };