00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _EPHEMERIS_HXX
00030 #define _EPHEMERIS_HXX
00031
00032
00033 #include <plib/sg.h>
00034
00035 #include <simgear/ephemeris/star.hxx>
00036 #include <simgear/ephemeris/moonpos.hxx>
00037 #include <simgear/ephemeris/mercury.hxx>
00038 #include <simgear/ephemeris/venus.hxx>
00039 #include <simgear/ephemeris/mars.hxx>
00040 #include <simgear/ephemeris/jupiter.hxx>
00041 #include <simgear/ephemeris/saturn.hxx>
00042 #include <simgear/ephemeris/uranus.hxx>
00043 #include <simgear/ephemeris/neptune.hxx>
00044 #include <simgear/ephemeris/stardata.hxx>
00045
00046
00069 class SGEphemeris {
00070
00071 Star *our_sun;
00072 MoonPos *moon;
00073 Mercury *mercury;
00074 Venus *venus;
00075 Mars *mars;
00076 Jupiter *jupiter;
00077 Saturn *saturn;
00078 Uranus *uranus;
00079 Neptune *neptune;
00080
00081
00082
00083
00084
00085 int nplanets;
00086 sgdVec3 planets[7];
00087
00088 SGStarData *stars;
00089
00090 public:
00091
00098 SGEphemeris( const string &path );
00099
00101 ~SGEphemeris( void );
00102
00113 void update(double mjd, double lst, double lat);
00114
00119 inline Star *get_sun() const { return our_sun; }
00120
00122 inline double getSunRightAscension() const {
00123 return our_sun->getRightAscension();
00124 }
00125
00127 inline double getSunDeclination() const {
00128 return our_sun->getDeclination();
00129 }
00130
00135 inline MoonPos *get_moon() const { return moon; }
00136
00138 inline double getMoonRightAscension() const {
00139 return moon->getRightAscension();
00140 }
00141
00143 inline double getMoonDeclination() const {
00144 return moon->getDeclination();
00145 }
00146
00148 inline int getNumPlanets() const { return nplanets; }
00149
00158 inline sgdVec3 *getPlanets() { return planets; }
00159
00161 inline int getNumStars() const { return stars->getNumStars(); }
00162
00170 inline sgdVec3 *getStars() { return stars->getStars(); }
00171 };
00172
00173
00174 #endif // _EPHEMERIS_HXX
00175
00176