]> git.mxchange.org Git - simgear.git/blobdiff - simgear/ephemeris/ephemeris.cxx
Clamp pitch values rather than just dumping an error message.
[simgear.git] / simgear / ephemeris / ephemeris.cxx
index 069b1216d6c14551b10dafb4bcfd7501d5c823d8..0a11aa6c88076905a55d2ae24628b0c7a82e7ee6 100644 (file)
@@ -5,30 +5,33 @@
 //
 // 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 library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library 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
+// This library 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.
+// Library 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.
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the
+// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+// Boston, MA  02111-1307, USA.
 //
 // $Id$
 
 
+#include <iostream>
+
 #include "ephemeris.hxx"
 
 
 // Constructor
 SGEphemeris::SGEphemeris( const string &path ) {
     our_sun = new Star;
-    moon = new Moon;
+    moon = new MoonPos;
     mercury = new Mercury;
     venus = new Venus;
     mars = new Mars;
@@ -36,7 +39,11 @@ SGEphemeris::SGEphemeris( const string &path ) {
     saturn = new Saturn;
     uranus = new Uranus;
     neptune = new Neptune;
-    stars = new SGStarData( FGPath(path) );
+    nplanets = 7;
+    for ( int i = 0; i < nplanets; ++i ) {
+        sgdSetVec3( planets[i], 0.0, 0.0, 0.0 );
+    }
+    stars = new SGStarData( SGPath(path) );
 }