From 305c0fa0272b47be223349680d62841932bc6bfa Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 30 May 1997 23:26:19 +0000 Subject: [PATCH] Added elevator/aileron controls. --- LaRCsim/ls_interface.c | 11 +++++++++++ Main/GLUTkey.c | 13 ++++++++----- Main/Makefile | 11 +++++++---- Main/mesh2GL.c | 9 ++++++--- 4 files changed, 32 insertions(+), 12 deletions(-) diff --git a/LaRCsim/ls_interface.c b/LaRCsim/ls_interface.c index 9ff1dd431..8a0b3400b 100644 --- a/LaRCsim/ls_interface.c +++ b/LaRCsim/ls_interface.c @@ -236,6 +236,7 @@ $Original log: LaRCsim.c,v $ #include "ls_cockpit.h" #include "ls_interface.h" #include "../flight.h" +#include "../../aircraft/aircraft.h" /* global variable declarations */ @@ -494,6 +495,13 @@ int initialize; int ls_cockpit() { + struct control_params *c; + + c = ¤t_aircraft.controls; + + Lat_control = -c->aileron; + Long_control = -c->elev; + sim_control_.paused = 0; Throttle_pct = 0.95; @@ -900,6 +908,9 @@ int fgLaRCsim_2_Flight (struct flight_params *f) { /* Flight Gear Modification Log * * $Log$ + * Revision 1.5 1997/05/30 23:26:25 curt + * Added elevator/aileron controls. + * * Revision 1.4 1997/05/30 19:30:15 curt * The LaRCsim flight model is starting to look like it is working. * diff --git a/Main/GLUTkey.c b/Main/GLUTkey.c index 4c3ab3a18..19a9450ec 100644 --- a/Main/GLUTkey.c +++ b/Main/GLUTkey.c @@ -43,10 +43,10 @@ void GLUTkey(unsigned char k, int x, int y) { switch (k) { case GLUT_KEY_UP: - c->elev -= 0.1; + c->elev -= 0.01; return; case GLUT_KEY_DOWN: - c->elev += 0.1; + c->elev += 0.01; return; case GLUT_KEY_LEFT: c->aileron += 0.01; @@ -84,10 +84,13 @@ void GLUTkey(unsigned char k, int x, int y) { /* $Log$ -/* Revision 1.4 1997/05/27 17:44:31 curt -/* Renamed & rearranged variables and routines. Added some initial simple -/* timer/alarm routines so the flight model can be updated on a regular interval. +/* Revision 1.5 1997/05/30 23:26:19 curt +/* Added elevator/aileron controls. /* + * Revision 1.4 1997/05/27 17:44:31 curt + * Renamed & rearranged variables and routines. Added some initial simple + * timer/alarm routines so the flight model can be updated on a regular interval. + * * Revision 1.3 1997/05/23 15:40:25 curt * Added GNU copyright headers. * Fog now works! diff --git a/Main/Makefile b/Main/Makefile index e19a5f3ae..cf435bc75 100644 --- a/Main/Makefile +++ b/Main/Makefile @@ -53,12 +53,12 @@ INTERFACE_FILES = GLUTkey.c #--------------------------------------------------------------------------- # For OpenGL -# GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11 +GRAPHICS_LIBS = -lGLU -lGL -lXmu -lX11 # For Mesa -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) +# 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) CFLAGS = $(STD_CFLAGS) $(INTERFACE_FLAGS) @@ -103,6 +103,9 @@ mesh2GL.o: mesh2GL.c ../scenery/mesh.h #--------------------------------------------------------------------------- # $Log$ +# Revision 1.9 1997/05/30 23:26:19 curt +# Added elevator/aileron controls. +# # Revision 1.8 1997/05/30 19:27:02 curt # The LaRCsim flight model is starting to look like it is working. # diff --git a/Main/mesh2GL.c b/Main/mesh2GL.c index 52decf023..2b312c011 100644 --- a/Main/mesh2GL.c +++ b/Main/mesh2GL.c @@ -44,7 +44,7 @@ GLint mesh2GL(struct mesh *m) { int i, j, istep, jstep, iend, jend; float temp; - istep = jstep = 10; /* Detail level 1 -- 1200 ... */ + istep = jstep = 4; /* Detail level 1 -- 1200 ... */ mesh = glGenLists(1); glNewList(mesh, GL_COMPILE); @@ -104,9 +104,12 @@ GLint mesh2GL(struct mesh *m) { /* $Log$ -/* Revision 1.11 1997/05/30 19:27:02 curt -/* The LaRCsim flight model is starting to look like it is working. +/* Revision 1.12 1997/05/30 23:26:20 curt +/* Added elevator/aileron controls. /* + * Revision 1.11 1997/05/30 19:27:02 curt + * The LaRCsim flight model is starting to look like it is working. + * * Revision 1.10 1997/05/30 03:54:11 curt * Made a bit more progress towards integrating the LaRCsim flight model. * -- 2.39.2