]> git.mxchange.org Git - flightgear.git/blobdiff - src/Time/moonpos.cxx
First quick hack at panel shading.
[flightgear.git] / src / Time / moonpos.cxx
index bd236d7b29bf5d52f8e9f70aeda8166ef9e9d176..7692aea6e3fc17d754c5dcfe5e9081f3cf5e9888 100644 (file)
 #  include <time.h>
 #endif
 
-#include <simgear/logstream.hxx>
 #include <simgear/constants.h>
-#include <simgear/fg_geodesy.hxx>
-#include <simgear/mat3.h>
-#include <simgear/point3d.hxx>
-#include <simgear/polar3d.hxx>
-#include <simgear/vector.hxx>
+#include <simgear/debug/logstream.hxx>
+#include <simgear/math/fg_geodesy.hxx>
+#include <simgear/math/point3d.hxx>
+#include <simgear/math/polar3d.hxx>
+#include <simgear/math/vector.hxx>
 
-#include <Astro/solarsystem.hxx>
+#include <Ephemeris/ephemeris.hxx>
 #include <Main/views.hxx>
 #include <Scenery/scenery.hxx>
 
 #include "fg_time.hxx"
 #include "moonpos.hxx"
 
-extern SolarSystem *solarSystem;
+// extern SolarSystem *solarSystem;
+extern FGEphemeris *ephem;
 
 #undef E
 
@@ -283,7 +283,7 @@ void fgMoonPosition(time_t ssue, double *lon, double *lat) {
      * every ten minutes. (Comment added by Durk Talsma).
      ************************************************************************/
 
-    ecliptic_to_equatorial( SolarSystem::theSolarSystem->getMoon()->getLon(),
+    ecliptic_to_equatorial( ephem->get_moon()->getLon(),
                            0.0, &alpha, &delta );
     tmp = alpha - (FG_2PI/24)*GST(ssue);
     if (tmp < -FG_PI) {
@@ -315,8 +315,8 @@ static void fgMoonPositionGST(double gst, double *lon, double *lat) {
     /* lambda = moon_ecliptic_longitude(ssue); */
     /* ecliptic_to_equatorial(lambda, 0.0, &alpha, &delta); */
     //ecliptic_to_equatorial (solarPosition.lonMoon, 0.0, &alpha, &delta);
-    ecliptic_to_equatorial( SolarSystem::theSolarSystem->getMoon()->getLon(),
-                           SolarSystem::theSolarSystem->getMoon()->getLat(), 
+    ecliptic_to_equatorial( ephem->get_moon()->getLon(),
+                           ephem->get_moon()->getLat(), 
                            &alpha,  &delta );
 
 //    tmp = alpha - (FG_2PI/24)*GST(ssue);