]> git.mxchange.org Git - flightgear.git/commitdiff
Various MSVC tweaks and warning fixes.
authorcurt <curt>
Mon, 30 Jul 2001 22:53:53 +0000 (22:53 +0000)
committercurt <curt>
Mon, 30 Jul 2001 22:53:53 +0000 (22:53 +0000)
src/FDM/IO360.cxx
src/FDM/LaRCsim/c172_gear.c
src/FDM/LaRCsim/cherokee_gear.c
src/FDM/LaRCsim/ls_trim.c
src/FDM/LaRCsim/navion_gear.c
src/FDM/UIUCModel/uiuc_1Dinterpolation.cpp
src/FDM/UIUCModel/uiuc_2Dinterpolation.cpp
src/FDM/UIUCModel/uiuc_aerodeflections.cpp
src/FDM/UIUCModel/uiuc_gear.cpp
src/FDM/UIUCModel/uiuc_parsefile.cpp

index 68687ef81b8a519edc167ed9abe157afa4074c68..3adc1e363e2215b16bfbd60a9fe97edbba53d9f4 100644 (file)
@@ -141,7 +141,7 @@ float FGNewEngine::Lookup_Combustion_Efficiency(float thi_actual)
     float thi[NUM_ELEMENTS] = {0.0, 0.9, 1.0, 1.05, 1.1, 1.15, 1.2, 1.3, 1.4, 1.5, 1.6};  //array of equivalence ratio values
     float neta_comb[NUM_ELEMENTS] = {0.98, 0.98, 0.97, 0.95, 0.9, 0.85, 0.79, 0.7, 0.63, 0.57, 0.525};  //corresponding array of combustion efficiency values
     //combustion efficiency values from Heywood, "Internal Combustion Engine Fundamentals", ISBN 0-07-100499-8
-    float neta_comb_actual;
+    float neta_comb_actual = 0.0f;
     float factor;
 
     int i;
@@ -188,7 +188,7 @@ float FGNewEngine::Power_Mixture_Correlation(float thi_actual)
     // The lookup table is in AFR because the source data was.  I added the two end elements to make sure we are almost always in it.
     float AFR[NUM_ELEMENTS] = {(14.7/1.6), 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, (14.7/0.6)};  //array of equivalence ratio values
     float mixPerPow[NUM_ELEMENTS] = {78, 86, 93.5, 98, 100, 99, 96.4, 92.5, 88, 83, 78.5, 74, 58};  //corresponding array of combustion efficiency values
-    float mixPerPow_actual;
+    float mixPerPow_actual = 0.0f;
     float factor;
     float dydx;
 
index 180c267761ed19a6afdef584559e4de2bca94670..0f2f36c8c4a85100dbc1f1a59d7c51970a1e50b8 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.20  2001/07/30 20:53:54  curt
+Various MSVC tweaks and warning fixes.
+
 Revision 1.19  2001/03/02 21:37:01  curt
 Added a first pass at a C++ sound manager class.
 
@@ -145,7 +148,7 @@ void c172_gear()
 {
 char rcsid[] = "$Id$";
 #define NUM_WHEELS 4
-char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"};
+// char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"};
   /*
    * Aircraft specific initializations and data goes here
    */
@@ -159,8 +162,8 @@ char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"
        { -1.47, -3.58, 6.71 },        /*left main*/ 
        { -15.67, 0, 2.42 }            /*tail skid */
     };
-       static DATA gear_travel[NUM_WHEELS] = /*in Z-axis*/
-       { -0.5, 2.5, 2.5, 0};
+    // static DATA gear_travel[NUM_WHEELS] = /*in Z-axis*/
+           // { -0.5, 2.5, 2.5, 0};
     static DATA spring_constant[NUM_WHEELS] =      /* springiness, lbs/ft */
        { 1200., 900., 900., 10000. };
     static DATA spring_damping[NUM_WHEELS] =       /* damping, lbs/ft/sec */
