]> git.mxchange.org Git - flightgear.git/commitdiff
More tweaking with stars.
authorcurt <curt>
Fri, 5 Sep 1997 14:17:26 +0000 (14:17 +0000)
committercurt <curt>
Fri, 5 Sep 1997 14:17:26 +0000 (14:17 +0000)
Cockpit/hud.c
Main/GLUTmain.c
Main/fg_init.c
Scenery/scenery.c
Scenery/stars.c
Time/sunpos.c

index 1c698753d619f7a69fe647f740db2d628a16d441..33a00435515edcaf7b9959167501f16a55704e72 100644 (file)
@@ -467,7 +467,7 @@ double get_speed()
        struct FLIGHT *f;
               
        f = &current_aircraft.flight;
-       return( FG_V_true_kts );
+       return( FG_V_equiv_kts );
 }
 
 double get_aoa()
@@ -499,7 +499,7 @@ double get_heading()
        struct FLIGHT *f;
               
        f = &current_aircraft.flight;
-       return( FG_Gamma_horiz_rad*RAD_TO_DEG ); 
+       return( FG_Psi*RAD_TO_DEG ); 
 }
 
 double get_altitude()
@@ -799,9 +799,12 @@ void fgUpdateHUD( Hptr hud )
 
 
 /* $Log$
-/* Revision 1.2  1997/09/04 02:17:30  curt
-/* Shufflin' stuff.
+/* Revision 1.3  1997/09/05 14:17:26  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.2  1997/09/04 02:17:30  curt
+ * Shufflin' stuff.
+ *
  * Revision 1.1  1997/08/29 18:03:22  curt
  * Initial revision.
  *
index 7bbca9367026a204a95009a8e89f1f8b5ae84a28..45c2671e0879cc12cb7a3630db45beb93d2024ab 100644 (file)
@@ -154,7 +154,7 @@ static void fgUpdateViewParams() {
     /* Tell GL we are about to modify the projection parameters */
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
-    gluPerspective(100.0, 1.0/win_ratio, 1.0, 200000.0);
+    gluPerspective(60.0, 1.0/win_ratio, 1.0, 200000.0);
 
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
@@ -555,9 +555,12 @@ int main( int argc, char *argv[] ) {
 
 
 /* $Log$
-/* Revision 1.14  1997/09/05 01:35:53  curt
-/* Working on getting stars right.
+/* Revision 1.15  1997/09/05 14:17:27  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.14  1997/09/05 01:35:53  curt
+ * Working on getting stars right.
+ *
  * Revision 1.13  1997/09/04 02:17:34  curt
  * Shufflin' stuff.
  *
index 36f368c2c92e5fe5eb2fa144cc45d552950d9b39..7e0c2146bd55f7781a19fd458877d0c008fae264 100644 (file)
@@ -103,6 +103,11 @@ void fgInitSubsystems( void ) {
     /* FG_Longitude = ( -398673.28 / 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_Altitude = FG_Runway_altitude + 3.758099; */
+
     printf("Initial position is: (%.4f, %.4f, %.2f)\n", 
           FG_Latitude * RAD_TO_DEG, FG_Longitude * RAD_TO_DEG, 
           FG_Altitude * FEET_TO_METER);
@@ -200,9 +205,12 @@ void fgInitSubsystems( void ) {
 
 
 /* $Log$
-/* Revision 1.5  1997/09/04 02:17:36  curt
-/* Shufflin' stuff.
+/* Revision 1.6  1997/09/05 14:17:30  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.5  1997/09/04 02:17:36  curt
+ * Shufflin' stuff.
+ *
  * Revision 1.4  1997/08/27 21:32:26  curt
  * Restructured view calculation code.  Added stars.
  *
index c7d5fa4806aa194805fa075932a9ee10c88a23b0..989004c96a75e1950429c85dfac1407fd766e212 100644 (file)
@@ -80,7 +80,7 @@ void fgSceneryUpdate(double lon, double lat, double elev) {
 /* Render out the current scene */
 void fgSceneryRender() {
     glPushMatrix();
-    /* glCallList(mesh_hack); */
+    glCallList(mesh_hack);
     glPopMatrix();
 
     fgStarsRender();
@@ -88,9 +88,12 @@ void fgSceneryRender() {
 
 
 /* $Log$
-/* Revision 1.18  1997/09/05 01:35:59  curt
-/* Working on getting stars right.
+/* Revision 1.19  1997/09/05 14:17:30  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.18  1997/09/05 01:35:59  curt
+ * Working on getting stars right.
+ *
  * Revision 1.17  1997/08/29 17:55:27  curt
  * Worked on properly aligning the stars.
  *
index 7a5bdfc69b7a58b3fbfb0ab603e03ddec23bf921..0b6ddc6e1828037f5dbb307d3c1982c7c9fd5fa3 100644 (file)
@@ -62,7 +62,6 @@ void fgStarsInit() {
     double ra_save, decl_save;
     double ra_save1, decl_save1;
     double ra_save2, decl_save2;
-    GLfloat mag[4] = {0.0, 0.0, 0.0, 1.0};
     int count;
 
     g = &general;
@@ -118,31 +117,32 @@ void fgStarsInit() {
            sscanf(front, "%lf,%lf,%lf\n", 
                   &right_ascension, &declination, &magnitude);
 
-           if ( strcmp(name, "Deneb") == 0 ) {
+           if ( strcmp(name, "Merak") == 0 ) {
                printf("\n*** Marking %s\n\n", name);
                ra_save = right_ascension;
                decl_save = declination;
            }
 
-           if ( strcmp(name, "Alderamin") == 0 ) {
+           if ( strcmp(name, "Rastaban") == 0 ) {
                printf("\n*** Marking %s\n\n", name);
                ra_save1 = right_ascension;
                decl_save1 = declination;
            }
 
            /* scale magnitudes to (0.0 - 1.0) */
-           magnitude = (-1.46 - magnitude) / 10.0 + 1.0;
+           magnitude = (0.0 - magnitude) / 5.0 + 1.0;
 
            /* scale magnitudes again so they look ok */
+           if ( magnitude > 1.0 ) { magnitude = 1.0; }
+           if ( magnitude < 0.0 ) { magnitude = 0.0; }
            magnitude = magnitude * 0.8 + 0.2;
-           mag[0] = mag[1] = mag[2] = magnitude;
 
            printf("Found star: %d %s, %.3f %.3f %.3f\n", count,
               name, right_ascension, declination, magnitude);
 
-           glColor3f( mag[0], mag[1], mag[2] );
+           glColor3f( magnitude, magnitude, magnitude );
            glVertex3f( 190000.0 * sin(right_ascension) * cos(declination),
-                       190000.0 * cos(right_ascension) * cos(declination),
+                       -190000.0 * cos(right_ascension) * cos(declination),
                        190000.0 * sin(declination) );
 
            count++;
@@ -157,32 +157,32 @@ void fgStarsInit() {
     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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(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),
+                   -190000.0 * cos(ra_save1-0.2) * cos(decl_save1+0.2),
                    190000.0 * sin(decl_save1+0.2) );
     glEnd();
        
@@ -195,6 +195,7 @@ void fgStarsRender() {
     struct FLIGHT *f;
     struct VIEW *v;
     double angle;
+    static double warp = 0;
 
     f = &current_aircraft.flight;
     v = &current_view;
@@ -208,8 +209,11 @@ void fgStarsRender() {
     glTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
 
     angle = FG_2PI * fmod(DaysSinceEpoch(time(NULL)), 1.0);
-    glRotatef( -angle * RAD_TO_DEG, 0.0, 0.0, 1.0 );
-    printf("Rotating stars by %.2f\n", -angle * RAD_TO_DEG);
+    warp += 0.5 * DEG_TO_RAD;
+    warp = 240.0 * DEG_TO_RAD;
+    glRotatef( -(angle+warp) * RAD_TO_DEG, 0.0, 0.0, 1.0 );
+    printf("Rotating stars by %.2f + %.2f\n", -angle * RAD_TO_DEG,
+       warp * RAD_TO_DEG);
 
     glCallList(stars);
 
@@ -220,9 +224,12 @@ void fgStarsRender() {
 
 
 /* $Log$
-/* Revision 1.5  1997/09/05 01:35:59  curt
-/* Working on getting stars right.
+/* Revision 1.6  1997/09/05 14:17:31  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.5  1997/09/05 01:35:59  curt
+ * Working on getting stars right.
+ *
  * Revision 1.4  1997/09/04 02:17:38  curt
  * Shufflin' stuff.
  *
index 477ca6d299777fe24123b165294717f3320c4c6c..ab0ab1498715bf87d316eb4f1c5a94f65984c151 100644 (file)
@@ -270,8 +270,7 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
     t = &cur_time_params;
     v = &current_view;
 
-    time_warp += 200; /* increase this to make the world spin real fast */
-    time_warp = 3600*10; /* increase this to make the world spin real fast */
+    time_warp += 0; /* increase this to make the world spin real fast */
 
     fgSunPosition(time(NULL) + time_warp, &t->sun_lon, &sun_gd_lat);
 
@@ -304,9 +303,12 @@ void fgUpdateSunPos(struct fgCartesianPoint scenery_center) {
 
 
 /* $Log$
-/* Revision 1.8  1997/09/05 01:36:04  curt
-/* Working on getting stars right.
+/* Revision 1.9  1997/09/05 14:17:31  curt
+/* More tweaking with stars.
 /*
+ * Revision 1.8  1997/09/05 01:36:04  curt
+ * Working on getting stars right.
+ *
  * Revision 1.7  1997/09/04 02:17:40  curt
  * Shufflin' stuff.
  *