From 46f79f17c8bdd3735ebc04589cea6d8be821b7f2 Mon Sep 17 00:00:00 2001 From: curt Date: Thu, 3 Dec 1998 01:15:35 +0000 Subject: [PATCH] Converted fgFLIGHT to a class. Tweaks for Sun portability. --- Astro/moon.cxx | 5 +++-- Astro/sky.cxx | 8 ++++++-- Astro/uranus.hxx | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Astro/moon.cxx b/Astro/moon.cxx index 5ec50f4b..694e9a7a 100644 --- a/Astro/moon.cxx +++ b/Astro/moon.cxx @@ -187,8 +187,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); diff --git a/Astro/sky.cxx b/Astro/sky.cxx index f2c8c58c..434a0377 100644 --- a/Astro/sky.cxx +++ b/Astro/sky.cxx @@ -295,8 +295,8 @@ void fgSkyRender( void ) { // Rotate to proper orientation // printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG, // FG_Latitude * RAD_TO_DEG); - xglRotatef( FG_Longitude * RAD_TO_DEG, 0.0, 0.0, 1.0 ); - xglRotatef( 90.0 - FG_Latitude * RAD_TO_DEG, 0.0, 1.0, 0.0 ); + xglRotatef( f->get_Longitude() * RAD_TO_DEG, 0.0, 0.0, 1.0 ); + xglRotatef( 90.0 - f->get_Latitude() * RAD_TO_DEG, 0.0, 1.0, 0.0 ); xglRotatef( l->sun_rotation * RAD_TO_DEG, 0.0, 0.0, 1.0 ); // Draw inner/center section of sky*/ @@ -365,6 +365,10 @@ void fgSkyRender( void ) { // $Log$ +// Revision 1.15 1998/12/03 01:15:36 curt +// Converted fgFLIGHT to a class. +// Tweaks for Sun portability. +// // Revision 1.14 1998/11/06 21:17:39 curt // Converted to new logstream debugging facility. This allows release // builds with no messages at all (and no performance impact) by using diff --git a/Astro/uranus.hxx b/Astro/uranus.hxx index cd623b3c..35bb7037 100644 --- a/Astro/uranus.hxx +++ b/Astro/uranus.hxx @@ -33,7 +33,7 @@ class Uranus : public CelestialBody { public: Uranus ( fgTIME *t); - void updatePosition(fgTIME *t, Star *sun); + void updatePosition(fgTIME *t, Star *ourSun); }; #endif // _URANUS_HXX_ -- 2.39.5