00001 /************************************************************************** 00002 * star.hxx 00003 * Written by Durk Talsma. Originally started October 1997, for distribution 00004 * with the FlightGear project. Version 2 was written in August and 00005 * September 1998. This code is based upon algorithms and data kindly 00006 * provided by Mr. Paul Schlyter. (pausch@saaf.se). 00007 * 00008 * This library is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Library General Public 00010 * License as published by the Free Software Foundation; either 00011 * version 2 of the License, or (at your option) any later version. 00012 * 00013 * This library is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Library General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU General Public License 00019 * along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00021 * 00022 * $Id: star_8hxx_source.html,v 1.3 2010/02/23 22:10:16 curt Exp $ 00023 **************************************************************************/ 00024 #ifndef _STAR_HXX_ 00025 #define _STAR_HXX_ 00026 00027 00028 #include <simgear/ephemeris/celestialBody.hxx> 00029 00030 00031 class Star : public CelestialBody 00032 { 00033 00034 private: 00035 00036 double xs, ys; // the sun's rectangular geocentric coordinates 00037 double ye, ze; // the sun's rectangularequatorial rectangular geocentric coordinates 00038 double distance; // the sun's distance to the earth 00039 00040 public: 00041 00042 Star (double mjd); 00043 Star (); 00044 ~Star(); 00045 void updatePosition(double mjd); 00046 double getM(); 00047 double getw(); 00048 double getxs(); 00049 double getys(); 00050 double getye(); 00051 double getze(); 00052 double getDistance(); 00053 }; 00054 00055 00056 inline double Star::getM() 00057 { 00058 return M; 00059 } 00060 00061 inline double Star::getw() 00062 { 00063 return w; 00064 } 00065 00066 inline double Star::getxs() 00067 { 00068 return xs; 00069 } 00070 00071 inline double Star::getys() 00072 { 00073 return ys; 00074 } 00075 00076 inline double Star::getye() 00077 { 00078 return ye; 00079 } 00080 00081 inline double Star::getze() 00082 { 00083 return ze; 00084 } 00085 00086 inline double Star::getDistance() 00087 { 00088 return distance; 00089 } 00090 00091 00092 #endif // _STAR_HXX_ 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106