Various MSVC tweaks and warning fixes.
This commit is contained in:
parent
89bc634cd6
commit
45904a45eb
10 changed files with 46 additions and 25 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -88,8 +88,11 @@
|
|||
|
||||
$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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue