Fixes compiler warning related to this gcc message: This file includes at least one deprecated or antiquated header.
This commit is contained in:
parent
2606555bf6
commit
6ae39d57fa
26 changed files with 460 additions and 270 deletions
|
@ -18,10 +18,16 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 02/15/2000 initial release
|
||||
09/01/2002 (RD) added second data file reader for
|
||||
integer case
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Jeff Scott <jscott@mail.com>
|
||||
Robert Deters <rdeters@uiuc.edu>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -92,8 +98,8 @@ uiuc_1DdataFileReader( string file_name,
|
|||
linetoken1 = matrix -> getToken(*command_line, 1); // gettoken(string,tokenNo);
|
||||
linetoken2 = matrix -> getToken(*command_line, 2); // 2 represents token No 2
|
||||
|
||||
istrstream token1(linetoken1.c_str());
|
||||
istrstream token2(linetoken2.c_str());
|
||||
istringstream token1(linetoken1.c_str());
|
||||
istringstream token2(linetoken2.c_str());
|
||||
|
||||
token1 >> token_value1;
|
||||
token2 >> token_value2;
|
||||
|
@ -136,8 +142,8 @@ uiuc_1DdataFileReader( string file_name,
|
|||
linetoken1 = matrix -> getToken(*command_line, 1); // gettoken(string,tokenNo);
|
||||
linetoken2 = matrix -> getToken(*command_line, 2); // 2 represents token No 2
|
||||
|
||||
istrstream token1(linetoken1.c_str());
|
||||
istrstream token2(linetoken2.c_str());
|
||||
istringstream token1(linetoken1.c_str());
|
||||
istringstream token2(linetoken2.c_str());
|
||||
|
||||
token1 >> token_value1;
|
||||
token2 >> token_value2;
|
||||
|
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_STRSTREAM
|
||||
//#include STL_STRSTREAM
|
||||
#include <sstream>
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_warnings_errors.h"
|
||||
|
||||
SG_USING_STD(istrstream);
|
||||
//SG_USING_STD(istrstream);
|
||||
|
||||
int uiuc_1DdataFileReader( string file_name,
|
||||
double x[],
|
||||
|
|
|
@ -23,10 +23,13 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 02/03/2000 initial release
|
||||
09/01/2002 (RD) added second interpolation routine
|
||||
for integer case
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Jeff Scott <jscott@mail.com>
|
||||
Robert Deters <rdeters@uiuc.edu>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@
|
|||
HISTORY: 02/29/2000 initial release
|
||||
10/25/2001 (RD) Modified so that it recognizes a
|
||||
blank line
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -101,8 +104,8 @@ void uiuc_2DdataFileReader( string file_name,
|
|||
linetoken1 = matrix -> getToken(*command_line, 1); // gettoken(string,tokenNo);
|
||||
linetoken2 = matrix -> getToken(*command_line, 2); // 2 represents token No 2
|
||||
|
||||
istrstream token1(linetoken1.c_str());
|
||||
istrstream token2(linetoken2.c_str());
|
||||
istringstream token1(linetoken1.c_str());
|
||||
istringstream token2(linetoken2.c_str());
|
||||
|
||||
//reset token_value1 and token_value2 for first if statement
|
||||
token_value1 = -999;
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_STRSTREAM
|
||||
//#include STL_STRSTREAM
|
||||
#include <sstream>
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
SG_USING_STD(istrstream);
|
||||
//SG_USING_STD(istrstream);
|
||||
|
||||
void uiuc_2DdataFileReader( string file_name,
|
||||
double x[100][100],
|
||||
|
|
|
@ -143,6 +143,12 @@ void uiuc_coef_roll()
|
|||
/* Cl_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cl_p_save = Cl_p * P_body * b_2U;
|
||||
// if (Cl_p_save > 0.1) {
|
||||
// Cl_p_save = 0.1;
|
||||
// }
|
||||
// if (Cl_p_save < -0.1) {
|
||||
// Cl_p_save = -0.1;
|
||||
// }
|
||||
if (eta_q_Cl_p_fac)
|
||||
{
|
||||
Cl += Cl_p_save * eta_q_Cl_p_fac;
|
||||
|
|
|
@ -122,6 +122,11 @@ void uiuc_engine()
|
|||
case simpleSingle_flag:
|
||||
{
|
||||
F_X_engine = Throttle[3] * simpleSingleMaxThrust;
|
||||
F_Y_engine = 0.0;
|
||||
F_Z_engine = 0.0;
|
||||
M_l_engine = 0.0;
|
||||
M_m_engine = 0.0;
|
||||
M_n_engine = 0.0;
|
||||
break;
|
||||
}
|
||||
case simpleSingleModel_flag:
|
||||
|
@ -129,6 +134,11 @@ void uiuc_engine()
|
|||
/* simple model based on Hepperle's equation
|
||||
* exponent dtdvvt was computed in uiuc_menu.cpp */
|
||||
F_X_engine = Throttle[3] * t_v0 * (1 - pow((V_rel_wind/v_t0),dtdvvt));
|
||||
F_Y_engine = 0.0;
|
||||
F_Z_engine = 0.0;
|
||||
M_l_engine = 0.0;
|
||||
M_m_engine = 0.0;
|
||||
M_n_engine = 0.0;
|
||||
if (b_slipstreamEffects) {
|
||||
tc = F_X_engine/(Dynamic_pressure * LS_PI * propDia * propDia / 4);
|
||||
w_induced = 0.5 * V_rel_wind * (-1 + pow((1+tc),.5));
|
||||
|
|
|
@ -63,9 +63,14 @@
|
|||
**********************************************************************/
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/misc/sg_path.hxx>
|
||||
#include <Aircraft/aircraft.hxx>
|
||||
#include <Main/fg_props.hxx>
|
||||
|
||||
#include "uiuc_gear.h"
|
||||
|
||||
|
||||
|
||||
SG_USING_STD(cerr);
|
||||
|
||||
|
||||
|
@ -218,143 +223,168 @@ void uiuc_gear()
|
|||
|
||||
for (i=0;i<MAX_GEAR;i++) /* Loop for each wheel */
|
||||
{
|
||||
// Execute only if the gear has been defined
|
||||
if (!gear_model[i])
|
||||
continue;
|
||||
|
||||
/* printf("%s:\n",gear_strings[i]); */
|
||||
|
||||
|
||||
|
||||
/*========================================*/
|
||||
/* Calculate wheel position w.r.t. runway */
|
||||
/*========================================*/
|
||||
|
||||
|
||||
/* printf("\thgcg: %g, theta: %g,phi: %g\n",D_cg_above_rwy,Theta*RAD_TO_DEG,Phi*RAD_TO_DEG); */
|
||||
|
||||
|
||||
/* First calculate wheel location w.r.t. cg in body (X-Y-Z) axes... */
|
||||
|
||||
sub3( D_gear_v[i], D_cg_rp_body_v, d_wheel_cg_body_v );
|
||||
|
||||
/* then converting to local (North-East-Down) axes... */
|
||||
|
||||
multtrans3x3by3( T_local_to_body_m, d_wheel_cg_body_v, d_wheel_cg_local_v );
|
||||
|
||||
|
||||
/* Runway axes correction - third element is Altitude, not (-)Z... */
|
||||
|
||||
d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* since altitude = -Z */
|
||||
|
||||
/* Add wheel offset to cg location in local axes */
|
||||
|
||||
add3( d_wheel_cg_local_v, D_cg_rwy_local_v, d_wheel_rwy_local_v );
|
||||
|
||||
/* remove Runway axes correction so right hand rule applies */
|
||||
|
||||
d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* now Z positive down */
|
||||
|
||||
/*============================*/
|
||||
/* Calculate wheel velocities */
|
||||
/*============================*/
|
||||
|
||||
/* contribution due to angular rates */
|
||||
|
||||
cross3( Omega_body_v, d_wheel_cg_body_v, temp3a );
|
||||
|
||||
/* transform into local axes */
|
||||
|
||||
multtrans3x3by3( T_local_to_body_m, temp3a,v_wheel_cg_local_v );
|
||||
|
||||
/* plus contribution due to cg velocities */
|
||||
|
||||
add3( v_wheel_cg_local_v, V_local_rel_ground_v, v_wheel_local_v );
|
||||
|
||||
clear3(f_wheel_local_v);
|
||||
reaction_normal_force=0;
|
||||
if( HEIGHT_AGL_WHEEL < 0. )
|
||||
/*the wheel is underground -- which implies ground contact
|
||||
so calculate reaction forces */
|
||||
// Execute only if the gear has been defined
|
||||
if (!gear_model[i])
|
||||
{
|
||||
// do nothing
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*===========================================*/
|
||||
/* Calculate forces & moments for this wheel */
|
||||
/*===========================================*/
|
||||
|
||||
/* Add any anticipation, or frame lead/prediction, here... */
|
||||
/*========================================*/
|
||||
/* Calculate wheel position w.r.t. runway */
|
||||
/*========================================*/
|
||||
|
||||
/* printf("\thgcg: %g, theta: %g,phi: %g\n",D_cg_above_rwy,Theta*RAD_TO_DEG,Phi*RAD_TO_DEG); */
|
||||
|
||||
/* First calculate wheel location w.r.t. cg in body (X-Y-Z) axes... */
|
||||
|
||||
sub3( D_gear_v[i], D_cg_rp_body_v, d_wheel_cg_body_v );
|
||||
|
||||
/* then converting to local (North-East-Down) axes... */
|
||||
|
||||
multtrans3x3by3( T_local_to_body_m, d_wheel_cg_body_v, d_wheel_cg_local_v );
|
||||
|
||||
|
||||
/* Runway axes correction - third element is Altitude, not (-)Z... */
|
||||
|
||||
d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* since altitude = -Z */
|
||||
|
||||
/* Add wheel offset to cg location in local axes */
|
||||
|
||||
add3( d_wheel_cg_local_v, D_cg_rwy_local_v, d_wheel_rwy_local_v );
|
||||
|
||||
/* remove Runway axes correction so right hand rule applies */
|
||||
|
||||
d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* now Z positive down */
|
||||
|
||||
/*============================*/
|
||||
/* Calculate wheel velocities */
|
||||
/*============================*/
|
||||
|
||||
/* contribution due to angular rates */
|
||||
|
||||
cross3( Omega_body_v, d_wheel_cg_body_v, temp3a );
|
||||
|
||||
/* transform into local axes */
|
||||
|
||||
multtrans3x3by3( T_local_to_body_m, temp3a,v_wheel_cg_local_v );
|
||||
|
||||
/* plus contribution due to cg velocities */
|
||||
|
||||
add3( v_wheel_cg_local_v, V_local_rel_ground_v, v_wheel_local_v );
|
||||
|
||||
clear3(f_wheel_local_v);
|
||||
reaction_normal_force=0;
|
||||
static const SGPropertyNode * gear_wow
|
||||
= fgGetNode("/gear/gear[0]/wow", false);
|
||||
static const SGPropertyNode * gear_wow1
|
||||
= fgGetNode("/gear/gear[1]/wow", false);
|
||||
static const SGPropertyNode * gear_wow2
|
||||
= fgGetNode("/gear/gear[2]/wow", false);
|
||||
fgSetBool("/gear/gear[0]/wow", false);
|
||||
fgSetBool("/gear/gear[1]/wow", false);
|
||||
fgSetBool("/gear/gear[2]/wow", false);
|
||||
if( HEIGHT_AGL_WHEEL < 0. )
|
||||
/*the wheel is underground -- which implies ground contact
|
||||
so calculate reaction forces */
|
||||
{
|
||||
//set the property - weight on wheels
|
||||
// if (i==0)
|
||||
// {
|
||||
// fgSetBool("/gear/gear[0]/wow", true);
|
||||
// }
|
||||
// if (i==1)
|
||||
// {
|
||||
// fgSetBool("/gear/gear[1]/wow", true);
|
||||
// }
|
||||
// if (i==2)
|
||||
// {
|
||||
// fgSetBool("/gear/gear[2]/wow", true);
|
||||
// }
|
||||
|
||||
/*===========================================*/
|
||||
/* Calculate forces & moments for this wheel */
|
||||
/*===========================================*/
|
||||
|
||||
/* Add any anticipation, or frame lead/prediction, here... */
|
||||
|
||||
/* no lead used at present */
|
||||
|
||||
/* Calculate sideward and forward velocities of the wheel
|
||||
in the runway plane */
|
||||
|
||||
cos_wheel_hdg_angle = cos(caster_angle_rad[i] + Psi);
|
||||
sin_wheel_hdg_angle = sin(caster_angle_rad[i] + Psi);
|
||||
|
||||
v_wheel_forward = v_wheel_local_v[0]*cos_wheel_hdg_angle
|
||||
+ v_wheel_local_v[1]*sin_wheel_hdg_angle;
|
||||
v_wheel_sideward = v_wheel_local_v[1]*cos_wheel_hdg_angle
|
||||
- v_wheel_local_v[0]*sin_wheel_hdg_angle;
|
||||
|
||||
|
||||
/* Calculate normal load force (simple spring constant) */
|
||||
|
||||
reaction_normal_force = 0.;
|
||||
|
||||
reaction_normal_force = kgear[i]*d_wheel_rwy_local_v[2]
|
||||
- v_wheel_local_v[2]*cgear[i];
|
||||
/* printf("\treaction_normal_force: %g\n",reaction_normal_force); */
|
||||
|
||||
if (reaction_normal_force > 0.) reaction_normal_force = 0.;
|
||||
/* to prevent damping component from swamping spring component */
|
||||
|
||||
|
||||
/* Calculate friction coefficients */
|
||||
|
||||
if(it_rolls[i])
|
||||
{
|
||||
forward_mu = (max_brake_mu[i] - muGear[i])*percent_brake[i] + muGear[i];
|
||||
abs_v_wheel_sideward = sqrt(v_wheel_sideward*v_wheel_sideward);
|
||||
sideward_mu = sliding_mu[i];
|
||||
if (abs_v_wheel_sideward < skid_v)
|
||||
sideward_mu = (abs_v_wheel_sideward - bkout_v)*beta_mu;
|
||||
if (abs_v_wheel_sideward < bkout_v) sideward_mu = 0.;
|
||||
}
|
||||
else
|
||||
{
|
||||
forward_mu=sliding_mu[i];
|
||||
sideward_mu=sliding_mu[i];
|
||||
}
|
||||
|
||||
/* Calculate foreward and sideward reaction forces */
|
||||
|
||||
forward_wheel_force = forward_mu*reaction_normal_force;
|
||||
sideward_wheel_force = sideward_mu*reaction_normal_force;
|
||||
if(v_wheel_forward < 0.) forward_wheel_force = -forward_wheel_force;
|
||||
if(v_wheel_sideward < 0.) sideward_wheel_force = -sideward_wheel_force;
|
||||
/* printf("\tFfwdgear: %g Fsidegear: %g\n",forward_wheel_force,sideward_wheel_force);
|
||||
*/
|
||||
/* Rotate into local (N-E-D) axes */
|
||||
|
||||
f_wheel_local_v[0] = forward_wheel_force*cos_wheel_hdg_angle
|
||||
- sideward_wheel_force*sin_wheel_hdg_angle;
|
||||
f_wheel_local_v[1] = forward_wheel_force*sin_wheel_hdg_angle
|
||||
+ sideward_wheel_force*cos_wheel_hdg_angle;
|
||||
f_wheel_local_v[2] = reaction_normal_force;
|
||||
|
||||
/* Convert reaction force from local (N-E-D) axes to body (X-Y-Z) */
|
||||
mult3x3by3( T_local_to_body_m, f_wheel_local_v, tempF );
|
||||
|
||||
/* Calculate moments from force and offsets in body axes */
|
||||
|
||||
cross3( d_wheel_cg_body_v, tempF, tempM );
|
||||
|
||||
/* Sum forces and moments across all wheels */
|
||||
|
||||
add3( tempF, F_gear_v, F_gear_v );
|
||||
add3( tempM, M_gear_v, M_gear_v );
|
||||
|
||||
|
||||
|
||||
/* Calculate sideward and forward velocities of the wheel
|
||||
in the runway plane */
|
||||
|
||||
cos_wheel_hdg_angle = cos(caster_angle_rad[i] + Psi);
|
||||
sin_wheel_hdg_angle = sin(caster_angle_rad[i] + Psi);
|
||||
|
||||
v_wheel_forward = v_wheel_local_v[0]*cos_wheel_hdg_angle
|
||||
+ v_wheel_local_v[1]*sin_wheel_hdg_angle;
|
||||
v_wheel_sideward = v_wheel_local_v[1]*cos_wheel_hdg_angle
|
||||
- v_wheel_local_v[0]*sin_wheel_hdg_angle;
|
||||
|
||||
|
||||
/* Calculate normal load force (simple spring constant) */
|
||||
|
||||
reaction_normal_force = 0.;
|
||||
|
||||
reaction_normal_force = kgear[i]*d_wheel_rwy_local_v[2]
|
||||
- v_wheel_local_v[2]*cgear[i];
|
||||
/* printf("\treaction_normal_force: %g\n",reaction_normal_force); */
|
||||
|
||||
if (reaction_normal_force > 0.) reaction_normal_force = 0.;
|
||||
/* to prevent damping component from swamping spring component */
|
||||
|
||||
|
||||
/* Calculate friction coefficients */
|
||||
|
||||
if(it_rolls[i])
|
||||
{
|
||||
forward_mu = (max_brake_mu[i] - muGear[i])*percent_brake[i] + muGear[i];
|
||||
abs_v_wheel_sideward = sqrt(v_wheel_sideward*v_wheel_sideward);
|
||||
sideward_mu = sliding_mu[i];
|
||||
if (abs_v_wheel_sideward < skid_v)
|
||||
sideward_mu = (abs_v_wheel_sideward - bkout_v)*beta_mu;
|
||||
if (abs_v_wheel_sideward < bkout_v) sideward_mu = 0.;
|
||||
}
|
||||
else
|
||||
{
|
||||
forward_mu=sliding_mu[i];
|
||||
sideward_mu=sliding_mu[i];
|
||||
}
|
||||
|
||||
/* Calculate foreward and sideward reaction forces */
|
||||
|
||||
forward_wheel_force = forward_mu*reaction_normal_force;
|
||||
sideward_wheel_force = sideward_mu*reaction_normal_force;
|
||||
if(v_wheel_forward < 0.) forward_wheel_force = -forward_wheel_force;
|
||||
if(v_wheel_sideward < 0.) sideward_wheel_force = -sideward_wheel_force;
|
||||
/* printf("\tFfwdgear: %g Fsidegear: %g\n",forward_wheel_force,sideward_wheel_force);
|
||||
*/
|
||||
/* Rotate into local (N-E-D) axes */
|
||||
|
||||
f_wheel_local_v[0] = forward_wheel_force*cos_wheel_hdg_angle
|
||||
- sideward_wheel_force*sin_wheel_hdg_angle;
|
||||
f_wheel_local_v[1] = forward_wheel_force*sin_wheel_hdg_angle
|
||||
+ sideward_wheel_force*cos_wheel_hdg_angle;
|
||||
f_wheel_local_v[2] = reaction_normal_force;
|
||||
|
||||
/* Convert reaction force from local (N-E-D) axes to body (X-Y-Z) */
|
||||
mult3x3by3( T_local_to_body_m, f_wheel_local_v, tempF );
|
||||
|
||||
/* Calculate moments from force and offsets in body axes */
|
||||
|
||||
cross3( d_wheel_cg_body_v, tempF, tempM );
|
||||
|
||||
/* Sum forces and moments across all wheels */
|
||||
if (tempF) {
|
||||
fgSetBool("/gear/gear[1]/wow", true);
|
||||
}
|
||||
|
||||
add3( tempF, F_gear_v, F_gear_v );
|
||||
add3( tempM, M_gear_v, M_gear_v );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_CD( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool CXfabetaf_first = true;
|
||||
static bool CXfadef_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_CL( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool CZfabetaf_first = true;
|
||||
static bool CZfadef_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_CY( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool CYfabetaf_first = true;
|
||||
static bool CYfadaf_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_Cm( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool Cmfabetaf_first = true;
|
||||
static bool Cmfadef_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_Cn( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool Cnfabetaf_first = true;
|
||||
static bool Cnfadaf_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -103,14 +106,14 @@ void parse_Cl( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_zArray[100][100];
|
||||
double convert_f;
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool Clfabetaf_first = true;
|
||||
static bool Clfadaf_first = true;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -99,14 +102,14 @@ void parse_controlSurface( const string& linetoken2, const string& linetoken3,
|
|||
LIST command_line ) {
|
||||
double token_value;
|
||||
int token_value_convert1, token_value_convert2;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(controlSurface_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -98,14 +101,14 @@ void parse_engine( const string& linetoken2, const string& linetoken3,
|
|||
LIST command_line ) {
|
||||
double token_value;
|
||||
int token_value_convert1, token_value_convert2;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(engine_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -98,14 +101,14 @@ void parse_fog( const string& linetoken2, const string& linetoken3,
|
|||
LIST command_line ) {
|
||||
double token_value;
|
||||
int token_value_convert1;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(fog_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -1,10 +1,78 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_menu_functions.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: provides common functions used by different menu
|
||||
routines
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Robert Deters <rdeters@uiuc.edu>
|
||||
Michael Selig <m-selig@uiuc.edu>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: n/a
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: n/a
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_menu_XX()
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2003 by Michael Selig
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
USA or view http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "uiuc_menu_functions.h"
|
||||
|
||||
bool check_float( const string &token)
|
||||
{
|
||||
float value;
|
||||
istrstream stream(token.c_str());
|
||||
istringstream stream(token.c_str());
|
||||
return (stream >> value);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
#include <string>
|
||||
#include STL_IOSTREAM
|
||||
#include STL_STRSTREAM
|
||||
//#include STL_STRSTREAM
|
||||
#include <sstream>
|
||||
|
||||
SG_USING_STD(istrstream);
|
||||
//SG_USING_STD(istrstream);
|
||||
|
||||
void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D);
|
||||
void d_1_to_2( double array1D[100], double array2D[][100], int index2D);
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -97,14 +100,14 @@ void parse_gear( const string& linetoken2, const string& linetoken3,
|
|||
const string& linetoken10, const string& aircraft_directory,
|
||||
LIST command_line ) {
|
||||
double token_value;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(gear_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -97,14 +100,14 @@ void parse_geometry( const string& linetoken2, const string& linetoken3,
|
|||
const string& linetoken10,
|
||||
const string& aircraft_directory, LIST command_line ) {
|
||||
double token_value;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(geometry_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -101,14 +104,14 @@ void parse_ice( const string& linetoken2, const string& linetoken3,
|
|||
double datafile_xArray[100][100], datafile_yArray[100];
|
||||
double datafile_zArray[100][100];
|
||||
int datafile_nxArray[100], datafile_ny;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
static bool tactilefadef_first = true;
|
||||
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -97,14 +100,14 @@ void parse_init( const string& linetoken2, const string& linetoken3,
|
|||
const string& linetoken10, const string& aircraft_directory,
|
||||
LIST command_line ) {
|
||||
double token_value;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
int token_value_recordRate;
|
||||
|
||||
switch(init_map[linetoken2])
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -97,14 +100,14 @@ void parse_mass( const string& linetoken2, const string& linetoken3,
|
|||
const string& linetoken10, const string& aircraft_directory,
|
||||
LIST command_line ) {
|
||||
double token_value;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(mass_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/04/2003 initial release
|
||||
06/30/2003 (RD) replaced istrstream with istringstream
|
||||
to get rid of the annoying warning about
|
||||
using the strstream header
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -97,14 +100,14 @@ void parse_misc( const string& linetoken2, const string& linetoken3,
|
|||
const string& linetoken10, const string& aircraft_directory,
|
||||
LIST command_line ) {
|
||||
double token_value;
|
||||
istrstream token3(linetoken3.c_str());
|
||||
istrstream token4(linetoken4.c_str());
|
||||
istrstream token5(linetoken5.c_str());
|
||||
istrstream token6(linetoken6.c_str());
|
||||
istrstream token7(linetoken7.c_str());
|
||||
istrstream token8(linetoken8.c_str());
|
||||
istrstream token9(linetoken9.c_str());
|
||||
istrstream token10(linetoken10.c_str());
|
||||
istringstream token3(linetoken3.c_str());
|
||||
istringstream token4(linetoken4.c_str());
|
||||
istringstream token5(linetoken5.c_str());
|
||||
istringstream token6(linetoken6.c_str());
|
||||
istringstream token7(linetoken7.c_str());
|
||||
istringstream token8(linetoken8.c_str());
|
||||
istringstream token9(linetoken9.c_str());
|
||||
istringstream token10(linetoken10.c_str());
|
||||
|
||||
switch(misc_map[linetoken2])
|
||||
{
|
||||
|
|
|
@ -134,9 +134,11 @@ AIRCRAFTDIR *aircraftdir_ = new AIRCRAFTDIR;
|
|||
|
||||
void uiuc_initial_init ()
|
||||
{
|
||||
// This function called from both ls_step and ls_model(uiuc model side).
|
||||
// Apply brute force initializations, which override ls_step and ls_aux values
|
||||
// for the first time step.
|
||||
// This function is called from uiuc_init_2_wrapper (uiuc_aero.c in LaRCsim)
|
||||
// which is called from ls_step and ls_model.
|
||||
// Apply brute force initializations, which override unwanted changes
|
||||
// performed by LaRCsim.
|
||||
// Used during initialization (while Simtime=0).
|
||||
if (P_body_init_true)
|
||||
P_body = P_body_init;
|
||||
if (Q_body_init_true)
|
||||
|
@ -161,7 +163,7 @@ void uiuc_initial_init ()
|
|||
|
||||
void uiuc_defaults_inits ()
|
||||
{
|
||||
// set defaults and initialize (called from ls_step.c at Simtime=0)
|
||||
// set defaults and initialize (called once from uiuc_init_2_wrapper)
|
||||
|
||||
//fog inits
|
||||
fog_field = 0;
|
||||
|
@ -276,7 +278,15 @@ void uiuc_defaults_inits ()
|
|||
flapper_model = false;
|
||||
ignore_unknown_keywords = false;
|
||||
pilot_throttle_no = false;
|
||||
Dx_cg = 0.0;
|
||||
Dy_cg = 0.0;
|
||||
Dz_cg = 0.0;
|
||||
|
||||
|
||||
// Calculates the local velocity (V_north, V_east, V_down) from the body
|
||||
// velocities.
|
||||
// Called from uiuc_local_vel_init which is called from ls_step.
|
||||
// Used during initialization (while Simtime=0)
|
||||
}
|
||||
|
||||
void uiuc_vel_init ()
|
||||
|
@ -302,6 +312,8 @@ void uiuc_vel_init ()
|
|||
|
||||
V_east = V_east_rel_ground + OMEGA_EARTH*Sea_level_radius*cos(Lat_geocentric);
|
||||
}
|
||||
// Initializes the UIUC aircraft model.
|
||||
// Called once from uiuc_init_2_wrapper
|
||||
}
|
||||
|
||||
void uiuc_init_aeromodel ()
|
||||
|
@ -367,6 +379,10 @@ void uiuc_force_moment(double dt)
|
|||
if (I_zz_appMass_ratio)
|
||||
M_n_aero += -(I_zz_appMass_ratio * I_zz) * R_dot_body;
|
||||
|
||||
// adding in apparent mass in body axis X direction
|
||||
// F_X_aero += -(0.05 * Mass) * U_dot_body;
|
||||
|
||||
|
||||
if (Mass_appMass)
|
||||
F_Z_aero += -Mass_appMass * W_dot_body;
|
||||
if (I_xx_appMass)
|
||||
|
|
Loading…
Reference in a new issue