FG_ to SG_ namespace changes.
This commit is contained in:
parent
17f3d48e03
commit
92443d36a4
6 changed files with 34 additions and 34 deletions
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue