#include <Include/fg_constants.h>
#include <Aircraft/aircraft.h>
+#include <Autopilot/autopilot.h> // Added autopilot.h to list, Jeff Goeke-Smith
#include <Weather/weather.h>
case 90: /* Z key */
w->visibility /= 1.10;
xglFogf(GL_FOG_END, w->visibility);
- fgPrintf( FG_INPUT, FG_DEBUG, "Fog density = %.4f\n", w->visibility);
- return;
+ fgPrintf( FG_INPUT, FG_DEBUG,
+ "Fog density = %.4f\n", w->visibility );
+ return;
+ // autopilot additions
+ case 65: /* A key */
+ fgAPSetMode(1);
+ return;
+ case 83: /* S key */
+ fgAPSetMode(0);
+ return;
+
}
} else {
fgPrintf( FG_INPUT, FG_DEBUG, "\n");
/* $Log$
-/* Revision 1.31 1998/04/08 23:34:05 curt
-/* Patch from Durk to fix trim reversal with numlock key active.
+/* Revision 1.32 1998/04/14 02:21:01 curt
+/* Incorporated autopilot heading hold contributed by: Jeff Goeke-Smith
+/* <jgoeke@voyager.net>
/*
+ * Revision 1.31 1998/04/08 23:34:05 curt
+ * Patch from Durk to fix trim reversal with numlock key active.
+ *
* Revision 1.30 1998/04/03 22:09:02 curt
* Converting to Gnu autoconf system.
*
#include <Astro/sky.h>
#include <Astro/stars.h>
#include <Astro/sun.h>
+#include <Autopilot/autopilot.h>
#include <Cockpit/cockpit.h>
#include <Joystick/joystick.h>
#include <Math/fg_geodesy.h>
/* Tell GL we are about to modify the projection parameters */
xglMatrixMode(GL_PROJECTION);
xglLoadIdentity();
- gluPerspective(45.0, 2.0/win_ratio, 1.0, 100000.0);
+ gluPerspective(65.0, 2.0/win_ratio, 1.0, 100000.0);
}
else
{
/* Tell GL we are about to modify the projection parameters */
xglMatrixMode(GL_PROJECTION);
xglLoadIdentity();
- gluPerspective(45.0, 1.0/win_ratio, 10.0, 100000.0);
+ gluPerspective(65.0, 1.0/win_ratio, 10.0, 100000.0);
}
xglMatrixMode(GL_MODELVIEW);
fgPrintf( FG_ALL, FG_BULK,
"Model iterations needed = %d, new remainder = %d\n",
multi_loop, remainder);
+
+ //Insertion by Jeff Goeke-Smith for Autopilot.
+ // Where should this really go?
+ // Maybe this should run in tandem with the Flight model.
+
+ /* run Autopilot system */
+ fgPrintf( FG_ALL, FG_BULK,"Attempting autopilot run\n");
+
+ fgAPRun();
+
+ // end of insertion
+
/* Run flight model */
if ( ! use_signals ) {
#endif
/* $Log$
-/* Revision 1.69 1998/04/08 23:35:34 curt
-/* Tweaks to Gnu automake/autoconf system.
+/* Revision 1.70 1998/04/14 02:21:02 curt
+/* Incorporated autopilot heading hold contributed by: Jeff Goeke-Smith
+/* <jgoeke@voyager.net>
/*
+ * Revision 1.69 1998/04/08 23:35:34 curt
+ * Tweaks to Gnu automake/autoconf system.
+ *
* Revision 1.68 1998/04/03 22:09:03 curt
* Converting to Gnu autoconf system.
*
fg_LDADD = \
$(top_builddir)/Simulator/Aircraft/libAircraft.la \
$(top_builddir)/Simulator/Astro/libAstro.la \
+ $(top_builddir)/Simulator/Autopilot/libAutopilot.la \
$(top_builddir)/Simulator/Cockpit/libCockpit.la \
$(top_builddir)/Simulator/Controls/libControls.la \
$(top_builddir)/Simulator/Flight/libFlight.la \
$(top_builddir)/Simulator/Flight/LaRCsim/libLaRCsim.la \
$(top_builddir)/Simulator/Flight/Slew/libSlew.la \
$(top_builddir)/Simulator/Scenery/libScenery.la \
- $(top_builddir)/Simulator/Scenery/Bucket/libBucket.la \
$(top_builddir)/Simulator/Time/libTime.la \
$(top_builddir)/Simulator/Weather/libWeather.la \
$(top_builddir)/Simulator/Joystick/libJoystick.la \
- $(top_builddir)/Simulator/Math/libMath.la
+ $(top_builddir)/Simulator/Math/libMath.la \
+ $(top_builddir)/Lib/Bucket/libBucket.la
-INCLUDES += -I.. -DGLUT
+INCLUDES += \
+ -DGLUT \
+ -I$(top_builddir) \
+ -I$(top_builddir)/Lib \
+ -I$(top_builddir)/Simulator
fg_LDADD = \
$(top_builddir)/Simulator/Aircraft/libAircraft.la \
$(top_builddir)/Simulator/Astro/libAstro.la \
+ $(top_builddir)/Simulator/Autopilot/libAutopilot.la \
$(top_builddir)/Simulator/Cockpit/libCockpit.la \
$(top_builddir)/Simulator/Controls/libControls.la \
$(top_builddir)/Simulator/Flight/libFlight.la \
$(top_builddir)/Simulator/Flight/LaRCsim/libLaRCsim.la \
$(top_builddir)/Simulator/Flight/Slew/libSlew.la \
$(top_builddir)/Simulator/Scenery/libScenery.la \
- $(top_builddir)/Simulator/Scenery/Bucket/libBucket.la \
$(top_builddir)/Simulator/Time/libTime.la \
$(top_builddir)/Simulator/Weather/libWeather.la \
$(top_builddir)/Simulator/Joystick/libJoystick.la \
- $(top_builddir)/Simulator/Math/libMath.la
+ $(top_builddir)/Simulator/Math/libMath.la \
+ $(top_builddir)/Lib/Bucket/libBucket.la
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = ../../Simulator/Include/config.h
+CONFIG_HEADER = ../../Include/config.h
CONFIG_CLEAN_FILES = runfg runfg.bat
PROGRAMS = $(bin_PROGRAMS)
-DEFS = @DEFS@ -I. -I$(srcdir) -I../../Simulator/Include
+DEFS = @DEFS@ -I. -I$(srcdir) -I../../Include
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
views.o
fg_DEPENDENCIES = $(top_builddir)/Simulator/Aircraft/libAircraft.la \
$(top_builddir)/Simulator/Astro/libAstro.la \
+$(top_builddir)/Simulator/Autopilot/libAutopilot.la \
$(top_builddir)/Simulator/Cockpit/libCockpit.la \
$(top_builddir)/Simulator/Controls/libControls.la \
$(top_builddir)/Simulator/Flight/libFlight.la \
$(top_builddir)/Simulator/Flight/LaRCsim/libLaRCsim.la \
$(top_builddir)/Simulator/Flight/Slew/libSlew.la \
$(top_builddir)/Simulator/Scenery/libScenery.la \
-$(top_builddir)/Simulator/Scenery/Bucket/libBucket.la \
$(top_builddir)/Simulator/Time/libTime.la \
$(top_builddir)/Simulator/Weather/libWeather.la \
$(top_builddir)/Simulator/Joystick/libJoystick.la \
-$(top_builddir)/Simulator/Math/libMath.la
+$(top_builddir)/Simulator/Math/libMath.la \
+$(top_builddir)/Lib/Bucket/libBucket.la
fg_LDFLAGS =
SCRIPTS = $(bin_SCRIPTS)
mostlyclean distclean maintainer-clean
-INCLUDES += -I.. -DGLUT
+INCLUDES += \
+ -DGLUT \
+ -I$(top_builddir) \
+ -I$(top_builddir)/Lib \
+ -I$(top_builddir)/Simulator
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
#include <Astro/sky.h>
#include <Astro/stars.h>
#include <Astro/sun.h>
+#include <Autopilot/autopilot.h>
#include <Cockpit/cockpit.h>
#include <Joystick/joystick.h>
#include <Math/fg_random.h>
// FG_Altitude = FG_Runway_altitude + 3.758099;
// Test Position
- // FG_Longitude = ( -139.5 ) * DEG_TO_RAD;
- // FG_Latitude = ( -9.5 ) * DEG_TO_RAD;
- // FG_Runway_altitude = 13000.0 * METER_TO_FEET;
- // FG_Altitude = FG_Runway_altitude + 3.758099;
+ FG_Longitude = ( -113.5 ) * DEG_TO_RAD;
+ FG_Latitude = ( 33.5 ) * DEG_TO_RAD;
+ FG_Runway_altitude = 8000.0;
+ FG_Altitude = FG_Runway_altitude + 3.758099;
// A random test position
// FG_Longitude = ( 88128.00 / 3600.0 ) * DEG_TO_RAD;
fgPrintf( FG_GENERAL, FG_EXIT, "Error in Joystick initialization!\n" );
}
+ /// Autopilot init added here, by Jeff Goeke-Smith
+ fgAPInit(¤t_aircraft);
+ // end added section;
+
// One more try here to get the sky synced up
fgSkyColorsInit();
ret_val = 0;
/* $Log$
-/* Revision 1.54 1998/04/08 23:35:36 curt
-/* Tweaks to Gnu automake/autoconf system.
+/* Revision 1.55 1998/04/14 02:21:03 curt
+/* Incorporated autopilot heading hold contributed by: Jeff Goeke-Smith
+/* <jgoeke@voyager.net>
/*
+ * Revision 1.54 1998/04/08 23:35:36 curt
+ * Tweaks to Gnu automake/autoconf system.
+ *
* Revision 1.53 1998/04/03 22:09:06 curt
* Converting to Gnu autoconf system.
*