@@ -208,12 +211,15 @@ char gear_strings[NUM_WHEELS][12]={"nose","right main", "left main", "tail skid"
     DATA d_wheel_cg_local_v[3];                /* wheel offset from cg,  N-E-D */
     DATA d_wheel_rwy_local_v[3];       /* wheel offset from rwy, N-E-U */
        DATA v_wheel_cg_local_v[3];    /*wheel velocity rel to cg N-E-D*/
-    DATA v_wheel_body_v[3];            /* wheel velocity,        X-Y-Z */
+    // DATA v_wheel_body_v[3];         /* wheel velocity,        X-Y-Z */
     DATA v_wheel_local_v[3];           /* wheel velocity,        N-E-D */
     DATA f_wheel_local_v[3];           /* wheel reaction force,  N-E-D */
-       DATA altitude_local_v[3];       /*altitude vector in local (N-E-D) i.e. (0,0,h)*/
-       DATA altitude_body_v[3];        /*altitude vector in body (X,Y,Z)*/
-    DATA temp3a[3], temp3b[3], tempF[3], tempM[3];     
+    // DATA altitude_local_v[3];       /*altitude vector in local (N-E-D) i.e. (0,0,h)*/
+    // DATA altitude_body_v[3];        /*altitude vector in body (X,Y,Z)*/
+    DATA temp3a[3];
+    // DATA temp3b[3];
+    DATA tempF[3];
+    DATA tempM[3];     
     DATA reaction_normal_force;                /* wheel normal (to rwy) force  */
     DATA cos_wheel_hdg_angle, sin_wheel_hdg_angle;     /* temp storage */
     DATA v_wheel_forward, v_wheel_sideward,  abs_v_wheel_sideward;
index 27cf80cc64c7fd68b83fb36e0a02d98cc3809d8f..616ebf7873279484c47a44d4c5df7a515347ab9a 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.3  2001/07/30 20:53:54  curt
+Various MSVC tweaks and warning fixes.
+
 Revision 1.2  2000/04/10 18:09:41  curt
 David Megginson made a few (mostly minor) mods to the LaRCsim files, and
 it's now possible to choose the LaRCsim model at runtime, as in
@@ -189,7 +192,7 @@ char rcsid[] = "$Id$";
     DATA d_wheel_cg_body_v[3];         /* wheel offset from cg,  X-Y-Z */
     DATA d_wheel_cg_local_v[3];                /* wheel offset from cg,  N-E-D */
     DATA d_wheel_rwy_local_v[3];       /* wheel offset from rwy, N-E-U */
-    DATA v_wheel_body_v[3];            /* wheel velocity,        X-Y-Z */
+    // DATA v_wheel_body_v[3];         /* wheel velocity,        X-Y-Z */
     DATA v_wheel_local_v[3];           /* wheel velocity,        N-E-D */
     DATA f_wheel_local_v[3];           /* wheel reaction force,  N-E-D */
     DATA temp3a[3], temp3b[3], tempF[3], tempM[3];     
index 8d324d3ce5a6630f76e866673b9c2057e3122613..afa1e3ffdec7c86d1a6cfa0b14a7f6ea591b6027 100644 (file)
 
 $Header$
 $Log$
-Revision 1.1  1999/06/17 18:07:33  curt
-Initial revision
+Revision 1.2  2001/07/30 20:53:54  curt
+Various MSVC tweaks and warning fixes.
+
+Revision 1.1.1.1  1999/06/17 18:07:33  curt
+Start of 0.7.x branch
 
 Revision 1.1.1.1  1999/04/05 21:32:45  curt
 Start of 0.6.x branch.
@@ -226,7 +229,7 @@ int ls_trim_init()
 /*  Initialize partials matrix */
 {
     int i, error;
-    int result;
+    // int result;
 
     Index = -1;
     Trim_Cycles = 0;
index 2e8fb4a5f46ddd95c711ae8f2069407d987b2a85..9c83472ff2580b22865d9c008472201af274d52e 100644 (file)
@@ -36,6 +36,9 @@
 
 $Header$
 $Log$
+Revision 1.4  2001/07/30 20:53:54  curt
+Various MSVC tweaks and warning fixes.
+
 Revision 1.3  2000/06/12 18:52:37  curt
 Added differential braking (Alex and David).
 
@@ -213,7 +216,7 @@ char rcsid[] = "$Id$";
     DATA d_wheel_cg_body_v[3];         /* wheel offset from cg,  X-Y-Z */
     DATA d_wheel_cg_local_v[3];                /* wheel offset from cg,  N-E-D */
     DATA d_wheel_rwy_local_v[3];       /* wheel offset from rwy, N-E-U */
-    DATA v_wheel_body_v[3];            /* wheel velocity,        X-Y-Z */
+    // DATA v_wheel_body_v[3];         /* wheel velocity,        X-Y-Z */
     DATA v_wheel_local_v[3];           /* wheel velocity,        N-E-D */
     DATA f_wheel_local_v[3];           /* wheel reaction force,  N-E-D */
     DATA temp3a[3], temp3b[3], tempF[3], tempM[3];     
index e89d988b673093bbbb137705bf2ddf08ee9bc5d6..97c74229a363e9ff5278c453b5c0a848a082b768 100644 (file)
@@ -70,6 +70,7 @@
  USA or view http://www.gnu.org/copyleft/gpl.html.
 
 **********************************************************************/
+#include <simgear/compiler.h>    // to disable C4244 d to f warning
 
 #include "uiuc_1Dinterpolation.h"
 
index d20217be5060a67d14a12601c1b05658ff84c826..a5b628bb75abf250796e0b0a38a740c314e49ce0 100644 (file)
@@ -72,6 +72,7 @@
  USA or view http://www.gnu.org/copyleft/gpl.html.
 
 **********************************************************************/
+#include <simgear/compiler.h>    // MSVC: to disable C4244 d to f warning
 
 #include "uiuc_2Dinterpolation.h"
 
index 0581dc6b0c095cd02517e122f995fa84bea5234a..f84d14452dd99d3ab12f0aa89c318a8d72710b4a 100644 (file)
@@ -74,8 +74,9 @@
 
 void uiuc_aerodeflections( double dt )
 {
-  double prevFlapHandle, flap_transit_rate;
-  bool flaps_in_transit;
+  double prevFlapHandle = 0.0f;
+  double flap_transit_rate;
+  bool flaps_in_transit = false;
 
   if (zero_Long_trim)
     {
index accb7816b6221f13e58f111dd4f586ea51749e72..6a739fc73eb852f1091fdccdc0aeec565755e744 100644 (file)
@@ -181,12 +181,15 @@ void uiuc_gear()
     DATA d_wheel_cg_local_v[3];                /* wheel offset from cg,  N-E-D */
     DATA d_wheel_rwy_local_v[3];       /* wheel offset from rwy, N-E-U */
        DATA v_wheel_cg_local_v[3];    /*wheel velocity rel to cg N-E-D*/
-    DATA v_wheel_body_v[3];            /* wheel velocity,        X-Y-Z */
+    // DATA v_wheel_body_v[3];         /* wheel velocity,        X-Y-Z */
     DATA v_wheel_local_v[3];           /* wheel velocity,        N-E-D */
     DATA f_wheel_local_v[3];           /* wheel reaction force,  N-E-D */
-       DATA altitude_local_v[3];       /*altitude vector in local (N-E-D) i.e. (0,0,h)*/
-       DATA altitude_body_v[3];        /*altitude vector in body (X,Y,Z)*/
-    DATA temp3a[3], temp3b[3], tempF[3], tempM[3];     
+    // DATA altitude_local_v[3];       /*altitude vector in local (N-E-D) i.e. (0,0,h)*/
+    // DATA altitude_body_v[3];        /*altitude vector in body (X,Y,Z)*/
+    DATA temp3a[3];
+    // DATA temp3b[3];
+    DATA tempF[3];
+    DATA tempM[3];     
     DATA reaction_normal_force;                /* wheel normal (to rwy) force  */
     DATA cos_wheel_hdg_angle, sin_wheel_hdg_angle;     /* temp storage */
     DATA v_wheel_forward, v_wheel_sideward,  abs_v_wheel_sideward;
index a9ab68c93a5c9f1739d4107700e37ef58df2b51f..b09d41e014e99df615360cd21be942c3c7fcd887 100644 (file)
@@ -80,7 +80,7 @@ ParseFile :: ~ParseFile ()
 
 void ParseFile :: removeComments(string& inputLine)
 {
-  int pos = inputLine.find_first_of(COMMENT);
+  unsigned int pos = inputLine.find_first_of(COMMENT);
   
   if (pos != inputLine.npos) // a "#" exists in the line 
   {
@@ -94,8 +94,8 @@ void ParseFile :: removeComments(string& inputLine)
 
 string ParseFile :: getToken(string inputLine, int tokenNo)
 {
-  int pos = 0;
-  int pos1 = 0;
+  unsigned int pos = 0;
+  unsigned int pos1 = 0;
   int tokencounter = 0;
 
   while (tokencounter < tokenNo)
@@ -118,9 +118,9 @@ string ParseFile :: getToken(string inputLine, int tokenNo)
 
 void ParseFile :: storeCommands(string inputLine)
 {
-  int pos;
+  unsigned int pos;
   int pos1;
-  int wordlength;
+  // int wordlength;
   string line;
  
   inputLine += " ";  // To take care of the case when last character is not a blank