printf("<*> resetting altitude to %.0f meters\n",
FG_Altitude * FEET_TO_METER);
}
+
+#ifdef USE_RAND
+ FG_U_gust = rand() * 3.0 / RAND_MAX - 1.0;
+ FG_V_gust = rand() * 3.0 / RAND_MAX - 1.0;
+ FG_W_gust = rand() * 3.0 / RAND_MAX - 1.0;
+#else
+ FG_U_gust = random() * 3.0 / RAND_MAX - 1.0;
+ FG_V_gust = random() * 3.0 / RAND_MAX - 1.0;
+ FG_W_gust = random() * 3.0 / RAND_MAX - 1.0;
+#endif
+
}
FG_Dy_cg = 0.000000E+00;
FG_Dz_cg = 0.000000E+00;
+ /* Configure some wind & turbulance */
+ FG_V_north_airmass = 15; /* ft/s =~ 10mph */
+
/* Set initial position and slew parameters */
/* fgSlewInit(-398391.3, 120070.41, 244, 3.1415); */ /* GLOBE Airport */
/* fgSlewInit(-335340,162540, 15, 4.38); */
/* $Log$
-/* Revision 1.34 1997/07/16 20:04:48 curt
-/* Minor tweaks to aid Win32 port.
+/* Revision 1.35 1997/07/18 14:28:34 curt
+/* Hacked in some support for wind/turbulence.
/*
+ * Revision 1.34 1997/07/16 20:04:48 curt
+ * Minor tweaks to aid Win32 port.
+ *
* Revision 1.33 1997/07/12 03:50:20 curt
* Added an #include <Windows32/Base.h> to help compiling for Win32
*
#include <GL/glut.h>
#include <stdlib.h> /* for random(), srandom() */
+#include <time.h> /* for time() to seed srandom() */
#include "../constants.h"
#include "../Scenery/mesh.h"
/* static GLfloat color[4] = { 0.5, 0.4, 0.25, 1.0 }; */ /* dark desert */
static GLfloat color[4] = { 0.5, 0.5, 0.25, 1.0 };
double randx, randy;
+ int t;
float x1, y1, x2, y2, z11, z12, z21, z22;
struct fgCartesianPoint p11, p12, p21, p22;
}
*/
+#ifdef USE_RAND
+ srand(time(&t));
+#else
+ srandom(time(&t));
+#endif
+
for ( i = 0; i < 200; i++ ) {
#ifdef USE_RAND
randx = rand() * 3600.0 / RAND_MAX;
/* $Log$
-/* Revision 1.34 1997/07/16 20:04:50 curt
-/* Minor tweaks to aid Win32 port.
+/* Revision 1.35 1997/07/18 14:28:35 curt
+/* Hacked in some support for wind/turbulence.
/*
+ * Revision 1.34 1997/07/16 20:04:50 curt
+ * Minor tweaks to aid Win32 port.
+ *
* Revision 1.33 1997/07/14 16:26:04 curt
* Testing/playing -- placed objects randomly across the entire terrain.
*
#
#---------------------------------------------------------------------------
-FG_CFLAGS = -g -Wall -DUSE_RAND
+FG_CFLAGS = -g -Wall
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
-# SGI IRIX with the GLUT toolkit (surprisingly, this also works on our
-# SunOS 4.x machine with the way we have
-# Mesa & Glut installed.)
+# SGI IRIX with the GLUT toolkit
+# (Surprisingly, this also works on our SunOS 4.x machine with the
+# way we have Mesa & Glut installed.)
#
# INTERFACE_FLAGS = -DGLUT
# INTERFACE_LIBS = -lglut
#---------------------------------------------------------------------------
# Linux/Mesa with the GLUT toolkit
#
-# INTERFACE_FLAGS = -DGLUT
-# INTERFACE_LIBS = -lglut
-# INTERFACE_FILES = GLUTkey.c
-# MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
-# X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
-# GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
+INTERFACE_FLAGS = -DGLUT
+INTERFACE_LIBS = -lglut
+INTERFACE_FILES = GLUTkey.c
+MESA_LIBS = -L/usr/lib/mesa -lMesatk -lMesaaux -lMesaGLU -lMesaGL
+X11_LIBS = -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11
+GRAPHICS_LIBS = $(MESA_LIBS) $(X11_LIBS)
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# Cygnus Win32 (gcc based) with the GLUT toolkit
#
-INTERFACE_FLAGS = -DGLUT
-INTERFACE_LIBS = -Wl,--subsystem,windows -L. -lglut
-INTERFACE_FILES = GLUTkey.c
-GRAPHICS_LIBS = -lglu32 -lopengl32
+# INTERFACE_FLAGS = -DGLUT
+# INTERFACE_LIBS = -Wl,--subsystem,windows -L. -lglut
+# INTERFACE_FILES = GLUTkey.c
+# GRAPHICS_LIBS = -lglu32 -lopengl32
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# $Log$
+# Revision 1.7 1997/07/18 14:28:34 curt
+# Hacked in some support for wind/turbulence.
+#
# Revision 1.6 1997/07/16 20:04:42 curt
# Minor tweaks to aid Win32 port.
#