ephemeris.hxx

Go to the documentation of this file.
00001 
00005 // Top level interface written by Curtis Olson, started March 2000.
00006 //
00007 // All the core code underneath this is written by Durk Talsma.  See
00008 // the headers of all the other individual files for details.
00009 //
00010 // Copyright (C) 2000  Curtis L. Olson - http://www.flightgear.org/~curt
00011 //
00012 // This library is free software; you can redistribute it and/or
00013 // modify it under the terms of the GNU Library General Public
00014 // License as published by the Free Software Foundation; either
00015 // version 2 of the License, or (at your option) any later version.
00016 //
00017 // This library is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 // Library General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program; if not, write to the Free Software
00024 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00025 //
00026 // $Id: ephemeris_8hxx-source.html,v 1.15 2007-12-17 15:37:02 curt Exp $
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     // 9 planets, minus earth, minus pluto which we don't draw = 7
00082     // planets[i][0] = Right Ascension
00083     // planets[i][1] = Declination
00084     // planets[i][2] = Magnitude
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 

Generated on Mon Dec 17 09:30:54 2007 for SimGear by  doxygen 1.5.1