]> git.mxchange.org Git - simgear.git/blob - simgear/ephemeris/ephemeris.hxx
59c876f0c7ab0e308d5b5127cb03fd59a03c7e8c
[simgear.git] / simgear / ephemeris / ephemeris.hxx
1 // ephemeris.hxx -- Top level class for calculating current positions of
2 //                  astronomical objects
3 //
4 // Written by Curtis Olson, started March 2000.
5 //
6 // Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
7 //
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
12 //
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 // 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., 675 Mass Ave, Cambridge, MA 02139, USA.
21 //
22 // $Id$
23
24
25 #ifndef _EPHEMERIS_HXX
26 #define _EPHEMERIS_HXX
27
28
29 #include <Time/fg_time.hxx>
30
31 #include "star.hxx"
32 #include "moon.hxx"
33
34
35 class FGEphemeris {
36
37     Star *our_sun;
38     Moon *moon;
39
40 public:
41
42     // Constructor
43     FGEphemeris( void );
44
45     // Destructor
46     ~FGEphemeris( void );
47
48     // Update (recalculate) the positions of all objects for the
49     // specified time
50     void update(FGTime *t);
51
52     // sun position
53     inline double getSunRightAscension() {
54         return our_sun->getRightAscension();
55     }
56     inline double getSunDeclination() {
57         return our_sun->getDeclination();
58     }
59
60     // moon position
61     inline double getMoonRightAscension() {
62         return moon->getRightAscension();
63     }
64     inline double getMoonDeclination() {
65         return moon->getDeclination();
66     }
67 };
68
69
70 #endif // _EPHEMERIS_HXX
71
72