#define _EPHEMERIS_HXX
+#include <plib/sg.h>
+
#include <Time/fg_time.hxx>
#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 "stars.hxx"
class FGEphemeris {
- Star our_sun;
+ Star *our_sun;
+ Moon *moon;
+ Mercury *mercury;
+ Venus *venus;
+ Mars *mars;
+ Jupiter *jupiter;
+ Saturn *saturn;
+ Uranus *uranus;
+ Neptune *neptune;
+
+ // 9 planets, minus earth, minus pluto which we don't draw = 7
+ // planets[i][0] = Right Ascension
+ // planets[i][1] = Declination
+ // planets[i][2] = Magnitude
+ int nplanets;
+ sgdVec3 planets[7];
+
+ FGStars *stars;
public:
// Constructor
- FGEphemeris( void );
+ FGEphemeris( const string &path );
// Destructor
~FGEphemeris( void );
// Update (recalculate) the positions of all objects for the
// specified time
- void update(FGTime *t);
+ void update(FGTime *t, double lat);
- // sun position
- inline double getSunRightAscension() {
- return our_sun.getRightAscension();
+ // sun
+ inline Star *get_sun() const { return our_sun; }
+ inline double getSunRightAscension() const {
+ return our_sun->getRightAscension();
+ }
+ inline double getSunDeclination() const {
+ return our_sun->getDeclination();
}
- inline double getSunDeclination() {
- return our_sun.getDeclination();
+
+ // moon
+ inline Moon *get_moon() const { return moon; }
+ inline double getMoonRightAscension() const {
+ return moon->getRightAscension();
}
+ inline double getMoonDeclination() const {
+ return moon->getDeclination();
+ }
+
+ // 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(); }
};