]> git.mxchange.org Git - flightgear.git/blobdiff - Astro/celestialBody.cxx
Changes contributed by Durk Talsma:
[flightgear.git] / Astro / celestialBody.cxx
index 35b01e2447bd4199ee99b0f977d73e07c9f1a570..8af66d78b6cd7aaedc847d6fda7e6990fac5cbd5 100644 (file)
@@ -77,7 +77,10 @@ void CelestialBody::updatePosition(fgTIME *t, Star *ourSun)
   xg = xh + ourSun->getxs();
   yg = yh + ourSun->getys();
   zg = zh;
-  
+
+  lonEcl = atan2(yh, xh);
+  latEcl = atan2(zh, sqrt(xh*xh+yh*yh));
+
   xe = xg;
   ye = yg * cos(ecl) - zg * sin(ecl);
   ze = yg * sin(ecl) + zg * cos(ecl);
@@ -167,3 +170,8 @@ double CelestialBody::fgCalcEccAnom(double M, double e)
 
 
 
+
+
+
+
+