]> git.mxchange.org Git - simgear.git/commitdiff
Added top level ephemeris class.
authorcurt <curt>
Thu, 2 Mar 2000 15:06:14 +0000 (15:06 +0000)
committercurt <curt>
Thu, 2 Mar 2000 15:06:14 +0000 (15:06 +0000)
simgear/ephemeris/ephemeris.cxx [new file with mode: 0644]
simgear/ephemeris/ephemeris.hxx [new file with mode: 0644]

diff --git a/simgear/ephemeris/ephemeris.cxx b/simgear/ephemeris/ephemeris.cxx
new file mode 100644 (file)
index 0000000..a378715
--- /dev/null
@@ -0,0 +1,43 @@
+// ephemeris.cxx -- Top level class for calculating current positions of
+//                  astronomical objects
+//
+// Written by Curtis Olson, started March 2000.
+//
+// Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+
+
+#include "ephemeris.hxx"
+
+
+// Constructor
+FGEphemeris::FGEphemeris( void ) {
+}
+
+
+// Destructor
+FGEphemeris::~FGEphemeris( void ) {
+}
+
+
+// Update (recalculate) the positions of all objects for the specified
+// time
+void FGEphemeris::update( FGTime *t ) {
+    our_sun.updatePosition( t );
+}
+
diff --git a/simgear/ephemeris/ephemeris.hxx b/simgear/ephemeris/ephemeris.hxx
new file mode 100644 (file)
index 0000000..adae302
--- /dev/null
@@ -0,0 +1,63 @@
+// ephemeris.hxx -- Top level class for calculating current positions of
+//                  astronomical objects
+//
+// Written by Curtis Olson, started March 2000.
+//
+// Copyright (C) 2000  Curtis L. Olson - curt@flightgear.org
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+
+
+#ifndef _EPHEMERIS_HXX
+#define _EPHEMERIS_HXX
+
+
+#include <Time/fg_time.hxx>
+
+#include "star.hxx"
+
+
+class FGEphemeris {
+
+    Star our_sun;
+
+public:
+
+    // Constructor
+    FGEphemeris( void );
+
+    // Destructor
+    ~FGEphemeris( void );
+
+    // Update (recalculate) the positions of all objects for the
+    // specified time
+    void update(FGTime *t);
+
+    // sun position
+    inline double getSunRightAscension() {
+       return our_sun.getRightAscension();
+    }
+    inline double getSunDeclination() {
+       return our_sun.getDeclination();
+    }
+
+};
+
+
+#endif // _EPHEMERIS_HXX
+
+