* $Id$
* (Log is kept at end of this file)
**************************************************************************/
-#include <Flight/flight.hxx>
+
+#include <FDM/flight.hxx>
#include <string.h>
#include "moon.hxx"
#include <Debug/logstream.hxx>
#include <Objects/texload.h>
+
+#ifdef __BORLANDC__
+# define exception c_exception
+#endif
+#include <math.h>
+
static GLuint moon_texid;
static GLubyte *moon_texbuf;
geoRa, geoDec;
fgAIRCRAFT *air;
- fgFLIGHT *f;
+ FGInterface *f;
air = ¤t_aircraft;
- f = air->flight;
+ f = air->fdm_state;
updateOrbElements(t);
actTime = fgCalcActTime(t);
// 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);