double cur_elev;
struct FLIGHT *f;
- struct TIME *t;
+ struct fgTIME *t;
struct VIEW *v;
f = ¤t_aircraft.flight;
****************************************************************/
/* Globe Aiport, AZ */
- FG_Runway_altitude = 3234.5;
- FG_Runway_latitude = 120070.41;
FG_Runway_longitude = -398391.28;
+ FG_Runway_latitude = 120070.41;
+ FG_Runway_altitude = 3234.5;
FG_Runway_heading = 102.0 * DEG_TO_RAD;
/* Initial Position at GLOBE airport */
- FG_Latitude = ( 120070.41 / 3600.0 ) * DEG_TO_RAD;
FG_Longitude = ( -398391.28 / 3600.0 ) * DEG_TO_RAD;
+ FG_Latitude = ( 120070.41 / 3600.0 ) * DEG_TO_RAD;
FG_Altitude = FG_Runway_altitude + 3.758099;
/* FG_Altitude = 20000; */
/* Initial Position north of the city of Globe */
- /* FG_Latitude = ( 120625.64 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Longitude = ( -398673.28 / 3600.0 ) * DEG_TO_RAD; */
+ /* FG_Latitude = ( 120625.64 / 3600.0 ) * DEG_TO_RAD; */
/* FG_Altitude = 0.0 + 3.758099; */
/* Initial Position: 10125 Jewell St. NE */
- /* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */
/* FG_Longitude = ( -93.15 ) * DEG_TO_RAD; */
+ /* FG_Latitude = ( 45.15 ) * DEG_TO_RAD; */
/* FG_Altitude = FG_Runway_altitude + 3.758099; */
+ FG_Longitude = ( -583200.00 / 3600.0 ) * DEG_TO_RAD;
+ FG_Latitude = ( 110808.41 / 3600.0 ) * DEG_TO_RAD;
+
printf("Initial position is: (%.4f, %.4f, %.2f)\n",
- FG_Latitude * RAD_TO_DEG, FG_Longitude * RAD_TO_DEG,
+ FG_Longitude * RAD_TO_DEG, FG_Latitude * RAD_TO_DEG,
FG_Altitude * FEET_TO_METER);
/* Initial Velocity */
/* $Log$
-/* Revision 1.7 1997/09/16 15:50:30 curt
-/* Working on star alignment and time issues.
+/* Revision 1.8 1997/09/22 14:44:20 curt
+/* Continuing to try to align stars correctly.
/*
+ * Revision 1.7 1997/09/16 15:50:30 curt
+ * Working on star alignment and time issues.
+ *
* Revision 1.6 1997/09/05 14:17:30 curt
* More tweaking with stars.
*
sscanf(front, "%lf,%lf,%lf\n",
&right_ascension, &declination, &magnitude);
- if ( strcmp(name, "Hamal") == 0 ) {
+ if ( strcmp(name, "Betelgeuse") == 0 ) {
printf(" *** Marking %s\n", name);
ra_save = right_ascension;
decl_save = declination;
}
- if ( strcmp(name, "Algenib") == 0 ) {
+ if ( strcmp(name, "Alnilam") == 0 ) {
printf(" *** Marking %s\n", name);
ra_save1 = right_ascension;
decl_save1 = declination;
if ( magnitude < 0.0 ) { magnitude = 0.0; }
magnitude =
magnitude * 0.7 + (((FG_STAR_LEVELS - 1) - i) * 0.1);
- printf("Found star: %d %s, %.3f %.3f %.3f\n", count,
- name, right_ascension, declination, magnitude);
+ /* printf("Found star: %d %s, %.3f %.3f %.3f\n", count,
+ name, right_ascension, declination, magnitude); */
glColor3f( magnitude, magnitude, magnitude );
- glVertex3f( 190000.0 * sin(right_ascension) * cos(declination),
- -190000.0 * cos(right_ascension) * cos(declination),
+ glVertex3f( 190000.0 * cos(right_ascension) * cos(declination),
+ 190000.0 * sin(right_ascension) * cos(declination),
190000.0 * sin(declination) );
count++;
glBegin(GL_LINE_LOOP);
glColor3f(1.0, 0.0, 0.0);
- glVertex3f( 190000.0 * sin(ra_save-0.2) * cos(decl_save-0.2),
- -190000.0 * cos(ra_save-0.2) * cos(decl_save-0.2),
+ glVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save-0.2),
+ 190000.0 * sin(ra_save-0.2) * cos(decl_save-0.2),
190000.0 * sin(decl_save-0.2) );
- glVertex3f( 190000.0 * sin(ra_save+0.2) * cos(decl_save-0.2),
- -190000.0 * cos(ra_save+0.2) * cos(decl_save-0.2),
+ glVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save-0.2),
+ 190000.0 * sin(ra_save+0.2) * cos(decl_save-0.2),
190000.0 * sin(decl_save-0.2) );
- glVertex3f( 190000.0 * sin(ra_save+0.2) * cos(decl_save+0.2),
- -190000.0 * cos(ra_save+0.2) * cos(decl_save+0.2),
+ glVertex3f( 190000.0 * cos(ra_save+0.2) * cos(decl_save+0.2),
+ 190000.0 * sin(ra_save+0.2) * cos(decl_save+0.2),
190000.0 * sin(decl_save+0.2) );
- glVertex3f( 190000.0 * sin(ra_save-0.2) * cos(decl_save+0.2),
- -190000.0 * cos(ra_save-0.2) * cos(decl_save+0.2),
+ glVertex3f( 190000.0 * cos(ra_save-0.2) * cos(decl_save+0.2),
+ 190000.0 * sin(ra_save-0.2) * cos(decl_save+0.2),
190000.0 * sin(decl_save+0.2) );
glEnd();
glBegin(GL_LINE_LOOP);
glColor3f(0.0, 1.0, 0.0);
- glVertex3f( 190000.0 * sin(ra_save1-0.2) * cos(decl_save1-0.2),
- -190000.0 * cos(ra_save1-0.2) * cos(decl_save1-0.2),
+ glVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1-0.2),
+ 190000.0 * sin(ra_save1-0.2) * cos(decl_save1-0.2),
190000.0 * sin(decl_save1-0.2) );
- glVertex3f( 190000.0 * sin(ra_save1+0.2) * cos(decl_save1-0.2),
- -190000.0 * cos(ra_save1+0.2) * cos(decl_save1-0.2),
+ glVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1-0.2),
+ 190000.0 * sin(ra_save1+0.2) * cos(decl_save1-0.2),
190000.0 * sin(decl_save1-0.2) );
- glVertex3f( 190000.0 * sin(ra_save1+0.2) * cos(decl_save1+0.2),
- -190000.0 * cos(ra_save1+0.2) * cos(decl_save1+0.2),
+ glVertex3f( 190000.0 * cos(ra_save1+0.2) * cos(decl_save1+0.2),
+ 190000.0 * sin(ra_save1+0.2) * cos(decl_save1+0.2),
190000.0 * sin(decl_save1+0.2) );
- glVertex3f( 190000.0 * sin(ra_save1-0.2) * cos(decl_save1+0.2),
- -190000.0 * cos(ra_save1-0.2) * cos(decl_save1+0.2),
+ glVertex3f( 190000.0 * cos(ra_save1-0.2) * cos(decl_save1+0.2),
+ 190000.0 * sin(ra_save1-0.2) * cos(decl_save1+0.2),
190000.0 * sin(decl_save1+0.2) );
glEnd();
/* FG_PI_2 + 0.1 is about 6 degrees after sundown and before sunrise */
+ t->sun_angle = 3.0; /* force stars (for testing) */
+
if ( t->sun_angle > (FG_PI_2 + 5 * DEG_TO_RAD ) ) {
/* determine which star structure to draw */
if ( t->sun_angle > (FG_PI_2 + 7.25 * DEG_TO_RAD ) ) {
/* warp += 1.0; */
/* warp = 15.0; */
warp = 0.0;
- glRotatef( -(angle+warp), 0.0, 0.0, 1.0 );
- printf("Rotating stars by %.2f degrees + %.2f degrees\n",-angle,-warp);
+ glRotatef( (angle+warp), 0.0, 0.0, -1.0 );
+ printf("Rotating stars by %.2f degrees + %.2f degrees\n",angle,warp);
glCallList(stars[i]);
/* $Log$
-/* Revision 1.10 1997/09/20 03:34:32 curt
-/* Still trying to get those durned stars aligned properly.
+/* Revision 1.11 1997/09/22 14:44:21 curt
+/* Continuing to try to align stars correctly.
/*
+ * Revision 1.10 1997/09/20 03:34:32 curt
+ * Still trying to get those durned stars aligned properly.
+ *
* Revision 1.9 1997/09/18 16:20:09 curt
* At dusk/dawn add/remove stars in stages.
*