]> git.mxchange.org Git - simgear.git/blob - simgear/ephemeris/star.hxx
Attached patches remove BORLANDC, and hence SG_MATH_EXCEPTION_CLASH and SG_INCOM
[simgear.git] / simgear / ephemeris / star.hxx
1 /**************************************************************************
2  * star.hxx
3  * Written by Durk Talsma. Originally started October 1997, for distribution  
4  * with the FlightGear project. Version 2 was written in August and 
5  * September 1998. This code is based upon algorithms and data kindly 
6  * provided by Mr. Paul Schlyter. (pausch@saaf.se). 
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21  *
22  * $Id$
23  **************************************************************************/
24 #ifndef _STAR_HXX_
25 #define _STAR_HXX_
26
27
28 #include <simgear/ephemeris/celestialBody.hxx>
29
30
31 class Star : public CelestialBody
32 {
33
34 private:
35
36     double xs, ys;     // the sun's rectangular geocentric coordinates
37     double ye, ze;     // the sun's rectangularequatorial rectangular geocentric coordinates
38     double distance;   // the sun's distance to the earth
39
40 public:
41
42     Star (double mjd);
43     Star ();
44     ~Star();
45     void updatePosition(double mjd);
46     double getM();
47     double getw();
48     double getxs();
49     double getys();
50     double getye();
51     double getze();
52     double getDistance();
53 };
54
55
56 inline double Star::getM()
57 {
58   return M;
59 }
60
61 inline double Star::getw()
62 {
63   return w;
64 }
65
66 inline double Star::getxs()
67 {
68   return xs;
69 }
70
71 inline double Star::getys()
72 {
73   return ys;
74 }
75
76 inline double Star::getye()
77 {
78    return ye;
79 }
80
81 inline double Star::getze()
82 {
83    return ze;
84 }
85
86 inline double Star::getDistance()
87 {
88   return distance;
89 }
90
91
92 #endif // _STAR_HXX_
93
94
95
96
97
98
99
100
101
102
103
104
105
106