From 92443d36a447a08b5696b92fd17f9fd21855efaa Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 24 Mar 2001 03:10:40 +0000 Subject: [PATCH] FG_ to SG_ namespace changes. --- src/FDM/LaRCsim.cxx | 8 ++++---- src/GUI/mouse.cxx | 8 ++++---- src/Main/main.cxx | 12 ++++++------ src/Time/light.cxx | 6 +++--- src/Time/moonpos.cxx | 18 +++++++++--------- src/Time/sunpos.cxx | 16 ++++++++-------- 6 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/FDM/LaRCsim.cxx b/src/FDM/LaRCsim.cxx index 209bd345f..2903f92d7 100644 --- a/src/FDM/LaRCsim.cxx +++ b/src/FDM/LaRCsim.cxx @@ -474,12 +474,12 @@ bool FGLaRCsim::copy_from_LaRCsim() { << " radius_to_vehicle = " << Radius_to_vehicle ); double tmp_lon_geoc = Lon_geocentric; - while ( tmp_lon_geoc < -SGD_PI ) { tmp_lon_geoc += SG_2PI; } - while ( tmp_lon_geoc > SGD_PI ) { tmp_lon_geoc -= SG_2PI; } + while ( tmp_lon_geoc < -SGD_PI ) { tmp_lon_geoc += SGD_2PI; } + while ( tmp_lon_geoc > SGD_PI ) { tmp_lon_geoc -= SGD_2PI; } double tmp_lon = Longitude; - while ( tmp_lon < -SGD_PI ) { tmp_lon += SG_2PI; } - while ( tmp_lon > SGD_PI ) { tmp_lon -= SG_2PI; } + while ( tmp_lon < -SGD_PI ) { tmp_lon += SGD_2PI; } + while ( tmp_lon > SGD_PI ) { tmp_lon -= SGD_2PI; } // Positions _set_Geocentric_Position( Lat_geocentric, tmp_lon_geoc, diff --git a/src/GUI/mouse.cxx b/src/GUI/mouse.cxx index 258b619f4..b868c1242 100644 --- a/src/GUI/mouse.cxx +++ b/src/GUI/mouse.cxx @@ -378,12 +378,12 @@ void guiMotionFunc ( int x, int y ) // this could be done in above quat // but requires redoing view pipeline offset = globals->get_current_view()->get_goal_view_offset(); - offset += ((_mX - x) * SG_2PI / W ); + offset += ((_mX - x) * SGD_2PI / W ); while (offset < 0.0) { - offset += SG_2PI; + offset += SGD_2PI; } - while (offset > SG_2PI) { - offset -= SG_2PI; + while (offset > SGD_2PI) { + offset -= SGD_2PI; } globals->get_current_view()->set_goal_view_offset(offset); #ifdef NO_SMOOTH_MOUSE_VIEW diff --git a/src/Main/main.cxx b/src/Main/main.cxx index 69291af59..aa5ef3958 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -814,10 +814,10 @@ void fgUpdateTimeDepCalcs() { v->inc_view_offset( 0.01 ); } } - if ( v->get_view_offset() > SG_2PI ) { - v->inc_view_offset( -SG_2PI ); + if ( v->get_view_offset() > SGD_2PI ) { + v->inc_view_offset( -SGD_2PI ); } else if ( v->get_view_offset() < 0 ) { - v->inc_view_offset( SG_2PI ); + v->inc_view_offset( SGD_2PI ); } } } @@ -826,10 +826,10 @@ void fgUpdateTimeDepCalcs() { - (cur_fdm_state->get_Psi() - globals->get_current_view()->get_view_offset() ); while ( tmp < 0.0 ) { - tmp += SG_2PI; + tmp += SGD_2PI; } - while ( tmp > SG_2PI ) { - tmp -= SG_2PI; + while ( tmp > SGD_2PI ) { + tmp -= SGD_2PI; } /* printf("Psi = %.2f, viewoffset = %.2f sunrot = %.2f rottosun = %.2f\n", FG_Psi * RAD_TO_DEG, current_view.view_offset * RAD_TO_DEG, diff --git a/src/Time/light.cxx b/src/Time/light.cxx index fc145b480..be46d20ca 100644 --- a/src/Time/light.cxx +++ b/src/Time/light.cxx @@ -173,10 +173,10 @@ void fgLIGHT::UpdateAdjFog( void ) { rotation += SGD_PI; } while ( rotation < 0 ) { - rotation += SG_2PI; + rotation += SGD_2PI; } - while ( rotation > SG_2PI ) { - rotation -= SG_2PI; + while ( rotation > SGD_2PI ) { + rotation -= SGD_2PI; } rotation *= RAD_TO_DEG; // fgPrintf( FG_EVENT, FG_INFO, diff --git a/src/Time/moonpos.cxx b/src/Time/moonpos.cxx index e038c21cd..f63a32bdd 100644 --- a/src/Time/moonpos.cxx +++ b/src/Time/moonpos.cxx @@ -99,8 +99,8 @@ * Eccentricity (eccentricity of orbit) 0.016713 */ -#define Epsilon_g (279.403303*(SG_2PI/360)) -#define OmegaBar_g (282.768422*(SG_2PI/360)) +#define Epsilon_g (279.403303*(SGD_2PI/360)) +#define OmegaBar_g (282.768422*(SGD_2PI/360)) #define Eccentricity (0.016713) /* @@ -108,7 +108,7 @@ * 1990.0 (computed as 23.440592 degrees according to the method given * in duffett-smith, section 27) */ -#define MeanObliquity (23.440592*(SG_2PI/360)) +#define MeanObliquity (23.440592*(SGD_2PI/360)) /* static double solve_keplers_equation(double); */ /* static double moon_ecliptic_longitude(time_t); */ @@ -283,12 +283,12 @@ void fgMoonPosition(time_t ssue, double *lon, double *lat) { ecliptic_to_equatorial( globals->get_ephem()->get_moon()->getLon(), 0.0, &alpha, &delta ); - tmp = alpha - (SG_2PI/24)*GST(ssue); + tmp = alpha - (SGD_2PI/24)*GST(ssue); if (tmp < -SGD_PI) { - do tmp += SG_2PI; + do tmp += SGD_2PI; while (tmp < -SGD_PI); } else if (tmp > SGD_PI) { - do tmp -= SG_2PI; + do tmp -= SGD_2PI; while (tmp < -SGD_PI); } @@ -318,12 +318,12 @@ static void fgMoonPositionGST(double gst, double *lon, double *lat) { &alpha, &delta ); // tmp = alpha - (SG_2PI/24)*GST(ssue); - tmp = alpha - (SG_2PI/24)*gst; + tmp = alpha - (SGD_2PI/24)*gst; if (tmp < -SGD_PI) { - do tmp += SG_2PI; + do tmp += SGD_2PI; while (tmp < -SGD_PI); } else if (tmp > SGD_PI) { - do tmp -= SG_2PI; + do tmp -= SGD_2PI; while (tmp < -SGD_PI); } diff --git a/src/Time/sunpos.cxx b/src/Time/sunpos.cxx index 49a1f8aaf..3c1c3434f 100644 --- a/src/Time/sunpos.cxx +++ b/src/Time/sunpos.cxx @@ -68,7 +68,7 @@ #include "sunpos.hxx" // #undef E // should no longer be needed -#define MeanObliquity (23.440592*(SG_2PI/360)) +#define MeanObliquity (23.440592*(SGD_2PI/360)) static void ecliptic_to_equatorial(double, double, double *, double *); static double julian_date(int, int, int); @@ -191,12 +191,12 @@ void fgSunPosition(time_t ssue, double *lon, double *lat) { ecliptic_to_equatorial( globals->get_ephem()->get_sun()->getLon(), 0.0, &alpha, &delta ); - tmp = alpha - (SG_2PI/24)*GST(ssue); + tmp = alpha - (SGD_2PI/24)*GST(ssue); if (tmp < -SGD_PI) { - do tmp += SG_2PI; + do tmp += SGD_2PI; while (tmp < -SGD_PI); } else if (tmp > SGD_PI) { - do tmp -= SG_2PI; + do tmp -= SGD_2PI; while (tmp < -SGD_PI); } @@ -225,13 +225,13 @@ static void fgSunPositionGST(double gst, double *lon, double *lat) { globals->get_ephem()->get_sun()->getLat(), &alpha, &delta ); -// tmp = alpha - (SG_2PI/24)*GST(ssue); - tmp = alpha - (SG_2PI/24)*gst; +// tmp = alpha - (SGD_2PI/24)*GST(ssue); + tmp = alpha - (SGD_2PI/24)*gst; if (tmp < -SGD_PI) { - do tmp += SG_2PI; + do tmp += SGD_2PI; while (tmp < -SGD_PI); } else if (tmp > SGD_PI) { - do tmp -= SG_2PI; + do tmp -= SGD_2PI; while (tmp < -SGD_PI); }