<< " 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,
// 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
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 );
}
}
}
- (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,
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,
* 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)
/*
* 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); */
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);
}
&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);
}
#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);
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);
}
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);
}