]> git.mxchange.org Git - flightgear.git/blobdiff - LaRCsim/ls_interface.c
Changed naming scheme of basic shared structures.
[flightgear.git] / LaRCsim / ls_interface.c
index 9ff1dd431c65e6ae1b0ccd60ed8cbd06812fd0a2..c99bc23f679c7570fdfd48c3a00875f2e5119fe8 100644 (file)
@@ -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,9 +495,17 @@ int initialize;
 
 
 int ls_cockpit() {
+    struct CONTROLS *c;
+
     sim_control_.paused = 0;
 
-    Throttle_pct = 0.95;
+    c = &current_aircraft.controls;
+
+    Lat_control = FG_Aileron;
+    Long_control = FG_Elevator;
+    Long_trim = FG_Elev_Trim;
+    Rudder_pedal = FG_Rudder;
+    Throttle_pct = FG_Throttle[0];
 
     /* printf("Mach = %.2f  ", Mach_number);
     printf("%.4f,%.4f,%.2f  ", Latitude, Longitude, Altitude);
@@ -550,8 +559,8 @@ int fgLaRCsimUpdate(int multiloop) {
 }
 
 
-/* Convert from the FG flight_params struct to the LaRCsim generic_ struct */
-int fgFlight_2_LaRCsim (struct flight_params *f) {
+/* Convert from the FG FLIGHT struct to the LaRCsim generic_ struct */
+int fgFlight_2_LaRCsim (struct FLIGHT *f) {
     Mass =      FG_Mass;
     I_xx =      FG_I_xx;
     I_yy =      FG_I_yy;
@@ -724,8 +733,8 @@ int fgFlight_2_LaRCsim (struct flight_params *f) {
 }
 
 
-/* Convert from the LaRCsim generic_ struct to the FG flight_params struct */
-int fgLaRCsim_2_Flight (struct flight_params *f) {
+/* Convert from the LaRCsim generic_ struct to the FG FLIGHT struct */
+int fgLaRCsim_2_Flight (struct FLIGHT *f) {
     FG_Mass =   Mass;
     FG_I_xx =   I_xx;
     FG_I_yy =   I_yy;
@@ -900,6 +909,24 @@ int fgLaRCsim_2_Flight (struct flight_params *f) {
 /* Flight Gear Modification Log
  *
  * $Log$
+ * Revision 1.9  1997/08/27 03:30:08  curt
+ * Changed naming scheme of basic shared structures.
+ *
+ * Revision 1.8  1997/06/21 17:12:50  curt
+ * Capitalized subdirectory names.
+ *
+ * Revision 1.7  1997/05/31 19:16:28  curt
+ * Elevator trim added.
+ *
+ * Revision 1.6  1997/05/31 04:13:53  curt
+ * WE CAN NOW FLY!!!
+ *
+ * Continuing work on the LaRCsim flight model integration.
+ * Added some MSFS-like keyboard input handling.
+ *
+ * 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.
  *