]> git.mxchange.org Git - flightgear.git/blobdiff - Astro/moon.cxx
Modifications to incorporate Jon S. Berndts flight model code.
[flightgear.git] / Astro / moon.cxx
index 5ec50f4b5fc99e9b62e2e5280ad54e9be4d9ce09..1c358dcf64a06f9b28770ea7393fc1af0c59d75e 100644 (file)
@@ -22,7 +22,8 @@
  * $Id$
  * (Log is kept at end of this file)
  **************************************************************************/
-#include <Flight/flight.hxx>
+
+#include <FDM/flight.hxx>
 
 #include <string.h>
 #include "moon.hxx"
@@ -112,10 +113,10 @@ void Moon::updatePosition(fgTIME *t, Star *ourSun)
     geoRa, geoDec;
   
   fgAIRCRAFT *air;
-  fgFLIGHT *f;
+  FGInterface *f;
 
   air = &current_aircraft;
-  f = air->flight;
+  f = air->fdm_state;
  
   updateOrbElements(t);
   actTime = fgCalcActTime(t);
@@ -187,8 +188,9 @@ void Moon::updatePosition(fgTIME *t, Star *ourSun)
   // First calculates the moon's parrallax, that is, the apparent size of the 
   // (equatorial) radius of the earth, as seen from the moon 
   mpar = asin ( 1 / r);
-  gclat = FG_Latitude - 0.003358 * sin (2 * DEG_TO_RAD * FG_Latitude);
-  rho = 0.99883 + 0.00167 * cos(2 * DEG_TO_RAD * FG_Latitude);
+  gclat = f->get_Latitude() - 0.003358 * 
+      sin (2 * DEG_TO_RAD * f->get_Latitude() );
+  rho = 0.99883 + 0.00167 * cos(2 * DEG_TO_RAD * f->get_Latitude());
   if (geoRa < 0)
     geoRa += (2*FG_PI);