Sep 1 2000 updates from the UIUC team.
This commit is contained in:
parent
dd2fc3141a
commit
517d111c5c
85 changed files with 9882 additions and 1745 deletions
1087
src/FDM/UIUCModel/Documentation/README-uiucDoc.txt
Normal file
1087
src/FDM/UIUCModel/Documentation/README-uiucDoc.txt
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,42 +1,48 @@
|
|||
|
||||
|
||||
noinst_LIBRARIES = libUIUCModel.a
|
||||
|
||||
libUIUCModel_a_SOURCES = \
|
||||
uiuc_1DdataFileReader.h \
|
||||
uiuc_1DdataFileReader.cpp \
|
||||
uiuc_1Dinterpolation.h \
|
||||
uiuc_1Dinterpolation.cpp \
|
||||
uiuc_2DdataFileReader.h \
|
||||
uiuc_2DdataFileReader.cpp \
|
||||
uiuc_2Dinterpolation.h \
|
||||
uiuc_2Dinterpolation.cpp \
|
||||
uiuc_aerodeflections.h \
|
||||
uiuc_aerodeflections.cpp \
|
||||
uiuc_aircraft.h \
|
||||
uiuc_aircraftdir.h \
|
||||
uiuc_coefficients.h \
|
||||
uiuc_coefficients.cpp \
|
||||
uiuc_convert.h \
|
||||
uiuc_convert.cpp \
|
||||
uiuc_engine.h\
|
||||
uiuc_engine.cpp\
|
||||
uiuc_ice.h \
|
||||
uiuc_ice.cpp \
|
||||
uiuc_initializemaps.h \
|
||||
uiuc_initializemaps.cpp \
|
||||
uiuc_initializemaps1.cpp \
|
||||
uiuc_initializemaps2.cpp \
|
||||
uiuc_initializemaps3.cpp \
|
||||
uiuc_initializemaps4.cpp \
|
||||
uiuc_menu.h \
|
||||
uiuc_menu.cpp \
|
||||
uiuc_parsefile.h \
|
||||
uiuc_parsefile.cpp \
|
||||
uiuc_recorder.h \
|
||||
uiuc_recorder.cpp \
|
||||
uiuc_warnings_errors.h \
|
||||
uiuc_warnings_errors.cpp \
|
||||
uiuc_wrapper.h \
|
||||
uiuc_wrapper.cpp
|
||||
|
||||
INCLUDES += -I$(top_builddir)
|
||||
uiuc_1DdataFileReader.cpp \
|
||||
uiuc_1Dinterpolation.cpp \
|
||||
uiuc_2DdataFileReader.cpp \
|
||||
uiuc_2Dinterpolation.cpp \
|
||||
uiuc_aerodeflections.cpp \
|
||||
uiuc_betaprobe.cpp \
|
||||
uiuc_coefficients.cpp \
|
||||
uiuc_coef_drag.cpp \
|
||||
uiuc_coef_lift.cpp \
|
||||
uiuc_coef_pitch.cpp \
|
||||
uiuc_coef_sideforce.cpp \
|
||||
uiuc_coef_roll.cpp \
|
||||
uiuc_coef_yaw.cpp \
|
||||
uiuc_controlInput.cpp \
|
||||
uiuc_convert.cpp \
|
||||
uiuc_engine.cpp\
|
||||
uiuc_ice.cpp \
|
||||
uiuc_initializemaps.cpp \
|
||||
uiuc_map_CD.cpp \
|
||||
uiuc_map_CL.cpp \
|
||||
uiuc_map_Cm.cpp \
|
||||
uiuc_map_Cn.cpp \
|
||||
uiuc_map_controlSurface.cpp \
|
||||
uiuc_map_Croll.cpp \
|
||||
uiuc_map_CY.cpp \
|
||||
uiuc_map_engine.cpp \
|
||||
uiuc_map_geometry.cpp \
|
||||
uiuc_map_ice.cpp \
|
||||
uiuc_map_init.cpp \
|
||||
uiuc_map_keyword.cpp \
|
||||
uiuc_map_mass.cpp \
|
||||
uiuc_map_misc.cpp \
|
||||
uiuc_map_record1.cpp \
|
||||
uiuc_map_record2.cpp \
|
||||
uiuc_map_record3.cpp \
|
||||
uiuc_map_record4.cpp \
|
||||
uiuc_map_record5.cpp \
|
||||
uiuc_menu.cpp \
|
||||
uiuc_parsefile.cpp \
|
||||
uiuc_recorder.cpp \
|
||||
uiuc_warnings_errors.cpp \
|
||||
uiuc_wrapper.cpp \
|
||||
INCLUDES += -I$(top_builddir)
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
#include "uiuc_1DdataFileReader.h"
|
||||
|
||||
int
|
||||
uiuc_1DdataFileReader( string file_name, double convert_x, double convert_y,
|
||||
double x[100], double y[100], int &xmax )
|
||||
uiuc_1DdataFileReader( string file_name,
|
||||
double x[100], double y[100], int &xmax )
|
||||
{
|
||||
|
||||
ParseFile *matrix;
|
||||
|
|
|
@ -1,19 +1,14 @@
|
|||
#ifndef _1D_DATA_FILE_READER_H_
|
||||
#define _1D_DATA_FILE_READER_H_
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_STRSTREAM
|
||||
#include <strstream.h>
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
FG_USING_NAMESPACE(std);
|
||||
|
||||
int uiuc_1DdataFileReader( string file_name,
|
||||
double convert_x,
|
||||
double convert_y,
|
||||
double x[100],
|
||||
double y[100],
|
||||
int &xmax );
|
||||
double x[100],
|
||||
double y[100],
|
||||
int &xmax );
|
||||
|
||||
#endif // _1D_DATA_FILE_READER_H_
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
DESCRIPTION: reads in the yData and xData arrays and the value of x
|
||||
to be interpolated on; performs 1D interpolation,
|
||||
i.e. y=f(x)
|
||||
i.e. y=f(x)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
|||
|
||||
REFERENCES: syntax based on interp function in c172_aero.c
|
||||
mathematics based on linear interpolation functions
|
||||
found in
|
||||
Kreyszig, Erwin. Advanced Engineering Mathematics,
|
||||
7th ed. NY: John Wiley & Sons, 1993.
|
||||
found in
|
||||
Kreyszig, Erwin. Advanced Engineering Mathematics,
|
||||
7th ed. NY: John Wiley & Sons, 1993.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -93,13 +93,13 @@ double uiuc_1Dinterpolation( double xData[100], double yData[100], int xmax, dou
|
|||
else //x between xmax and x min
|
||||
{
|
||||
/*loop increases i until x is less than a known x,
|
||||
e.g. Alpha from LaRCsim less than Alpha given in
|
||||
tabulated data; once this value is found, i becomes
|
||||
the upper bound and i-1 the lower bound*/
|
||||
e.g. Alpha from LaRCsim less than Alpha given in
|
||||
tabulated data; once this value is found, i becomes
|
||||
the upper bound and i-1 the lower bound*/
|
||||
while (xData[i] <= x) //bracket upper bound
|
||||
{
|
||||
i++;
|
||||
}
|
||||
{
|
||||
i++;
|
||||
}
|
||||
x2 = xData[i]; //set upper bounds
|
||||
y2 = yData[i];
|
||||
x1 = xData[i-1]; //set lower bounds
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#ifndef _1D_INTERPOLATION_H_
|
||||
#define _1D_INTERPOLATION_H_
|
||||
|
||||
double uiuc_1Dinterpolation( double xData[100], double yData[100], int xmax, double x );
|
||||
double uiuc_1Dinterpolation( double xData[100],
|
||||
double yData[100],
|
||||
int xmax,
|
||||
double x );
|
||||
|
||||
#endif // _1D_INTERPOLATION_H_
|
||||
|
|
|
@ -73,20 +73,17 @@
|
|||
#include "uiuc_2DdataFileReader.h"
|
||||
|
||||
|
||||
int uiuc_2DdataFileReader( string file_name,
|
||||
double convert_x,
|
||||
double convert_y,
|
||||
double convert_z,
|
||||
double x[100][100],
|
||||
double y[100],
|
||||
double z[100][100],
|
||||
int xmax[100],
|
||||
int &ymax)
|
||||
void uiuc_2DdataFileReader( string file_name,
|
||||
double x[100][100],
|
||||
double y[100],
|
||||
double z[100][100],
|
||||
int xmax[100],
|
||||
int &ymax)
|
||||
{
|
||||
ParseFile *matrix;
|
||||
double token_value1;
|
||||
double token_value2;
|
||||
int counter_y = 1, counter_x = 1, data = 0;
|
||||
int counter_y = 1, counter_x = 1;
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
|
||||
|
@ -128,8 +125,7 @@ int uiuc_2DdataFileReader( string file_name,
|
|||
counter_x++;
|
||||
}
|
||||
}
|
||||
data = 1;
|
||||
return data;
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_2DdataFileReader.cpp
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
#ifndef _2D_DATA_FILE_READER_H_
|
||||
#define _2D_DATA_FILE_READER_H_
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include STL_STRSTREAM
|
||||
#include <strstream.h>
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
FG_USING_NAMESPACE(std);
|
||||
|
||||
int
|
||||
uiuc_2DdataFileReader( string file_name, double convert_x, double convert_y, double convert_z,
|
||||
double x[100][100], double y[100], double z[100][100], int xmax[100],
|
||||
int &ymax);
|
||||
void uiuc_2DdataFileReader( string file_name,
|
||||
double x[100][100],
|
||||
double y[100],
|
||||
double z[100][100],
|
||||
int xmax[100],
|
||||
int &ymax);
|
||||
|
||||
#endif // _2D_DATA_FILE_READER_H_
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
#ifndef _2D_INTERPOLATION_H_
|
||||
#define _2D_INTERPOLATION_H_
|
||||
|
||||
double
|
||||
uiuc_2Dinterpolation( double xData[100][100], double yData[100], double zData[100][100],
|
||||
int xmax[100], int ymax, double x, double y );
|
||||
double uiuc_2Dinterpolation( double xData[100][100],
|
||||
double yData[100],
|
||||
double zData[100][100],
|
||||
int xmax[100],
|
||||
int ymax,
|
||||
double x,
|
||||
double y );
|
||||
|
||||
#endif // _2D_INTERPOLATION_H_
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 01/30/2000 initial release
|
||||
04/05/2000 (JS) added zero_Long_trim command
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -69,20 +70,85 @@
|
|||
|
||||
#include "uiuc_aerodeflections.h"
|
||||
|
||||
void uiuc_aerodeflections()
|
||||
void uiuc_aerodeflections( double dt )
|
||||
{
|
||||
double prevFlapHandle, flap_transit_rate;
|
||||
bool flaps_in_transit;
|
||||
|
||||
// for now, consider deflections to be equal
|
||||
// damin = damax
|
||||
aileron = - Lat_control * damax * DEG_TO_RAD;
|
||||
if (zero_Long_trim)
|
||||
{
|
||||
Long_trim = 0;
|
||||
//elevator_tab = 0;
|
||||
}
|
||||
|
||||
// for now, consider deflections to be equal
|
||||
// demin = demax
|
||||
elevator = Long_control * demax * DEG_TO_RAD + Long_trim;
|
||||
if (Lat_control <= 0)
|
||||
aileron = - Lat_control * damin * DEG_TO_RAD;
|
||||
else
|
||||
aileron = - Lat_control * damax * DEG_TO_RAD;
|
||||
|
||||
// for now, consider deflections to be equal
|
||||
// drmin = drmax
|
||||
rudder = - Rudder_pedal * drmax * DEG_TO_RAD;
|
||||
if ((Long_control+Long_trim) <= 0)
|
||||
elevator = (Long_control + Long_trim) * demax * DEG_TO_RAD + elevator_tab;
|
||||
else
|
||||
elevator = (Long_control + Long_trim) * demin * DEG_TO_RAD + elevator_tab;
|
||||
|
||||
if (Rudder_pedal <= 0)
|
||||
rudder = - Rudder_pedal * drmin * DEG_TO_RAD;
|
||||
else
|
||||
rudder = - Rudder_pedal * drmax * DEG_TO_RAD;
|
||||
|
||||
// flap routine
|
||||
// check for lowest flap setting
|
||||
if (Flap_handle < dfArray[1])
|
||||
{
|
||||
Flap_handle = dfArray[1];
|
||||
prevFlapHandle = Flap_handle;
|
||||
flap = Flap_handle;
|
||||
}
|
||||
// check for highest flap setting
|
||||
else if (Flap_handle > dfArray[ndf])
|
||||
{
|
||||
Flap_handle = dfArray[ndf];
|
||||
prevFlapHandle = Flap_handle;
|
||||
flap = Flap_handle;
|
||||
}
|
||||
// otherwise in between
|
||||
else
|
||||
{
|
||||
if(Flap_handle != prevFlapHandle)
|
||||
{
|
||||
flaps_in_transit = true;
|
||||
}
|
||||
if(flaps_in_transit)
|
||||
{
|
||||
int iflap = 0;
|
||||
while (dfArray[iflap] < Flap_handle)
|
||||
{
|
||||
iflap++;
|
||||
}
|
||||
if (flap < Flap_handle)
|
||||
{
|
||||
if (TimeArray[iflap] > 0)
|
||||
flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / TimeArray[iflap+1];
|
||||
else
|
||||
flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TimeArray[iflap+1] > 0)
|
||||
flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / TimeArray[iflap+1];
|
||||
else
|
||||
flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / 5;
|
||||
}
|
||||
if(fabs (flap - Flap_handle) > dt * flap_transit_rate)
|
||||
flap += flap_transit_rate * dt;
|
||||
else
|
||||
{
|
||||
flaps_in_transit = false;
|
||||
flap = Flap_handle;
|
||||
}
|
||||
}
|
||||
}
|
||||
prevFlapHandle = Flap_handle;
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
#ifndef _AERODEFLECTIONS_H_
|
||||
#define _AERODEFLECTIONS_H_
|
||||
|
||||
#include "uiuc_aircraft.h" /* uses aileron, elevator, rudder */
|
||||
#include "../LaRCsim/ls_cockpit.h" /* uses Long_control, Lat_control, Rudder_pedal */
|
||||
#include "../LaRCsim/ls_constants.h" /* uses RAD_TO_DEG, DEG_TO_RAD */
|
||||
#include "uiuc_aircraft.h" /* aileron, elevator, rudder */
|
||||
#include "../LaRCsim/ls_cockpit.h" /* Long_control, Lat_control, Rudder_pedal */
|
||||
#include "../LaRCsim/ls_constants.h" /* RAD_TO_DEG, DEG_TO_RAD */
|
||||
|
||||
void uiuc_aerodeflections();
|
||||
|
||||
void uiuc_aerodeflections( double dt );
|
||||
|
||||
#endif // _AERODEFLECTIONS_H_
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -70,12 +70,11 @@
|
|||
|
||||
typedef struct
|
||||
{
|
||||
string real_aircraft_dir;
|
||||
#define aircraft_dir aircraftdir_->real_aircraft_dir
|
||||
string aircraft_dir;
|
||||
#define aircraft_dir aircraftdir_->aircraft_dir
|
||||
|
||||
} AIRCRAFTDIR;
|
||||
|
||||
// usually defined in the first program that includes uiuc_aircraft.h
|
||||
extern AIRCRAFTDIR *aircraftdir_;
|
||||
extern AIRCRAFTDIR *aircraftdir_; // usually defined in the first program that includes uiuc_aircraft.h
|
||||
|
||||
#endif // endif _AIRCRAFTDIR_H
|
||||
|
|
132
src/FDM/UIUCModel/uiuc_betaprobe.cpp
Normal file
132
src/FDM/UIUCModel/uiuc_betaprobe.cpp
Normal file
|
@ -0,0 +1,132 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_betaprobe.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: Computes flow angle, beta, for use in ice detection
|
||||
scheme
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 05/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: CLclean_wing
|
||||
CLiced_wing
|
||||
CLclean_tail
|
||||
CLiced_tail
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: Dbeta_flow_wing
|
||||
Dbeta_flow_tail
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_wrapper
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_betaprobe.h"
|
||||
|
||||
|
||||
void uiuc_betaprobe()
|
||||
{
|
||||
if (CX && CZ)
|
||||
{
|
||||
CLclean_wing = CXclean_wing * sin(Alpha) - CZclean_wing * cos(Alpha);
|
||||
CLiced_wing = CXiced_wing * sin(Alpha) - CZiced_wing * cos(Alpha);
|
||||
CLclean_tail = CXclean_tail * sin(Alpha) - CZclean_tail * cos(Alpha);
|
||||
CLiced_tail = CXiced_tail * sin(Alpha) - CZiced_tail * cos(Alpha);
|
||||
}
|
||||
|
||||
/* calculate lift per unit span*/
|
||||
Lift_clean_wing = CLclean_wing * Dynamic_pressure * Sw / bw;
|
||||
Lift_iced_wing = CLiced_wing * Dynamic_pressure * Sw / bw;
|
||||
Lift_clean_tail = CLclean_tail * Dynamic_pressure * Sh / bh;
|
||||
Lift_iced_tail = CLiced_tail * Dynamic_pressure * Sh / bh;
|
||||
|
||||
Gamma_clean_wing = Lift_clean_wing / (Density * V_rel_wind);
|
||||
Gamma_iced_wing = Lift_iced_wing / (Density * V_rel_wind);
|
||||
Gamma_clean_tail = Lift_clean_tail / (Density * V_rel_wind);
|
||||
Gamma_iced_tail = Lift_iced_tail / (Density * V_rel_wind);
|
||||
|
||||
w_clean_wing = Gamma_clean_wing / (2 * PI * x_probe_wing);
|
||||
w_iced_wing = Gamma_iced_wing / (2 * PI * x_probe_wing);
|
||||
w_clean_tail = Gamma_clean_tail / (2 * PI * x_probe_tail);
|
||||
w_iced_tail = Gamma_iced_tail / (2 * PI * x_probe_tail);
|
||||
|
||||
V_total_clean_wing = sqrt(w_clean_wing*w_clean_wing +
|
||||
V_rel_wind*V_rel_wind -
|
||||
2*w_clean_wing*V_rel_wind *
|
||||
cos(PI/2 + Alpha));
|
||||
V_total_iced_wing = sqrt(w_iced_wing*w_iced_wing +
|
||||
V_rel_wind*V_rel_wind -
|
||||
2*w_iced_wing*V_rel_wind *
|
||||
cos(PI/2 + Alpha));
|
||||
V_total_clean_tail = sqrt(w_clean_tail*w_clean_tail +
|
||||
V_rel_wind*V_rel_wind -
|
||||
2*w_clean_tail*V_rel_wind *
|
||||
cos(PI/2 + Alpha));
|
||||
V_total_iced_tail = sqrt(w_iced_tail*w_iced_tail +
|
||||
V_rel_wind*V_rel_wind -
|
||||
2*w_iced_tail*V_rel_wind *
|
||||
cos(PI/2 + Alpha));
|
||||
|
||||
beta_flow_clean_wing = asin((w_clean_wing / V_total_clean_wing) *
|
||||
sin (PI/2 + Alpha));
|
||||
beta_flow_iced_wing = asin((w_iced_wing / V_total_iced_wing) *
|
||||
sin (PI/2 + Alpha));
|
||||
beta_flow_clean_tail = asin((w_clean_tail / V_total_clean_tail) *
|
||||
sin (PI/2 + Alpha));
|
||||
beta_flow_iced_tail = asin((w_iced_tail / V_total_iced_tail) *
|
||||
sin (PI/2 + Alpha));
|
||||
|
||||
Dbeta_flow_wing = fabs(beta_flow_clean_wing - beta_flow_iced_wing);
|
||||
Dbeta_flow_tail = fabs(beta_flow_clean_tail - beta_flow_iced_tail);
|
||||
|
||||
pct_beta_flow_wing = beta_flow_iced_wing / beta_flow_clean_wing;
|
||||
pct_beta_flow_tail = beta_flow_iced_tail / beta_flow_clean_tail;
|
||||
}
|
||||
|
||||
//end uiuc_betaprobe.cpp
|
11
src/FDM/UIUCModel/uiuc_betaprobe.h
Normal file
11
src/FDM/UIUCModel/uiuc_betaprobe.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef _BETAPROBE_H_
|
||||
#define _BETAPROBE_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "../FDM/LaRCsim/ls_constants.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
#include <math.h>
|
||||
|
||||
void uiuc_betaprobe();
|
||||
|
||||
#endif // _BETAPROBE_H_
|
393
src/FDM/UIUCModel/uiuc_coef_drag.cpp
Normal file
393
src/FDM/UIUCModel/uiuc_coef_drag.cpp
Normal file
|
@ -0,0 +1,393 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_drag.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic drag coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-elevator
|
||||
-drag coefficient components
|
||||
-icing parameters
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -CD
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_drag.h"
|
||||
|
||||
|
||||
void uiuc_coef_drag()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroDragParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroDragParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroDragParts -> getToken(*command_line, 2);
|
||||
|
||||
switch (CD_map[linetoken2])
|
||||
{
|
||||
case CDo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CDo = uiuc_ice_filter(CDo_clean,kCDo);
|
||||
}
|
||||
CD += CDo;
|
||||
break;
|
||||
}
|
||||
case CDK_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CDK = uiuc_ice_filter(CDK_clean,kCDK);
|
||||
}
|
||||
CD += CDK * CL * CL;
|
||||
break;
|
||||
}
|
||||
case CD_a_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CD_a = uiuc_ice_filter(CD_a_clean,kCD_a);
|
||||
}
|
||||
CD += CD_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CD_adot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CD_adot = uiuc_ice_filter(CD_adot_clean,kCD_adot);
|
||||
}
|
||||
/* CD_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CD += CD_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CD_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CD_q = uiuc_ice_filter(CD_q_clean,kCD_q);
|
||||
}
|
||||
/* CD_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
/* why multiply by Theta_dot instead of Q_body?
|
||||
see note in coef_lift.cpp */
|
||||
CD += CD_q * Theta_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CD_ih_flag:
|
||||
{
|
||||
CD += CD_ih * ih;
|
||||
break;
|
||||
}
|
||||
case CD_de_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CD_de = uiuc_ice_filter(CD_de_clean,kCD_de);
|
||||
}
|
||||
CD += CD_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CDfa_flag:
|
||||
{
|
||||
CDfaI = uiuc_1Dinterpolation(CDfa_aArray,
|
||||
CDfa_CDArray,
|
||||
CDfa_nAlpha,
|
||||
Alpha);
|
||||
CD += CDfaI;
|
||||
break;
|
||||
}
|
||||
case CDfCL_flag:
|
||||
{
|
||||
CDfCLI = uiuc_1Dinterpolation(CDfCL_CLArray,
|
||||
CDfCL_CDArray,
|
||||
CDfCL_nCL,
|
||||
CL);
|
||||
CD += CDfCLI;
|
||||
break;
|
||||
}
|
||||
case CDfdf_flag:
|
||||
{
|
||||
CDfdfI = uiuc_1Dinterpolation(CDfdf_dfArray,
|
||||
CDfdf_CDArray,
|
||||
CDfdf_ndf,
|
||||
flap);
|
||||
CD += CDfdfI;
|
||||
break;
|
||||
}
|
||||
case CDfade_flag:
|
||||
{
|
||||
CDfadeI = uiuc_2Dinterpolation(CDfade_aArray,
|
||||
CDfade_deArray,
|
||||
CDfade_CDArray,
|
||||
CDfade_nAlphaArray,
|
||||
CDfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
CD += CDfadeI;
|
||||
break;
|
||||
}
|
||||
case CDfadf_flag:
|
||||
{
|
||||
CDfadfI = uiuc_2Dinterpolation(CDfadf_aArray,
|
||||
CDfadf_dfArray,
|
||||
CDfadf_CDArray,
|
||||
CDfadf_nAlphaArray,
|
||||
CDfadf_ndf,
|
||||
Alpha,
|
||||
flap);
|
||||
CD += CDfadfI;
|
||||
break;
|
||||
}
|
||||
case CXo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CXo = uiuc_ice_filter(CXo_clean,kCXo);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CXo_clean;
|
||||
CXclean_tail += CXo_clean;
|
||||
CXiced_wing += CXo;
|
||||
CXiced_tail += CXo;
|
||||
}
|
||||
}
|
||||
CX += CXo;
|
||||
break;
|
||||
}
|
||||
case CXK_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CXK = uiuc_ice_filter(CXK_clean,kCXK);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CXK_clean * CLclean_wing * CLclean_wing;
|
||||
CXclean_tail += CXK_clean * CLclean_tail * CLclean_tail;
|
||||
CXiced_wing += CXK * CLiced_wing * CLiced_wing;
|
||||
CXiced_tail += CXK * CLiced_tail * CLiced_tail;
|
||||
}
|
||||
}
|
||||
CX += CXK * CZ * CZ;
|
||||
break;
|
||||
}
|
||||
case CX_a_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_a = uiuc_ice_filter(CX_a_clean,kCX_a);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_a_clean * Alpha;
|
||||
CXclean_tail += CX_a_clean * Alpha;
|
||||
CXiced_wing += CX_a * Alpha;
|
||||
CXiced_tail += CX_a * Alpha;
|
||||
}
|
||||
}
|
||||
CX += CX_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CX_a2_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_a2 = uiuc_ice_filter(CX_a2_clean,kCX_a2);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_a2_clean * Alpha * Alpha;
|
||||
CXclean_tail += CX_a2_clean * Alpha * Alpha;
|
||||
CXiced_wing += CX_a2 * Alpha * Alpha;
|
||||
CXiced_tail += CX_a2 * Alpha * Alpha;
|
||||
}
|
||||
}
|
||||
CX += CX_a2 * Alpha * Alpha;
|
||||
break;
|
||||
}
|
||||
case CX_a3_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_a3 = uiuc_ice_filter(CX_a3_clean,kCX_a3);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_a3_clean * Alpha * Alpha * Alpha;
|
||||
CXclean_tail += CX_a3_clean * Alpha * Alpha * Alpha;
|
||||
CXiced_wing += CX_a3 * Alpha * Alpha * Alpha;
|
||||
CXiced_tail += CX_a3 * Alpha * Alpha * Alpha;
|
||||
}
|
||||
}
|
||||
CX += CX_a3 * Alpha * Alpha * Alpha;
|
||||
break;
|
||||
}
|
||||
case CX_adot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_adot = uiuc_ice_filter(CX_adot_clean,kCX_adot);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_adot_clean * Alpha_dot * cbar_2U;
|
||||
CXclean_tail += CX_adot_clean * Alpha_dot * ch_2U;
|
||||
CXiced_wing += CX * Alpha_dot * cbar_2U;
|
||||
CXiced_tail += CX * Alpha_dot * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CX_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CX += CX_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CX_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_q = uiuc_ice_filter(CX_q_clean,kCX_q);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_q_clean * Q_body * cbar_2U;
|
||||
CXclean_tail += CX_q_clean * Q_body * ch_2U;
|
||||
CXiced_wing += CX_q * Q_body * cbar_2U;
|
||||
CXiced_tail += CX_q * Q_body * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CX_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CX += CX_q * Q_body * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CX_de_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_de = uiuc_ice_filter(CX_de_clean,kCX_de);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_de_clean * elevator;
|
||||
CXclean_tail += CX_de_clean * elevator;
|
||||
CXiced_wing += CX_de * elevator;
|
||||
CXiced_tail += CX_de * elevator;
|
||||
}
|
||||
}
|
||||
CX += CX_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CX_dr_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_dr = uiuc_ice_filter(CX_dr_clean,kCX_dr);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_dr_clean * rudder;
|
||||
CXclean_tail += CX_dr_clean * rudder;
|
||||
CXiced_wing += CX_dr * rudder;
|
||||
CXiced_tail += CX_dr * rudder;
|
||||
}
|
||||
}
|
||||
CX += CX_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case CX_df_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_df = uiuc_ice_filter(CX_df_clean,kCX_df);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_df_clean * flap;
|
||||
CXclean_tail += CX_df_clean * flap;
|
||||
CXiced_wing += CX * flap;
|
||||
CXiced_tail += CX * flap;
|
||||
}
|
||||
}
|
||||
CX += CX_df * flap;
|
||||
break;
|
||||
}
|
||||
case CX_adf_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CX_adf = uiuc_ice_filter(CX_adf_clean,kCX_adf);
|
||||
if (beta_model)
|
||||
{
|
||||
CXclean_wing += CX_adf_clean * Alpha * flap;
|
||||
CXclean_tail += CX_adf_clean * Alpha * flap;
|
||||
CXiced_wing += CX_adf * Alpha * flap;
|
||||
CXiced_tail += CX_adf * Alpha * flap;
|
||||
}
|
||||
}
|
||||
CX += CX_adf * Alpha * flap;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end CD map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_drag.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_drag.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_drag.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_DRAG_H_
|
||||
#define _COEF_DRAG_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_drag();
|
||||
|
||||
#endif // _COEF_DRAG_H_
|
396
src/FDM/UIUCModel/uiuc_coef_lift.cpp
Normal file
396
src/FDM/UIUCModel/uiuc_coef_lift.cpp
Normal file
|
@ -0,0 +1,396 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_lift.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic lift coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-elevator
|
||||
-lift coefficient components
|
||||
-icing parameters
|
||||
-cbar_2U multiplier
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -CL
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_lift.h"
|
||||
|
||||
|
||||
void uiuc_coef_lift()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroLiftParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroLiftParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroLiftParts -> getToken(*command_line, 2);
|
||||
|
||||
switch (CL_map[linetoken2])
|
||||
{
|
||||
case CLo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CLo = uiuc_ice_filter(CLo_clean,kCLo);
|
||||
if (beta_model)
|
||||
{
|
||||
CLclean_wing += CLo_clean;
|
||||
CLclean_tail += CLo_clean;
|
||||
CLiced_wing += CLo;
|
||||
CLiced_tail += CLo;
|
||||
}
|
||||
}
|
||||
CL += CLo;
|
||||
break;
|
||||
}
|
||||
case CL_a_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CL_a = uiuc_ice_filter(CL_a_clean,kCL_a);
|
||||
if (beta_model)
|
||||
{
|
||||
CLclean_wing += CL_a_clean * Alpha;
|
||||
CLclean_tail += CL_a_clean * Alpha;
|
||||
CLiced_wing += CL_a * Alpha;
|
||||
CLiced_tail += CL_a * Alpha;
|
||||
}
|
||||
}
|
||||
CL += CL_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CL_adot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CL_adot = uiuc_ice_filter(CL_adot_clean,kCL_adot);
|
||||
if (beta_model)
|
||||
{
|
||||
CLclean_wing += CL_adot_clean * Alpha_dot * cbar_2U;
|
||||
CLclean_tail += CL_adot_clean * Alpha_dot * ch_2U;
|
||||
CLiced_wing += CL_adot * Alpha_dot * cbar_2U;
|
||||
CLiced_tail += CL_adot * Alpha_dot * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CL_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CL += CL_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CL_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CL_q = uiuc_ice_filter(CL_q_clean,kCL_q);
|
||||
if (beta_model)
|
||||
{
|
||||
CLclean_wing += CL_q_clean * Theta_dot * cbar_2U;
|
||||
CLclean_tail += CL_q_clean * Theta_dot * ch_2U;
|
||||
CLiced_wing += CL_q * Theta_dot * cbar_2U;
|
||||
CLiced_tail += CL_q * Theta_dot * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CL_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
/* why multiply by Theta_dot instead of Q_body?
|
||||
that is what is done in c172_aero.c; assume it
|
||||
has something to do with axes systems */
|
||||
CL += CL_q * Theta_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CL_ih_flag:
|
||||
{
|
||||
CL += CL_ih * ih;
|
||||
break;
|
||||
}
|
||||
case CL_de_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CL_de = uiuc_ice_filter(CL_de_clean,kCL_de);
|
||||
if (beta_model)
|
||||
{
|
||||
CLclean_wing += CL_de_clean * elevator;
|
||||
CLclean_tail += CL_de_clean * elevator;
|
||||
CLiced_wing += CL_de * elevator;
|
||||
CLiced_tail += CL_de * elevator;
|
||||
}
|
||||
}
|
||||
CL += CL_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CLfa_flag:
|
||||
{
|
||||
CLfaI = uiuc_1Dinterpolation(CLfa_aArray,
|
||||
CLfa_CLArray,
|
||||
CLfa_nAlpha,
|
||||
Alpha);
|
||||
CL += CLfaI;
|
||||
break;
|
||||
}
|
||||
case CLfade_flag:
|
||||
{
|
||||
CLfadeI = uiuc_2Dinterpolation(CLfade_aArray,
|
||||
CLfade_deArray,
|
||||
CLfade_CLArray,
|
||||
CLfade_nAlphaArray,
|
||||
CLfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
CL += CLfadeI;
|
||||
break;
|
||||
}
|
||||
case CLfdf_flag:
|
||||
{
|
||||
CLfdfI = uiuc_1Dinterpolation(CLfdf_dfArray,
|
||||
CLfdf_CLArray,
|
||||
CLfdf_ndf,
|
||||
flap);
|
||||
CL += CLfdfI;
|
||||
break;
|
||||
}
|
||||
case CLfadf_flag:
|
||||
{
|
||||
CLfadfI = uiuc_2Dinterpolation(CLfadf_aArray,
|
||||
CLfadf_dfArray,
|
||||
CLfadf_CLArray,
|
||||
CLfadf_nAlphaArray,
|
||||
CLfadf_ndf,
|
||||
Alpha,
|
||||
flap);
|
||||
CL += CLfadfI;
|
||||
break;
|
||||
}
|
||||
case CZo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZo = uiuc_ice_filter(CZo_clean,kCZo);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZo_clean;
|
||||
CZclean_tail += CZo_clean;
|
||||
CZiced_wing += CZo;
|
||||
CZiced_tail += CZo;
|
||||
}
|
||||
}
|
||||
CZ += CZo;
|
||||
break;
|
||||
}
|
||||
case CZ_a_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_a = uiuc_ice_filter(CZ_a_clean,kCZ_a);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_a_clean * Alpha;
|
||||
CZclean_tail += CZ_a_clean * Alpha;
|
||||
CZiced_wing += CZ_a * Alpha;
|
||||
CZiced_tail += CZ_a * Alpha;
|
||||
}
|
||||
}
|
||||
CZ += CZ_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CZ_a2_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_a2 = uiuc_ice_filter(CZ_a2_clean,kCZ_a2);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_a2_clean * Alpha * Alpha;
|
||||
CZclean_tail += CZ_a2_clean * Alpha * Alpha;
|
||||
CZiced_wing += CZ_a2 * Alpha * Alpha;
|
||||
CZiced_tail += CZ_a2 * Alpha * Alpha;
|
||||
}
|
||||
}
|
||||
CZ += CZ_a2 * Alpha * Alpha;
|
||||
break;
|
||||
}
|
||||
case CZ_a3_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_a3 = uiuc_ice_filter(CZ_a3_clean,kCZ_a3);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_a3_clean * Alpha * Alpha * Alpha;
|
||||
CZclean_tail += CZ_a3_clean * Alpha * Alpha * Alpha;
|
||||
CZiced_wing += CZ_a3 * Alpha * Alpha * Alpha;
|
||||
CZiced_tail += CZ_a3 * Alpha * Alpha * Alpha;
|
||||
}
|
||||
}
|
||||
CZ += CZ_a3 * Alpha * Alpha * Alpha;
|
||||
break;
|
||||
}
|
||||
case CZ_adot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_adot = uiuc_ice_filter(CZ_adot_clean,kCZ_adot);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_adot_clean * Alpha_dot * cbar_2U;
|
||||
CZclean_tail += CZ_adot_clean * Alpha_dot * ch_2U;
|
||||
CZiced_wing += CZ_adot * Alpha_dot * cbar_2U;
|
||||
CZiced_tail += CZ_adot * Alpha_dot * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CZ_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CZ += CZ_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CZ_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_q = uiuc_ice_filter(CZ_q_clean,kCZ_q);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_q_clean * Q_body * cbar_2U;
|
||||
CZclean_tail += CZ_q_clean * Q_body * ch_2U;
|
||||
CZiced_wing += CZ_q * Q_body * cbar_2U;
|
||||
CZiced_tail += CZ_q * Q_body * ch_2U;
|
||||
}
|
||||
}
|
||||
/* CZ_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CZ += CZ_q * Q_body * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CZ_de_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_de = uiuc_ice_filter(CZ_de_clean,kCZ_de);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_de_clean * elevator;
|
||||
CZclean_tail += CZ_de_clean * elevator;
|
||||
CZiced_wing += CZ_de * elevator;
|
||||
CZiced_tail += CZ_de * elevator;
|
||||
}
|
||||
}
|
||||
CZ += CZ_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CZ_deb2_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_deb2 = uiuc_ice_filter(CZ_deb2_clean,kCZ_deb2);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_deb2_clean * elevator * Beta * Beta;
|
||||
CZclean_tail += CZ_deb2_clean * elevator * Beta * Beta;
|
||||
CZiced_wing += CZ_deb2 * elevator * Beta * Beta;
|
||||
CZiced_tail += CZ_deb2 * elevator * Beta * Beta;
|
||||
}
|
||||
}
|
||||
CZ += CZ_deb2 * elevator * Beta * Beta;
|
||||
break;
|
||||
}
|
||||
case CZ_df_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_df = uiuc_ice_filter(CZ_df_clean,kCZ_df);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_df_clean * flap;
|
||||
CZclean_tail += CZ_df_clean * flap;
|
||||
CZiced_wing += CZ_df * flap;
|
||||
CZiced_tail += CZ_df * flap;
|
||||
}
|
||||
}
|
||||
CZ += CZ_df * flap;
|
||||
break;
|
||||
}
|
||||
case CZ_adf_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CZ_adf = uiuc_ice_filter(CZ_adf_clean,kCZ_adf);
|
||||
if (beta_model)
|
||||
{
|
||||
CZclean_wing += CZ_adf_clean * Alpha * flap;
|
||||
CZclean_tail += CZ_adf_clean * Alpha * flap;
|
||||
CZiced_wing += CZ_adf * Alpha * flap;
|
||||
CZiced_tail += CZ_adf * Alpha * flap;
|
||||
}
|
||||
}
|
||||
CZ += CZ_adf * Alpha * flap;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end CL map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_lift.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_lift.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_lift.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_LIFT_H_
|
||||
#define _COEF_LIFT_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_lift();
|
||||
|
||||
#endif // _COEF_LIFT_H_
|
230
src/FDM/UIUCModel/uiuc_coef_pitch.cpp
Normal file
230
src/FDM/UIUCModel/uiuc_coef_pitch.cpp
Normal file
|
@ -0,0 +1,230 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_pitch.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic pitch coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-elevator
|
||||
-pitch coefficient components
|
||||
-icing parameters
|
||||
-cbar_2U multiplier
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -Cm
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_pitch.h"
|
||||
|
||||
|
||||
void uiuc_coef_pitch()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroPitchParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroPitchParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroPitchParts -> getToken(*command_line, 2);
|
||||
|
||||
switch(Cm_map[linetoken2])
|
||||
{
|
||||
case Cmo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cmo = uiuc_ice_filter(Cmo_clean,kCmo);
|
||||
}
|
||||
Cm += Cmo;
|
||||
break;
|
||||
}
|
||||
case Cm_a_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_a = uiuc_ice_filter(Cm_a_clean,kCm_a);
|
||||
}
|
||||
Cm += Cm_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case Cm_a2_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_a2 = uiuc_ice_filter(Cm_a2_clean,kCm_a2);
|
||||
}
|
||||
Cm += Cm_a2 * Alpha * Alpha;
|
||||
break;
|
||||
}
|
||||
case Cm_adot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_adot = uiuc_ice_filter(Cm_adot_clean,kCm_adot);
|
||||
}
|
||||
/* Cm_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cm += Cm_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case Cm_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_q = uiuc_ice_filter(Cm_q_clean,kCm_q);
|
||||
}
|
||||
/* Cm_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cm += Cm_q * Q_body * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case Cm_ih_flag:
|
||||
{
|
||||
Cm += Cm_ih * ih;
|
||||
break;
|
||||
}
|
||||
case Cm_de_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_de = uiuc_ice_filter(Cm_de_clean,kCm_de);
|
||||
}
|
||||
Cm += Cm_de * elevator;
|
||||
break;
|
||||
}
|
||||
case Cm_b2_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_b2 = uiuc_ice_filter(Cm_b2_clean,kCm_b2);
|
||||
}
|
||||
Cm += Cm_b2 * Beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cm_r_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_r = uiuc_ice_filter(Cm_r_clean,kCm_r);
|
||||
}
|
||||
Cm += Cm_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cm_df_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cm_df = uiuc_ice_filter(Cm_df_clean,kCm_df);
|
||||
}
|
||||
Cm += Cm_df * flap;
|
||||
break;
|
||||
}
|
||||
case Cmfa_flag:
|
||||
{
|
||||
CmfaI = uiuc_1Dinterpolation(Cmfa_aArray,
|
||||
Cmfa_CmArray,
|
||||
Cmfa_nAlpha,
|
||||
Alpha);
|
||||
Cm += CmfaI;
|
||||
break;
|
||||
}
|
||||
case Cmfade_flag:
|
||||
{
|
||||
CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
|
||||
Cmfade_deArray,
|
||||
Cmfade_CmArray,
|
||||
Cmfade_nAlphaArray,
|
||||
Cmfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
Cm += CmfadeI;
|
||||
break;
|
||||
}
|
||||
case Cmfdf_flag:
|
||||
{
|
||||
CmfdfI = uiuc_1Dinterpolation(Cmfdf_dfArray,
|
||||
Cmfdf_CmArray,
|
||||
Cmfdf_ndf,
|
||||
flap);
|
||||
Cm += CmfdfI;
|
||||
break;
|
||||
}
|
||||
case Cmfadf_flag:
|
||||
{
|
||||
CmfadfI = uiuc_2Dinterpolation(Cmfadf_aArray,
|
||||
Cmfadf_dfArray,
|
||||
Cmfadf_CmArray,
|
||||
Cmfadf_nAlphaArray,
|
||||
Cmfadf_ndf,
|
||||
Alpha,
|
||||
flap);
|
||||
Cm += CmfadfI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end Cm map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_pitch.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_pitch.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_pitch.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_PITCH_H_
|
||||
#define _COEF_PITCH_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_pitch();
|
||||
|
||||
#endif // _COEF_PITCH_H_
|
190
src/FDM/UIUCModel/uiuc_coef_roll.cpp
Normal file
190
src/FDM/UIUCModel/uiuc_coef_roll.cpp
Normal file
|
@ -0,0 +1,190 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_roll.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic roll coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-aileron
|
||||
-rudder
|
||||
-roll coefficient components
|
||||
-icing parameters
|
||||
-b_2U multiplier
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -Cl
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_roll.h"
|
||||
|
||||
|
||||
void uiuc_coef_roll()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroRollParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroRollParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroRollParts -> getToken(*command_line, 2);
|
||||
|
||||
switch(Cl_map[linetoken2])
|
||||
{
|
||||
case Clo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Clo = uiuc_ice_filter(Clo_clean,kClo);
|
||||
}
|
||||
Cl += Clo;
|
||||
break;
|
||||
}
|
||||
case Cl_beta_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_beta = uiuc_ice_filter(Cl_beta_clean,kCl_beta);
|
||||
}
|
||||
Cl += Cl_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cl_p_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_p = uiuc_ice_filter(Cl_p_clean,kCl_p);
|
||||
}
|
||||
/* Cl_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cl += Cl_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cl_r_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_r = uiuc_ice_filter(Cl_r_clean,kCl_r);
|
||||
}
|
||||
/* Cl_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cl += Cl_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cl_da_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_da = uiuc_ice_filter(Cl_da_clean,kCl_da);
|
||||
}
|
||||
Cl += Cl_da * aileron;
|
||||
break;
|
||||
}
|
||||
case Cl_dr_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_dr = uiuc_ice_filter(Cl_dr_clean,kCl_dr);
|
||||
}
|
||||
Cl += Cl_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case Cl_daa_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cl_daa = uiuc_ice_filter(Cl_daa_clean,kCl_daa);
|
||||
}
|
||||
Cl += Cl_daa * aileron * Alpha;
|
||||
break;
|
||||
}
|
||||
case Clfada_flag:
|
||||
{
|
||||
ClfadaI = uiuc_2Dinterpolation(Clfada_aArray,
|
||||
Clfada_daArray,
|
||||
Clfada_ClArray,
|
||||
Clfada_nAlphaArray,
|
||||
Clfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
Cl += ClfadaI;
|
||||
break;
|
||||
}
|
||||
case Clfbetadr_flag:
|
||||
{
|
||||
ClfbetadrI = uiuc_2Dinterpolation(Clfbetadr_betaArray,
|
||||
Clfbetadr_drArray,
|
||||
Clfbetadr_ClArray,
|
||||
Clfbetadr_nBetaArray,
|
||||
Clfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
Cl += ClfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end Cl map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_roll.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_roll.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_roll.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_ROLL_H_
|
||||
#define _COEF_ROLL_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_roll();
|
||||
|
||||
#endif // _COEF_ROLL_H_
|
199
src/FDM/UIUCModel/uiuc_coef_sideforce.cpp
Normal file
199
src/FDM/UIUCModel/uiuc_coef_sideforce.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_sideforce.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic sideforce coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-aileron
|
||||
-rudder
|
||||
-sideforce coefficient components
|
||||
-icing parameters
|
||||
-b_2U multiplier
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -CY
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_sideforce.h"
|
||||
|
||||
|
||||
void uiuc_coef_sideforce()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroSideforceParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroSideforceParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroSideforceParts -> getToken(*command_line, 2);
|
||||
|
||||
switch(CY_map[linetoken2])
|
||||
{
|
||||
case CYo_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CYo = uiuc_ice_filter(CYo_clean,kCYo);
|
||||
}
|
||||
CY += CYo;
|
||||
break;
|
||||
}
|
||||
case CY_beta_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_beta = uiuc_ice_filter(CY_beta_clean,kCY_beta);
|
||||
}
|
||||
CY += CY_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case CY_p_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_p = uiuc_ice_filter(CY_p_clean,kCY_p);
|
||||
}
|
||||
/* CY_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CY += CY_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case CY_r_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_r = uiuc_ice_filter(CY_r_clean,kCY_r);
|
||||
}
|
||||
/* CY_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CY += CY_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case CY_da_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_da = uiuc_ice_filter(CY_da_clean,kCY_da);
|
||||
}
|
||||
CY += CY_da * aileron;
|
||||
break;
|
||||
}
|
||||
case CY_dr_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_dr = uiuc_ice_filter(CY_dr_clean,kCY_dr);
|
||||
}
|
||||
CY += CY_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case CY_dra_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_dra = uiuc_ice_filter(CY_dra_clean,kCY_dra);
|
||||
}
|
||||
CY += CY_dra * rudder * Alpha;
|
||||
break;
|
||||
}
|
||||
case CY_bdot_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
CY_bdot = uiuc_ice_filter(CY_bdot_clean,kCY_bdot);
|
||||
}
|
||||
CY += CY_bdot * Beta_dot * b_2U;
|
||||
break;
|
||||
}
|
||||
case CYfada_flag:
|
||||
{
|
||||
CYfadaI = uiuc_2Dinterpolation(CYfada_aArray,
|
||||
CYfada_daArray,
|
||||
CYfada_CYArray,
|
||||
CYfada_nAlphaArray,
|
||||
CYfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
CY += CYfadaI;
|
||||
break;
|
||||
}
|
||||
case CYfbetadr_flag:
|
||||
{
|
||||
CYfbetadrI = uiuc_2Dinterpolation(CYfbetadr_betaArray,
|
||||
CYfbetadr_drArray,
|
||||
CYfbetadr_CYArray,
|
||||
CYfbetadr_nBetaArray,
|
||||
CYfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
CY += CYfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end CY map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_sideforce.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_sideforce.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_sideforce.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_SIDEFORCE_H_
|
||||
#define _COEF_SIDEFORCE_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_sideforce();
|
||||
|
||||
#endif // _COEF_SIDEFORCE_H_
|
199
src/FDM/UIUCModel/uiuc_coef_yaw.cpp
Normal file
199
src/FDM/UIUCModel/uiuc_coef_yaw.cpp
Normal file
|
@ -0,0 +1,199 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_coef_yaw.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: computes aggregated aerodynamic yaw coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/15/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-aileron
|
||||
-rudder
|
||||
-yaw coefficient components
|
||||
-icing parameters
|
||||
-b_2U multiplier
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -Cn
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice_filter
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_coef_yaw.h"
|
||||
|
||||
|
||||
void uiuc_coef_yaw()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
|
||||
command_list = aeroYawParts -> getCommands();
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroYawParts -> getToken(*command_line, 1);
|
||||
linetoken2 = aeroYawParts -> getToken(*command_line, 2);
|
||||
|
||||
switch(Cn_map[linetoken2])
|
||||
{
|
||||
case Cno_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cno = uiuc_ice_filter(Cno_clean,kCno);
|
||||
}
|
||||
Cn += Cno;
|
||||
break;
|
||||
}
|
||||
case Cn_beta_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_beta = uiuc_ice_filter(Cn_beta_clean,kCn_beta);
|
||||
}
|
||||
Cn += Cn_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cn_p_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_p = uiuc_ice_filter(Cn_p_clean,kCn_p);
|
||||
}
|
||||
/* Cn_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cn += Cn_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cn_r_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_r = uiuc_ice_filter(Cn_r_clean,kCn_r);
|
||||
}
|
||||
/* Cn_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cn += Cn_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cn_da_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_da = uiuc_ice_filter(Cn_da_clean,kCn_da);
|
||||
}
|
||||
Cn += Cn_da * aileron;
|
||||
break;
|
||||
}
|
||||
case Cn_dr_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_dr = uiuc_ice_filter(Cn_dr_clean,kCn_dr);
|
||||
}
|
||||
Cn += Cn_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case Cn_q_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_q = uiuc_ice_filter(Cn_q_clean,kCn_q);
|
||||
}
|
||||
Cn += Cn_q * Q_body * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case Cn_b3_flag:
|
||||
{
|
||||
if (ice_on)
|
||||
{
|
||||
Cn_b3 = uiuc_ice_filter(Cn_b3_clean,kCn_b3);
|
||||
}
|
||||
Cn += Cn_b3 * Beta * Beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cnfada_flag:
|
||||
{
|
||||
CnfadaI = uiuc_2Dinterpolation(Cnfada_aArray,
|
||||
Cnfada_daArray,
|
||||
Cnfada_CnArray,
|
||||
Cnfada_nAlphaArray,
|
||||
Cnfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
Cn += CnfadaI;
|
||||
break;
|
||||
}
|
||||
case Cnfbetadr_flag:
|
||||
{
|
||||
CnfbetadrI = uiuc_2Dinterpolation(Cnfbetadr_betaArray,
|
||||
Cnfbetadr_drArray,
|
||||
Cnfbetadr_CnArray,
|
||||
Cnfbetadr_nBetaArray,
|
||||
Cnfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
Cn += CnfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
} // end Cn map
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_coef_yaw.cpp
|
14
src/FDM/UIUCModel/uiuc_coef_yaw.h
Normal file
14
src/FDM/UIUCModel/uiuc_coef_yaw.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _COEF_YAW_H_
|
||||
#define _COEF_YAW_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
|
||||
void uiuc_coef_yaw();
|
||||
|
||||
#endif // _COEF_YAW_H_
|
|
@ -12,9 +12,7 @@
|
|||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: Roskam, Jan. Airplane Flight Dynamics and Automatic
|
||||
Flight Controls, Part I. Lawrence, KS: DARcorporation,
|
||||
1995.
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -28,6 +26,8 @@
|
|||
function from CLfade, CDfade, Cmfade,
|
||||
CYfada, CYfbetadr, Clfada, Clfbetadr,
|
||||
Cnfada, and Cnfbetadr switches
|
||||
04/15/2000 (JS) broke up into multiple
|
||||
uiuc_coef_xxx functions
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -40,11 +40,10 @@
|
|||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Alpha
|
||||
-aileron
|
||||
-elevator
|
||||
-rudder
|
||||
-coefficient components
|
||||
INPUTS: -V_rel_wind (or U_body)
|
||||
-dyn_on_speed
|
||||
-ice on/off
|
||||
-phugoid on/off
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -57,13 +56,17 @@
|
|||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: ?
|
||||
CALLED BY: uiuc_wrapper
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: uiuc_1Dinterpolation
|
||||
uiuc_2Dinterpolation
|
||||
uiuc_ice
|
||||
CALLS TO: uiuc_coef_lift
|
||||
uiuc_coef_drag
|
||||
uiuc_coef_pitch
|
||||
uiuc_coef_sideforce
|
||||
uiuc_coef_roll
|
||||
uiuc_coef_yaw
|
||||
uiuc_controlInput
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -88,542 +91,64 @@
|
|||
#include "uiuc_coefficients.h"
|
||||
|
||||
|
||||
/* set speed at which dynamic pressure terms will be accounted for
|
||||
since if velocity is too small, coefficients will go to infinity */
|
||||
|
||||
#define ON_VELOCITY 33 /* 20 kts */
|
||||
|
||||
|
||||
void uiuc_coefficients()
|
||||
{
|
||||
string linetoken1;
|
||||
string linetoken2;
|
||||
stack command_list;
|
||||
double cbar_2U = 0, b_2U = 0;
|
||||
double slope = 0;
|
||||
bool ice_on = false;
|
||||
|
||||
// determine if speed is sufficient to compute dynamic pressure
|
||||
if (U_body > ON_VELOCITY)
|
||||
// calculate rate derivative nondimensionalization factors
|
||||
// check if speed is sufficient to compute dynamic pressure terms
|
||||
if (nondim_rate_V_rel_wind) // c172_aero uses V_rel_wind
|
||||
{
|
||||
cbar_2U = cbar / (2.0 * U_body);
|
||||
b_2U = bw / (2.0 * U_body);
|
||||
if (V_rel_wind > dyn_on_speed)
|
||||
{
|
||||
cbar_2U = cbar / (2.0 * V_rel_wind);
|
||||
b_2U = bw / (2.0 * V_rel_wind);
|
||||
ch_2U = ch / (2.0 * V_rel_wind);
|
||||
}
|
||||
else
|
||||
{
|
||||
cbar_2U = 0.0;
|
||||
b_2U = 0.0;
|
||||
ch_2U = 0.0;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // use U_body which is probably more correct
|
||||
{
|
||||
cbar_2U = 0.0;
|
||||
b_2U = 0.0;
|
||||
if (U_body > dyn_on_speed)
|
||||
{
|
||||
cbar_2U = cbar / (2.0 * U_body);
|
||||
b_2U = bw / (2.0 * U_body);
|
||||
ch_2U = ch / (2.0 * U_body);
|
||||
}
|
||||
else
|
||||
{
|
||||
cbar_2U = 0.0;
|
||||
b_2U = 0.0;
|
||||
ch_2U = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
//check to see if icing model engaged and set flag
|
||||
if (Simtime >= iceTime)
|
||||
// check to see if icing model engaged
|
||||
if (ice_model)
|
||||
{
|
||||
ice_on = true;
|
||||
uiuc_ice_eta();
|
||||
}
|
||||
|
||||
// slowly increase icing severity over period of transientTime
|
||||
if (Simtime >= iceTime && Simtime < (iceTime + transientTime))
|
||||
// check to see if phugoid mode engaged
|
||||
if (elevator_step || elevator_singlet || elevator_doublet || elevator_input)
|
||||
{
|
||||
slope = eta_final / transientTime;
|
||||
eta = slope * (Simtime - iceTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
eta = eta_final;
|
||||
uiuc_controlInput();
|
||||
}
|
||||
|
||||
CL = CD = Cm = CY = Cl = Cn = 0.0;
|
||||
command_list = aeroParts -> getCommands();
|
||||
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
linetoken1 = aeroParts -> getToken(*command_line, 1); // function parameters gettoken(string,tokenNo);
|
||||
linetoken2 = aeroParts -> getToken(*command_line, 2); // 2 represents token No 2
|
||||
CD = CX = CL = CZ = Cm = CY = Cl = Cn = 0.0;
|
||||
CLclean_wing = CLiced_wing = CLclean_tail = CLiced_tail = 0.0;
|
||||
CZclean_wing = CZiced_wing = CZclean_tail = CZiced_tail = 0.0;
|
||||
CXclean_wing = CXiced_wing = CXclean_tail = CXiced_tail = 0.0;
|
||||
|
||||
switch (Keyword_map[linetoken1])
|
||||
{
|
||||
case CD_flag:
|
||||
{
|
||||
switch(CD_map[linetoken2])
|
||||
{
|
||||
case CDo_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CDo = uiuc_ice(CDo_clean,kCDo,eta);
|
||||
}
|
||||
CD += CDo;
|
||||
break;
|
||||
}
|
||||
case CDK_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CDK = uiuc_ice(CDK_clean,kCDK,eta);
|
||||
}
|
||||
CD += CDK * CL * CL;
|
||||
break;
|
||||
}
|
||||
case CD_a_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CD_a = uiuc_ice(CD_a_clean,kCD_a,eta);
|
||||
}
|
||||
CD += CD_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CD_de_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CD_de = uiuc_ice(CD_de_clean,kCD_de,eta);
|
||||
}
|
||||
CD += CD_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CDfa_flag:
|
||||
{
|
||||
CDfaI = uiuc_1Dinterpolation(CDfa_aArray,
|
||||
CDfa_CDArray,
|
||||
CDfa_nAlpha,
|
||||
Alpha);
|
||||
CD += CDfaI;
|
||||
break;
|
||||
}
|
||||
case CDfade_flag:
|
||||
{
|
||||
CDfadeI = uiuc_2Dinterpolation(CDfade_aArray,
|
||||
CDfade_deArray,
|
||||
CDfade_CDArray,
|
||||
CDfade_nAlphaArray,
|
||||
CDfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
CD += CDfadeI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end CD map
|
||||
case CL_flag:
|
||||
{
|
||||
switch(CL_map[linetoken2])
|
||||
{
|
||||
case CLo_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CLo = uiuc_ice(CLo_clean,kCLo,eta);
|
||||
}
|
||||
CL += CLo;
|
||||
break;
|
||||
}
|
||||
case CL_a_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CL_a = uiuc_ice(CL_a_clean,kCL_a,eta);
|
||||
}
|
||||
CL += CL_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case CL_adot_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CL_adot = uiuc_ice(CL_adot_clean,kCL_a,eta);
|
||||
}
|
||||
/* CL_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CL += CL_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CL_q_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CL_q = uiuc_ice(CL_q_clean,kCL_q,eta);
|
||||
}
|
||||
/* CL_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
/* why multiply by Theta_dot instead of Q_body?
|
||||
that is what is done in c172_aero.c; assume it
|
||||
has something to do with axes systems */
|
||||
CL += CL_q * Theta_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case CL_de_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CL_de = uiuc_ice(CL_de_clean,kCL_de,eta);
|
||||
}
|
||||
CL += CL_de * elevator;
|
||||
break;
|
||||
}
|
||||
case CLfa_flag:
|
||||
{
|
||||
CLfaI = uiuc_1Dinterpolation(CLfa_aArray,
|
||||
CLfa_CLArray,
|
||||
CLfa_nAlpha,
|
||||
Alpha);
|
||||
CL += CLfaI;
|
||||
break;
|
||||
}
|
||||
case CLfade_flag:
|
||||
{
|
||||
CLfadeI = uiuc_2Dinterpolation(CLfade_aArray,
|
||||
CLfade_deArray,
|
||||
CLfade_CLArray,
|
||||
CLfade_nAlphaArray,
|
||||
CLfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
CL += CLfadeI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end CL map
|
||||
case Cm_flag:
|
||||
{
|
||||
switch(Cm_map[linetoken2])
|
||||
{
|
||||
case Cmo_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cmo = uiuc_ice(Cmo_clean,kCmo,eta);
|
||||
}
|
||||
Cm += Cmo;
|
||||
break;
|
||||
}
|
||||
case Cm_a_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cm_a = uiuc_ice(Cm_a_clean,kCm_a,eta);
|
||||
}
|
||||
Cm += Cm_a * Alpha;
|
||||
break;
|
||||
}
|
||||
case Cm_adot_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cm_adot = uiuc_ice(Cm_adot_clean,kCm_a,eta);
|
||||
}
|
||||
/* Cm_adot must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cm += Cm_adot * Alpha_dot * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case Cm_q_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cm_q = uiuc_ice(Cm_q_clean,kCm_q,eta);
|
||||
}
|
||||
/* Cm_q must be mulitplied by cbar/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cm += Cm_q * Q_body * cbar_2U;
|
||||
break;
|
||||
}
|
||||
case Cm_de_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cm_de = uiuc_ice(Cm_de_clean,kCm_de,eta);
|
||||
}
|
||||
Cm += Cm_de * elevator;
|
||||
break;
|
||||
}
|
||||
case Cmfade_flag:
|
||||
{
|
||||
CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
|
||||
Cmfade_deArray,
|
||||
Cmfade_CmArray,
|
||||
Cmfade_nAlphaArray,
|
||||
Cmfade_nde,
|
||||
Alpha,
|
||||
elevator);
|
||||
Cm += CmfadeI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end Cm map
|
||||
case CY_flag:
|
||||
{
|
||||
switch(CY_map[linetoken2])
|
||||
{
|
||||
case CYo_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CYo = uiuc_ice(CYo_clean,kCYo,eta);
|
||||
}
|
||||
CY += CYo;
|
||||
break;
|
||||
}
|
||||
case CY_beta_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CY_beta = uiuc_ice(CY_beta_clean,kCY_beta,eta);
|
||||
}
|
||||
CY += CY_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case CY_p_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CY_p = uiuc_ice(CY_p_clean,kCY_p,eta);
|
||||
}
|
||||
/* CY_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CY += CY_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case CY_r_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CY_r = uiuc_ice(CY_r_clean,kCY_r,eta);
|
||||
}
|
||||
/* CY_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
CY += CY_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case CY_da_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CY_da = uiuc_ice(CY_da_clean,kCY_da,eta);
|
||||
}
|
||||
CY += CY_da * aileron;
|
||||
break;
|
||||
}
|
||||
case CY_dr_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
CY_dr = uiuc_ice(CY_dr_clean,kCY_dr,eta);
|
||||
}
|
||||
CY += CY_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case CYfada_flag:
|
||||
{
|
||||
CYfadaI = uiuc_2Dinterpolation(CYfada_aArray,
|
||||
CYfada_daArray,
|
||||
CYfada_CYArray,
|
||||
CYfada_nAlphaArray,
|
||||
CYfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
CY += CYfadaI;
|
||||
break;
|
||||
}
|
||||
case CYfbetadr_flag:
|
||||
{
|
||||
CYfbetadrI = uiuc_2Dinterpolation(CYfbetadr_betaArray,
|
||||
CYfbetadr_drArray,
|
||||
CYfbetadr_CYArray,
|
||||
CYfbetadr_nBetaArray,
|
||||
CYfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
CY += CYfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end CY map
|
||||
case Cl_flag:
|
||||
{
|
||||
switch(Cl_map[linetoken2])
|
||||
{
|
||||
case Clo_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Clo = uiuc_ice(Clo_clean,kClo,eta);
|
||||
}
|
||||
Cl += Clo;
|
||||
break;
|
||||
}
|
||||
case Cl_beta_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cl_beta = uiuc_ice(Cl_beta_clean,kCl_beta,eta);
|
||||
}
|
||||
Cl += Cl_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cl_p_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cl_p = uiuc_ice(Cl_p_clean,kCl_p,eta);
|
||||
}
|
||||
/* Cl_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cl += Cl_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cl_r_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cl_r = uiuc_ice(Cl_r_clean,kCl_r,eta);
|
||||
}
|
||||
/* Cl_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cl += Cl_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cl_da_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cl_da = uiuc_ice(Cl_da_clean,kCl_da,eta);
|
||||
}
|
||||
Cl += Cl_da * aileron;
|
||||
break;
|
||||
}
|
||||
case Cl_dr_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cl_dr = uiuc_ice(Cl_dr_clean,kCl_dr,eta);
|
||||
}
|
||||
Cl += Cl_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case Clfada_flag:
|
||||
{
|
||||
ClfadaI = uiuc_2Dinterpolation(Clfada_aArray,
|
||||
Clfada_daArray,
|
||||
Clfada_ClArray,
|
||||
Clfada_nAlphaArray,
|
||||
Clfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
Cl += ClfadaI;
|
||||
break;
|
||||
}
|
||||
case Clfbetadr_flag:
|
||||
{
|
||||
ClfbetadrI = uiuc_2Dinterpolation(Clfbetadr_betaArray,
|
||||
Clfbetadr_drArray,
|
||||
Clfbetadr_ClArray,
|
||||
Clfbetadr_nBetaArray,
|
||||
Clfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
Cl += ClfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end Cl map
|
||||
case Cn_flag:
|
||||
{
|
||||
switch(Cn_map[linetoken2])
|
||||
{
|
||||
case Cno_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cno = uiuc_ice(Cno_clean,kCno,eta);
|
||||
}
|
||||
Cn += Cno;
|
||||
break;
|
||||
}
|
||||
case Cn_beta_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cn_beta = uiuc_ice(Cn_beta_clean,kCn_beta,eta);
|
||||
}
|
||||
Cn += Cn_beta * Beta;
|
||||
break;
|
||||
}
|
||||
case Cn_p_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cn_p = uiuc_ice(Cn_p_clean,kCn_p,eta);
|
||||
}
|
||||
/* Cn_p must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cn += Cn_p * P_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cn_r_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cn_r = uiuc_ice(Cn_r_clean,kCn_r,eta);
|
||||
}
|
||||
/* Cn_r must be mulitplied by b/2U
|
||||
(see Roskam Control book, Part 1, pg. 147) */
|
||||
Cn += Cn_r * R_body * b_2U;
|
||||
break;
|
||||
}
|
||||
case Cn_da_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cn_da = uiuc_ice(Cn_da_clean,kCn_da,eta);
|
||||
}
|
||||
Cn += Cn_da * aileron;
|
||||
break;
|
||||
}
|
||||
case Cn_dr_flag:
|
||||
{
|
||||
if (ice_on == true)
|
||||
{
|
||||
Cn_dr = uiuc_ice(Cn_dr_clean,kCn_dr,eta);
|
||||
}
|
||||
Cn += Cn_dr * rudder;
|
||||
break;
|
||||
}
|
||||
case Cnfada_flag:
|
||||
{
|
||||
CnfadaI = uiuc_2Dinterpolation(Cnfada_aArray,
|
||||
Cnfada_daArray,
|
||||
Cnfada_CnArray,
|
||||
Cnfada_nAlphaArray,
|
||||
Cnfada_nda,
|
||||
Alpha,
|
||||
aileron);
|
||||
Cn += CnfadaI;
|
||||
break;
|
||||
}
|
||||
case Cnfbetadr_flag:
|
||||
{
|
||||
CnfbetadrI = uiuc_2Dinterpolation(Cnfbetadr_betaArray,
|
||||
Cnfbetadr_drArray,
|
||||
Cnfbetadr_CnArray,
|
||||
Cnfbetadr_nBetaArray,
|
||||
Cnfbetadr_ndr,
|
||||
Beta,
|
||||
rudder);
|
||||
Cn += CnfbetadrI;
|
||||
break;
|
||||
}
|
||||
};
|
||||
break;
|
||||
} // end Cn map
|
||||
};
|
||||
} // end keyword map
|
||||
uiuc_coef_lift();
|
||||
uiuc_coef_drag();
|
||||
uiuc_coef_pitch();
|
||||
uiuc_coef_sideforce();
|
||||
uiuc_coef_roll();
|
||||
uiuc_coef_yaw();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
#ifndef _COEFFICIENTS_H_
|
||||
#define _COEFFICIENTS_H_
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
#include "uiuc_2Dinterpolation.h"
|
||||
#include "uiuc_ice.h"
|
||||
#include "uiuc_controlInput.h"
|
||||
#include "uiuc_coef_drag.h"
|
||||
#include "uiuc_coef_lift.h"
|
||||
#include "uiuc_coef_pitch.h"
|
||||
#include "uiuc_coef_sideforce.h"
|
||||
#include "uiuc_coef_roll.h"
|
||||
#include "uiuc_coef_yaw.h"
|
||||
#include "../LaRCsim/ls_generic.h"
|
||||
|
||||
extern "C" SCALAR Simtime;
|
||||
|
||||
void uiuc_coefficients();
|
||||
|
||||
#endif // _COEFFICIENTS_H_
|
||||
|
|
125
src/FDM/UIUCModel/uiuc_controlInput.cpp
Normal file
125
src/FDM/UIUCModel/uiuc_controlInput.cpp
Normal file
|
@ -0,0 +1,125 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_controlInput.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: sets control surface deflections for specified input
|
||||
modes
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -Simtime
|
||||
-deflection times
|
||||
-deflection angles
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -elevator deflection
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_controlInput.h"
|
||||
#include <iostream.h>
|
||||
|
||||
void uiuc_controlInput()
|
||||
{
|
||||
// elevator step input
|
||||
if (elevator_step)
|
||||
{
|
||||
if (Simtime >= elevator_step_startTime)
|
||||
{
|
||||
elevator = elevator + elevator_step_angle;
|
||||
}
|
||||
}
|
||||
|
||||
// elevator singlet input
|
||||
if (elevator_singlet)
|
||||
{
|
||||
if (Simtime >= elevator_singlet_startTime &&
|
||||
Simtime <= (elevator_singlet_startTime + elevator_singlet_duration))
|
||||
{
|
||||
elevator = elevator + elevator_singlet_angle;
|
||||
}
|
||||
}
|
||||
|
||||
// elevator doublet input
|
||||
if (elevator_doublet)
|
||||
{
|
||||
if (Simtime >= elevator_doublet_startTime &&
|
||||
Simtime <= (elevator_doublet_startTime + elevator_doublet_duration/2))
|
||||
{
|
||||
elevator = elevator + elevator_doublet_angle;
|
||||
}
|
||||
else if (Simtime >= (elevator_doublet_startTime + elevator_doublet_duration/2) &&
|
||||
Simtime <= (elevator_doublet_startTime + elevator_doublet_duration))
|
||||
{
|
||||
elevator = elevator - elevator_doublet_angle;
|
||||
}
|
||||
}
|
||||
|
||||
// elevator input
|
||||
if (elevator_input)
|
||||
{
|
||||
double elevator_input_endTime = elevator_input_timeArray[elevator_input_ntime];
|
||||
if (Simtime >= elevator_input_startTime &&
|
||||
Simtime <= (elevator_input_startTime + elevator_input_endTime))
|
||||
{
|
||||
double time = Simtime - elevator_input_startTime;
|
||||
elevator = elevator +
|
||||
uiuc_1Dinterpolation(elevator_input_timeArray,
|
||||
elevator_input_deArray,
|
||||
elevator_input_ntime,
|
||||
time);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_controlInput.cpp
|
12
src/FDM/UIUCModel/uiuc_controlInput.h
Normal file
12
src/FDM/UIUCModel/uiuc_controlInput.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef _CONTROLINPUT_H_
|
||||
#define _CONTROLINPUT_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_1Dinterpolation.h"
|
||||
|
||||
extern double Simtime;
|
||||
|
||||
|
||||
void uiuc_controlInput();
|
||||
|
||||
#endif // _CONTROLINPUT_H_
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -coversion type
|
||||
INPUTS: -conversion type
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -73,11 +73,13 @@ double uiuc_convert( int conversionType )
|
|||
{
|
||||
case 0:
|
||||
{
|
||||
/* no conversion, multiply by 1 */
|
||||
factor = 1;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
/* convert from degrees to radians */
|
||||
factor = DEG_TO_RAD;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES: based on portions of c172_engine.c, called from ls_model
|
||||
REFERENCES: simple and c172 models based on portions of
|
||||
c172_engine.c, called from ls_model;
|
||||
cherokee model based on cherokee_engine.c
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -77,48 +79,84 @@ void uiuc_engine()
|
|||
string linetoken1;
|
||||
string linetoken2;
|
||||
|
||||
/* [] mss questions: why do this here ... and then undo it later?
|
||||
... does Throttle[3] get modified? */
|
||||
Throttle[3] = Throttle_pct;
|
||||
|
||||
command_list = engineParts -> getCommands();
|
||||
|
||||
|
||||
/*
|
||||
if (command_list.begin() == command_list.end())
|
||||
{
|
||||
cerr << "ERROR: Engine not specified. Aircraft cannot fly without the engine" << endl;
|
||||
exit(-1);
|
||||
}
|
||||
*/
|
||||
|
||||
for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
|
||||
{
|
||||
//cout << *command_line << endl;
|
||||
|
||||
linetoken1 = engineParts -> getToken(*command_line, 1); // function parameters gettoken(string,tokenNo);
|
||||
linetoken2 = engineParts -> getToken(*command_line, 2); // 2 represents token No 2
|
||||
linetoken1 = engineParts -> getToken(*command_line, 1);
|
||||
linetoken2 = engineParts -> getToken(*command_line, 2);
|
||||
|
||||
switch(engine_map[linetoken2])
|
||||
{
|
||||
case simpleSingle_flag:
|
||||
{
|
||||
//c172 engine lines ... looks like 0.83 is just a thrust reduction
|
||||
/* F_X_engine = Throttle[3]*350/0.83; */
|
||||
/* F_Z_engine = Throttle[3]*4.9/0.83; */
|
||||
/* M_m_engine = F_X_engine*0.734*cbar; */
|
||||
F_X_engine = Throttle[3]*simpleSingleMaxThrust;
|
||||
break;
|
||||
}
|
||||
case c172_flag:
|
||||
{
|
||||
F_X_engine = Throttle[3]*350/0.83;
|
||||
F_Z_engine = Throttle[3]*4.9/0.83;
|
||||
M_m_engine = F_X_engine*0.734*cbar;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Throttle_pct = Throttle[3];
|
||||
return;
|
||||
{
|
||||
case simpleSingle_flag:
|
||||
{
|
||||
F_X_engine = Throttle[3] * simpleSingleMaxThrust;
|
||||
break;
|
||||
}
|
||||
case c172_flag:
|
||||
{
|
||||
//c172 engine lines ... looks like 0.83 is just a thrust increase
|
||||
F_X_engine = Throttle[3] * 350 / 0.83;
|
||||
F_Z_engine = Throttle[3] * 4.9 / 0.83;
|
||||
M_m_engine = F_X_engine * 0.734 * cbar;
|
||||
break;
|
||||
}
|
||||
case cherokee_flag:
|
||||
{
|
||||
static float
|
||||
dP = (180.0-117.0)*745.7, // Watts
|
||||
dn = (2700.0-2350.0)/60.0, // d_rpm (I mean d_rps, in seconds)
|
||||
D = 6.17*0.3048, // prop diameter
|
||||
dPh = (58.0-180.0)*745.7, // change of power as function of height
|
||||
dH = 25000.0*0.3048;
|
||||
|
||||
float
|
||||
n, // [rps]
|
||||
H, // altitude [m]
|
||||
J, // advance ratio (ratio of horizontal speed to prop tip speed)
|
||||
T, // thrust [N]
|
||||
V, // velocity [m/s]
|
||||
P, // power [W]
|
||||
eta_engine; // engine efficiency
|
||||
|
||||
/* assumption -> 0.0 <= Throttle[3] <=1.0 */
|
||||
P = fabs(Throttle[3]) * 180.0 * 745.7; /*180.0*745.7 ->max avail power [W]*/
|
||||
n = dn/dP * (P-117.0*745.7) + 2350.0/60.0;
|
||||
|
||||
/* V [m/s] */
|
||||
V = (V_rel_wind < 10.0 ? 10.0 : V_rel_wind*0.3048);
|
||||
J = V / n / D;
|
||||
|
||||
/* Propeller efficiency */
|
||||
eta_engine = (J < 0.7 ? ((0.8-0.55)/(.7-.3)*(J-0.3) + 0.55) :
|
||||
(J > 0.85 ? ((0.6-0.8)/(1.0-0.85)*(J-0.85) + 0.8) : 0.8));
|
||||
|
||||
/* power on Altitude */
|
||||
H = Altitude * 0.3048; /* H == Altitude [m] */
|
||||
P *= (dPh/dH * H + 180.0*745.7) / (180.0*745.7);
|
||||
T = eta_engine * P/V; /* Thrust [N] */
|
||||
|
||||
/*assumption: Engine's line of thrust passes through cg */
|
||||
F_X_engine = T * 0.2248; /* F_X_engine in lb */
|
||||
F_Y_engine = 0.0;
|
||||
F_Z_engine = 0.0;
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// end uiuc_engine.cpp
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
#define _ENGINE_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_warnings_errors.h" /* for cerr, exit() */
|
||||
#include "../LaRCsim/ls_generic.h"
|
||||
#include "../LaRCsim/ls_cockpit.h"
|
||||
|
||||
void uiuc_engine();
|
||||
|
||||
#endif // _ENGINE_H_
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 02/22/2000 initial release
|
||||
04/25/2000 (JS) added uiuc_ice_eta function
|
||||
(removed from uiuc_coefficients)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -27,19 +29,35 @@
|
|||
|
||||
VARIABLES:
|
||||
|
||||
------------------------------------------------string ----------------------
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: -clean aero coefficient
|
||||
INPUTS: uiuc_ice_eta:
|
||||
-Simtime
|
||||
-icing times
|
||||
-final icing severity (eta_ice_final)
|
||||
|
||||
uiuc_ice_filter:
|
||||
-clean aero coefficient
|
||||
-icing parameter for that coefficient (kC)
|
||||
-icing severity (eta)
|
||||
-icing severity (eta_ice)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: -iced aero coefficient
|
||||
OUTPUTS: uiuc_ice_eta:
|
||||
-icing severity (eta_ice)
|
||||
|
||||
uiuc_ice_filter:
|
||||
-iced aero coefficient
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_coefficients.cpp
|
||||
CALLED BY: uiuc_coefficients
|
||||
uiuc_coef_drag
|
||||
uiuc_coef_lift
|
||||
uiuc_coef_pitch
|
||||
uiuc_coef_sideforce
|
||||
uiuc_coef_roll
|
||||
uiuc_coef_yaw
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
|
@ -68,13 +86,37 @@
|
|||
#include "uiuc_ice.h"
|
||||
|
||||
|
||||
double uiuc_ice( double Ca_clean, double kCa, double eta_temp )
|
||||
void uiuc_ice_eta()
|
||||
{
|
||||
double slope = 0;
|
||||
|
||||
if (Simtime >= iceTime)
|
||||
{
|
||||
// set ice_on flag
|
||||
ice_on = true;
|
||||
|
||||
// slowly increase icing severity over period of transientTime
|
||||
if (Simtime < (iceTime + transientTime))
|
||||
{
|
||||
slope = eta_ice_final / transientTime;
|
||||
eta_ice = slope * (Simtime - iceTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
eta_ice = eta_ice_final;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
double uiuc_ice_filter( double Ca_clean, double kCa )
|
||||
{
|
||||
double Ca_iced = 0;
|
||||
|
||||
//cout << "Ice Model Engaged" << endl;
|
||||
|
||||
Ca_iced = Ca_clean * (1 + kCa * eta_temp);
|
||||
Ca_iced = Ca_clean * (1 + kCa * eta_ice);
|
||||
|
||||
return Ca_iced;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
#ifndef _ICE_H_
|
||||
#define _ICE_H_
|
||||
|
||||
double uiuc_ice( double Ca_clean, double kCa, double eta_temp );
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
extern double Simtime;
|
||||
|
||||
|
||||
void uiuc_ice_eta();
|
||||
|
||||
double uiuc_ice_filter( double Ca_clean, double kCa );
|
||||
|
||||
#endif // _ICE_H_
|
||||
|
|
|
@ -1,76 +1,94 @@
|
|||
/**********************************************************************
|
||||
*
|
||||
* FILENAME: uiuc_initializemaps.cpp
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* DESCRIPTION: Initializes the maps for various keywords
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* STATUS: alpha version
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* REFERENCES:
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* HISTORY: 01/26/2000 initial release
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* VARIABLES:
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* INPUTS: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* OUTPUTS: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* CALLED BY: uiuc_wrapper.cpp
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* CALLS TO: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* COPYRIGHT: (C) 2000 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.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
FILENAME: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the maps for various keywords
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 01/26/2000 initial release
|
||||
04/08/2000 broke up into multiple map_xxxx functions
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_wrapper.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_initializemaps.h"
|
||||
|
||||
void uiuc_initializemaps ()
|
||||
|
||||
void uiuc_initializemaps()
|
||||
{
|
||||
uiuc_initializemaps1();
|
||||
uiuc_initializemaps2();
|
||||
uiuc_initializemaps3();
|
||||
uiuc_initializemaps4();
|
||||
uiuc_map_keyword();
|
||||
uiuc_map_init();
|
||||
uiuc_map_geometry();
|
||||
uiuc_map_controlSurface();
|
||||
uiuc_map_mass();
|
||||
uiuc_map_engine();
|
||||
uiuc_map_CD();
|
||||
uiuc_map_CL();
|
||||
uiuc_map_Cm();
|
||||
uiuc_map_CY();
|
||||
uiuc_map_Croll();
|
||||
uiuc_map_Cn();
|
||||
// uiuc_map_gear();
|
||||
uiuc_map_ice();
|
||||
uiuc_map_record1();
|
||||
uiuc_map_record2();
|
||||
uiuc_map_record3();
|
||||
uiuc_map_record4();
|
||||
uiuc_map_record5();
|
||||
uiuc_map_misc();
|
||||
}
|
||||
|
||||
// end uiuc_initializemaps.cpp
|
||||
|
|
|
@ -2,14 +2,26 @@
|
|||
#define _INITIALIZEMAPS_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "uiuc_map_keyword.h"
|
||||
#include "uiuc_map_init.h"
|
||||
#include "uiuc_map_geometry.h"
|
||||
#include "uiuc_map_controlSurface.h"
|
||||
#include "uiuc_map_mass.h"
|
||||
#include "uiuc_map_engine.h"
|
||||
#include "uiuc_map_CD.h"
|
||||
#include "uiuc_map_CL.h"
|
||||
#include "uiuc_map_Cm.h"
|
||||
#include "uiuc_map_CY.h"
|
||||
#include "uiuc_map_Croll.h"
|
||||
#include "uiuc_map_Cn.h"
|
||||
#include "uiuc_map_ice.h"
|
||||
#include "uiuc_map_record1.h"
|
||||
#include "uiuc_map_record2.h"
|
||||
#include "uiuc_map_record3.h"
|
||||
#include "uiuc_map_record4.h"
|
||||
#include "uiuc_map_record5.h"
|
||||
#include "uiuc_map_misc.h"
|
||||
|
||||
void uiuc_initializemaps();
|
||||
|
||||
/* split this routine up into smaller chunks so it can be digested by
|
||||
average machines */
|
||||
void uiuc_initializemaps1();
|
||||
void uiuc_initializemaps2();
|
||||
void uiuc_initializemaps3();
|
||||
void uiuc_initializemaps4();
|
||||
|
||||
#endif // _INITIALIZEMAPS_H_
|
||||
|
|
96
src/FDM/UIUCModel/uiuc_map_CD.cpp
Normal file
96
src/FDM/UIUCModel/uiuc_map_CD.cpp
Normal file
|
@ -0,0 +1,96 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_CD.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the CD map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_CD.h"
|
||||
|
||||
|
||||
void uiuc_map_CD()
|
||||
{
|
||||
CD_map["CDo"] = CDo_flag ;
|
||||
CD_map["CDK"] = CDK_flag ;
|
||||
CD_map["CD_a"] = CD_a_flag ;
|
||||
CD_map["CD_adot"] = CD_adot_flag ;
|
||||
CD_map["CD_q"] = CD_q_flag ;
|
||||
CD_map["CD_ih"] = CD_ih_flag ;
|
||||
CD_map["CD_de"] = CD_de_flag ;
|
||||
CD_map["CDfa"] = CDfa_flag ;
|
||||
CD_map["CDfCL"] = CDfCL_flag ;
|
||||
CD_map["CDfade"] = CDfade_flag ;
|
||||
CD_map["CDfdf"] = CDfdf_flag ;
|
||||
CD_map["CDfadf"] = CDfadf_flag ;
|
||||
CD_map["CXo"] = CXo_flag ;
|
||||
CD_map["CXK"] = CXK_flag ;
|
||||
CD_map["CX_a"] = CX_a_flag ;
|
||||
CD_map["CX_a2"] = CX_a2_flag ;
|
||||
CD_map["CX_a3"] = CX_a3_flag ;
|
||||
CD_map["CX_adot"] = CX_adot_flag ;
|
||||
CD_map["CX_q"] = CX_q_flag ;
|
||||
CD_map["CX_de"] = CX_de_flag ;
|
||||
CD_map["CX_dr"] = CX_dr_flag ;
|
||||
CD_map["CX_df"] = CX_df_flag ;
|
||||
CD_map["CX_adf"] = CX_adf_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_CD.cpp
|
8
src/FDM/UIUCModel/uiuc_map_CD.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_CD.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CD_H_
|
||||
#define _MAP_CD_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_CD();
|
||||
|
||||
#endif // _MAP_CD_H_
|
93
src/FDM/UIUCModel/uiuc_map_CL.cpp
Normal file
93
src/FDM/UIUCModel/uiuc_map_CL.cpp
Normal file
|
@ -0,0 +1,93 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_CL.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the CL map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_CL.h"
|
||||
|
||||
|
||||
void uiuc_map_CL()
|
||||
{
|
||||
CL_map["CLo"] = CLo_flag ;
|
||||
CL_map["CL_a"] = CL_a_flag ;
|
||||
CL_map["CL_adot"] = CL_adot_flag ;
|
||||
CL_map["CL_q"] = CL_q_flag ;
|
||||
CL_map["CL_ih"] = CL_ih_flag ;
|
||||
CL_map["CL_de"] = CL_de_flag ;
|
||||
CL_map["CLfa"] = CLfa_flag ;
|
||||
CL_map["CLfade"] = CLfade_flag ;
|
||||
CL_map["CLfdf"] = CLfdf_flag ;
|
||||
CL_map["CLfadf"] = CLfadf_flag ;
|
||||
CL_map["CZo"] = CZo_flag ;
|
||||
CL_map["CZ_a"] = CZ_a_flag ;
|
||||
CL_map["CZ_a2"] = CZ_a2_flag ;
|
||||
CL_map["CZ_a3"] = CZ_a3_flag ;
|
||||
CL_map["CZ_adot"] = CZ_adot_flag ;
|
||||
CL_map["CZ_q"] = CZ_q_flag ;
|
||||
CL_map["CZ_de"] = CZ_de_flag ;
|
||||
CL_map["CZ_deb2"] = CZ_deb2_flag ;
|
||||
CL_map["CZ_df"] = CZ_df_flag ;
|
||||
CL_map["CZ_adf"] = CZ_adf_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_CL.cpp
|
8
src/FDM/UIUCModel/uiuc_map_CL.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_CL.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CL_H_
|
||||
#define _MAP_CL_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_CL();
|
||||
|
||||
#endif // _MAP_CL_H_
|
83
src/FDM/UIUCModel/uiuc_map_CY.cpp
Normal file
83
src/FDM/UIUCModel/uiuc_map_CY.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_CY.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the CY map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_CY.h"
|
||||
|
||||
|
||||
void uiuc_map_CY()
|
||||
{
|
||||
CY_map["CYo"] = CYo_flag ;
|
||||
CY_map["CY_beta"] = CY_beta_flag ;
|
||||
CY_map["CY_p"] = CY_p_flag ;
|
||||
CY_map["CY_r"] = CY_r_flag ;
|
||||
CY_map["CY_da"] = CY_da_flag ;
|
||||
CY_map["CY_dr"] = CY_dr_flag ;
|
||||
CY_map["CY_dra"] = CY_dra_flag ;
|
||||
CY_map["CY_bdot"] = CY_bdot_flag ;
|
||||
CY_map["CYfada"] = CYfada_flag ;
|
||||
CY_map["CYfbetadr"] = CYfbetadr_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_CY.cpp
|
8
src/FDM/UIUCModel/uiuc_map_CY.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_CY.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CY_H_
|
||||
#define _MAP_CY_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_CY();
|
||||
|
||||
#endif // _MAP_CY_H_
|
87
src/FDM/UIUCModel/uiuc_map_Cm.cpp
Normal file
87
src/FDM/UIUCModel/uiuc_map_Cm.cpp
Normal file
|
@ -0,0 +1,87 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_Cm.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the Cm map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_Cm.h"
|
||||
|
||||
|
||||
void uiuc_map_Cm()
|
||||
{
|
||||
Cm_map["Cmo"] = Cmo_flag ;
|
||||
Cm_map["Cm_a"] = Cm_a_flag ;
|
||||
Cm_map["Cm_a2"] = Cm_a2_flag ;
|
||||
Cm_map["Cm_adot"] = Cm_adot_flag ;
|
||||
Cm_map["Cm_q"] = Cm_q_flag ;
|
||||
Cm_map["Cm_ih"] = Cm_ih_flag ;
|
||||
Cm_map["Cm_de"] = Cm_de_flag ;
|
||||
Cm_map["Cm_b2"] = Cm_b2_flag ;
|
||||
Cm_map["Cm_r"] = Cm_r_flag ;
|
||||
Cm_map["Cm_df"] = Cm_df_flag ;
|
||||
Cm_map["Cmfa"] = Cmfa_flag ;
|
||||
Cm_map["Cmfade"] = Cmfade_flag ;
|
||||
Cm_map["Cmfdf"] = Cmfdf_flag ;
|
||||
Cm_map["Cmfadf"] = Cmfadf_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_Cm.cpp
|
8
src/FDM/UIUCModel/uiuc_map_Cm.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_Cm.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CM_H_
|
||||
#define _MAP_CM_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_Cm();
|
||||
|
||||
#endif // _MAP_CM_H_
|
83
src/FDM/UIUCModel/uiuc_map_Cn.cpp
Normal file
83
src/FDM/UIUCModel/uiuc_map_Cn.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_Cn.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the Cn map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_Cn.h"
|
||||
|
||||
|
||||
void uiuc_map_Cn()
|
||||
{
|
||||
Cn_map["Cno"] = Cno_flag ;
|
||||
Cn_map["Cn_beta"] = Cn_beta_flag ;
|
||||
Cn_map["Cn_p"] = Cn_p_flag ;
|
||||
Cn_map["Cn_r"] = Cn_r_flag ;
|
||||
Cn_map["Cn_da"] = Cn_da_flag ;
|
||||
Cn_map["Cn_dr"] = Cn_dr_flag ;
|
||||
Cn_map["Cn_q"] = Cn_q_flag ;
|
||||
Cn_map["Cn_b3"] = Cn_b3_flag ;
|
||||
Cn_map["Cnfada"] = Cnfada_flag ;
|
||||
Cn_map["Cnfbetadr"] = Cnfbetadr_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_Cn.cpp
|
8
src/FDM/UIUCModel/uiuc_map_Cn.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_Cn.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CN_H_
|
||||
#define _MAP_CN_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_Cn();
|
||||
|
||||
#endif // _MAP_CN_H_
|
82
src/FDM/UIUCModel/uiuc_map_Croll.cpp
Normal file
82
src/FDM/UIUCModel/uiuc_map_Croll.cpp
Normal file
|
@ -0,0 +1,82 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_Croll.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the Cl map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_Croll.h"
|
||||
|
||||
|
||||
void uiuc_map_Croll()
|
||||
{
|
||||
Cl_map["Clo"] = Clo_flag ;
|
||||
Cl_map["Cl_beta"] = Cl_beta_flag ;
|
||||
Cl_map["Cl_p"] = Cl_p_flag ;
|
||||
Cl_map["Cl_r"] = Cl_r_flag ;
|
||||
Cl_map["Cl_da"] = Cl_da_flag ;
|
||||
Cl_map["Cl_dr"] = Cl_dr_flag ;
|
||||
Cl_map["Cl_daa"] = Cl_daa_flag ;
|
||||
Cl_map["Clfada"] = Clfada_flag ;
|
||||
Cl_map["Clfbetadr"] = Clfbetadr_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_Croll.cpp
|
8
src/FDM/UIUCModel/uiuc_map_Croll.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_Croll.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CROLL_H_
|
||||
#define _MAP_CROLL_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_Croll();
|
||||
|
||||
#endif // _MAP_CROLL_H_
|
83
src/FDM/UIUCModel/uiuc_map_controlSurface.cpp
Normal file
83
src/FDM/UIUCModel/uiuc_map_controlSurface.cpp
Normal file
|
@ -0,0 +1,83 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_controlSurface.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the control surface map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_controlSurface.h"
|
||||
|
||||
|
||||
void uiuc_map_controlSurface()
|
||||
{
|
||||
controlSurface_map["de"] = de_flag ;
|
||||
controlSurface_map["da"] = da_flag ;
|
||||
controlSurface_map["dr"] = dr_flag ;
|
||||
controlSurface_map["set_Long_trim"] = set_Long_trim_flag ;
|
||||
controlSurface_map["set_Long_trim_deg"]= set_Long_trim_deg_flag ;
|
||||
controlSurface_map["zero_Long_trim"] = zero_Long_trim_flag ;
|
||||
controlSurface_map["elevator_step"] = elevator_step_flag ;
|
||||
controlSurface_map["elevator_singlet"] = elevator_singlet_flag ;
|
||||
controlSurface_map["elevator_doublet"] = elevator_doublet_flag ;
|
||||
controlSurface_map["elevator_input"] = elevator_input_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_controlSurface.cpp
|
8
src/FDM/UIUCModel/uiuc_map_controlSurface.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_controlSurface.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_CONTROLSURFACE_H_
|
||||
#define _MAP_CONTROLSURFACE_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_controlSurface();
|
||||
|
||||
#endif // _MAP_CONTROLSURFACE_H_
|
76
src/FDM/UIUCModel/uiuc_map_engine.cpp
Normal file
76
src/FDM/UIUCModel/uiuc_map_engine.cpp
Normal file
|
@ -0,0 +1,76 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_engine.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the engine map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_engine.h"
|
||||
|
||||
|
||||
void uiuc_map_engine()
|
||||
{
|
||||
engine_map["simpleSingle"] = simpleSingle_flag ;
|
||||
engine_map["c172"] = c172_flag ;
|
||||
engine_map["cherokee"] = cherokee_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_engine.cpp
|
8
src/FDM/UIUCModel/uiuc_map_engine.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_engine.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_ENGINE_H_
|
||||
#define _MAP_ENGINE_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_engine();
|
||||
|
||||
#endif // _MAP_ENGINE_H_
|
80
src/FDM/UIUCModel/uiuc_map_geometry.cpp
Normal file
80
src/FDM/UIUCModel/uiuc_map_geometry.cpp
Normal file
|
@ -0,0 +1,80 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_geometry.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the geometry map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_geometry.h"
|
||||
|
||||
|
||||
void uiuc_map_geometry()
|
||||
{
|
||||
geometry_map["bw"] = bw_flag ;
|
||||
geometry_map["cbar"] = cbar_flag ;
|
||||
geometry_map["Sw"] = Sw_flag ;
|
||||
geometry_map["ih"] = ih_flag ;
|
||||
geometry_map["bh"] = bh_flag ;
|
||||
geometry_map["ch"] = ch_flag ;
|
||||
geometry_map["Sh"] = Sh_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_geometry.cpp
|
8
src/FDM/UIUCModel/uiuc_map_geometry.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_geometry.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_GEOMETRY_H_
|
||||
#define _MAP_GEOMETRY_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_geometry();
|
||||
|
||||
#endif // _MAP_GEOMETRY_H_
|
142
src/FDM/UIUCModel/uiuc_map_ice.cpp
Normal file
142
src/FDM/UIUCModel/uiuc_map_ice.cpp
Normal file
|
@ -0,0 +1,142 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_ice.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the ice map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_ice.h"
|
||||
|
||||
|
||||
void uiuc_map_ice()
|
||||
{
|
||||
ice_map["iceTime"] = iceTime_flag ;
|
||||
ice_map["transientTime"] = transientTime_flag ;
|
||||
ice_map["eta_ice_final"] = eta_ice_final_flag ;
|
||||
ice_map["kCDo"] = kCDo_flag ;
|
||||
ice_map["kCDK"] = kCDK_flag ;
|
||||
ice_map["kCD_a"] = kCD_a_flag ;
|
||||
ice_map["kCD_adot"] = kCD_adot_flag ;
|
||||
ice_map["kCD_q"] = kCD_q_flag ;
|
||||
ice_map["kCD_de"] = kCD_de_flag ;
|
||||
ice_map["kCXo"] = kCXo_flag ;
|
||||
ice_map["kCXK"] = kCXK_flag ;
|
||||
ice_map["kCX_a"] = kCX_a_flag ;
|
||||
ice_map["kCX_a2"] = kCX_a2_flag ;
|
||||
ice_map["kCX_a3"] = kCX_a3_flag ;
|
||||
ice_map["kCX_adot"] = kCX_adot_flag ;
|
||||
ice_map["kCX_q"] = kCX_q_flag ;
|
||||
ice_map["kCX_de"] = kCX_de_flag ;
|
||||
ice_map["kCX_dr"] = kCX_dr_flag ;
|
||||
ice_map["kCX_df"] = kCX_df_flag ;
|
||||
ice_map["kCX_adf"] = kCX_adf_flag ;
|
||||
ice_map["kCLo"] = kCLo_flag ;
|
||||
ice_map["kCL_a"] = kCL_a_flag ;
|
||||
ice_map["kCL_adot"] = kCL_adot_flag ;
|
||||
ice_map["kCL_q"] = kCL_q_flag ;
|
||||
ice_map["kCL_de"] = kCL_de_flag ;
|
||||
ice_map["kCZo"] = kCZo_flag ;
|
||||
ice_map["kCZ_a"] = kCZ_a_flag ;
|
||||
ice_map["kCZ_a2"] = kCZ_a2_flag ;
|
||||
ice_map["kCZ_a3"] = kCZ_a3_flag ;
|
||||
ice_map["kCZ_adot"] = kCZ_adot_flag ;
|
||||
ice_map["kCZ_q"] = kCZ_q_flag ;
|
||||
ice_map["kCZ_de"] = kCZ_de_flag ;
|
||||
ice_map["kCZ_deb2"] = kCZ_deb2_flag ;
|
||||
ice_map["kCZ_df"] = kCZ_df_flag ;
|
||||
ice_map["kCZ_adf"] = kCZ_adf_flag ;
|
||||
ice_map["kCmo"] = kCmo_flag ;
|
||||
ice_map["kCm_a"] = kCm_a_flag ;
|
||||
ice_map["kCm_a2"] = kCm_a2_flag ;
|
||||
ice_map["kCm_adot"] = kCm_adot_flag ;
|
||||
ice_map["kCm_q"] = kCm_q_flag ;
|
||||
ice_map["kCm_de"] = kCm_de_flag ;
|
||||
ice_map["kCm_b2"] = kCm_b2_flag ;
|
||||
ice_map["kCm_r"] = kCm_r_flag ;
|
||||
ice_map["kCm_df"] = kCm_df_flag ;
|
||||
ice_map["kCYo"] = kCYo_flag ;
|
||||
ice_map["kCY_beta"] = kCY_beta_flag ;
|
||||
ice_map["kCY_p"] = kCY_p_flag ;
|
||||
ice_map["kCY_r"] = kCY_r_flag ;
|
||||
ice_map["kCY_da"] = kCY_da_flag ;
|
||||
ice_map["kCY_dr"] = kCY_dr_flag ;
|
||||
ice_map["kCY_dra"] = kCY_dra_flag ;
|
||||
ice_map["kCY_bdot"] = kCY_bdot_flag ;
|
||||
ice_map["kClo"] = kClo_flag ;
|
||||
ice_map["kCl_beta"] = kCl_beta_flag ;
|
||||
ice_map["kCl_p"] = kCl_p_flag ;
|
||||
ice_map["kCl_r"] = kCl_r_flag ;
|
||||
ice_map["kCl_da"] = kCl_da_flag ;
|
||||
ice_map["kCl_dr"] = kCl_dr_flag ;
|
||||
ice_map["kCl_daa"] = kCl_daa_flag ;
|
||||
ice_map["kCno"] = kCno_flag ;
|
||||
ice_map["kCn_beta"] = kCn_beta_flag ;
|
||||
ice_map["kCn_p"] = kCn_p_flag ;
|
||||
ice_map["kCn_r"] = kCn_r_flag ;
|
||||
ice_map["kCn_da"] = kCn_da_flag ;
|
||||
ice_map["kCn_dr"] = kCn_dr_flag ;
|
||||
ice_map["kCn_q"] = kCn_q_flag ;
|
||||
ice_map["kCn_b3"] = kCn_b3_flag ;
|
||||
ice_map["beta_probe_wing"] = beta_probe_wing_flag ;
|
||||
ice_map["beta_probe_tail"] = beta_probe_tail_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_ice.cpp
|
8
src/FDM/UIUCModel/uiuc_map_ice.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_ice.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_ICE_H_
|
||||
#define _MAP_ICE_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_ice();
|
||||
|
||||
#endif // _MAP_ICE_H_
|
94
src/FDM/UIUCModel/uiuc_map_init.cpp
Normal file
94
src/FDM/UIUCModel/uiuc_map_init.cpp
Normal file
|
@ -0,0 +1,94 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_init.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the init map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_init.h"
|
||||
|
||||
|
||||
void uiuc_map_init()
|
||||
{
|
||||
init_map["Dx_pilot"] = Dx_pilot_flag ;
|
||||
init_map["Dy_pilot"] = Dy_pilot_flag ;
|
||||
init_map["Dz_pilot"] = Dz_pilot_flag ;
|
||||
init_map["Dx_cg"] = Dx_cg_flag ;
|
||||
init_map["Dy_cg"] = Dy_cg_flag ;
|
||||
init_map["Dz_cg"] = Dz_cg_flag ;
|
||||
init_map["Altitude"] = Altitude_flag ;
|
||||
init_map["V_north"] = V_north_flag ;
|
||||
init_map["V_east"] = V_east_flag ;
|
||||
init_map["V_down"] = V_down_flag ;
|
||||
init_map["P_body"] = P_body_flag ;
|
||||
init_map["Q_body"] = Q_body_flag ;
|
||||
init_map["R_body"] = R_body_flag ;
|
||||
init_map["Phi"] = Phi_flag ;
|
||||
init_map["Theta"] = Theta_flag ;
|
||||
init_map["Psi"] = Psi_flag ;
|
||||
init_map["Long_trim"] = Long_trim_flag ;
|
||||
init_map["recordRate"] = recordRate_flag ;
|
||||
init_map["recordStartTime"] = recordStartTime_flag ;
|
||||
init_map["nondim_rate_V_rel_wind"]= nondim_rate_V_rel_wind_flag;
|
||||
init_map["dyn_on_speed"] = dyn_on_speed_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_init.cpp
|
8
src/FDM/UIUCModel/uiuc_map_init.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_init.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_INIT_H_
|
||||
#define _MAP_INIT_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_init();
|
||||
|
||||
#endif // _MAP_INIT_H_
|
88
src/FDM/UIUCModel/uiuc_map_keyword.cpp
Normal file
88
src/FDM/UIUCModel/uiuc_map_keyword.cpp
Normal file
|
@ -0,0 +1,88 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_keyword.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the main keyword map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_keyword.h"
|
||||
|
||||
|
||||
void uiuc_map_keyword()
|
||||
{
|
||||
Keyword_map["init"] = init_flag ;
|
||||
Keyword_map["geometry"] = geometry_flag ;
|
||||
Keyword_map["controlSurface"] = controlSurface_flag ;
|
||||
Keyword_map["mass"] = mass_flag ;
|
||||
Keyword_map["engine"] = engine_flag ;
|
||||
Keyword_map["CD"] = CD_flag ;
|
||||
Keyword_map["CL"] = CL_flag ;
|
||||
Keyword_map["Cm"] = Cm_flag ;
|
||||
Keyword_map["CY"] = CY_flag ;
|
||||
Keyword_map["Cl"] = Cl_flag ;
|
||||
Keyword_map["Cn"] = Cn_flag ;
|
||||
Keyword_map["gear"] = gear_flag ;
|
||||
Keyword_map["ice"] = ice_flag ;
|
||||
Keyword_map["record"] = record_flag ;
|
||||
Keyword_map["misc"] = misc_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_keyword.cpp
|
8
src/FDM/UIUCModel/uiuc_map_keyword.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_keyword.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_KEYWORD_H_
|
||||
#define _MAP_KEYWORD_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_keyword();
|
||||
|
||||
#endif // _MAP_KEYWORD_H_
|
79
src/FDM/UIUCModel/uiuc_map_mass.cpp
Normal file
79
src/FDM/UIUCModel/uiuc_map_mass.cpp
Normal file
|
@ -0,0 +1,79 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_mass.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the mass map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_mass.h"
|
||||
|
||||
|
||||
void uiuc_map_mass()
|
||||
{
|
||||
mass_map["Weight"] = Weight_flag ;
|
||||
mass_map["Mass"] = Mass_flag ;
|
||||
mass_map["I_xx"] = I_xx_flag ;
|
||||
mass_map["I_yy"] = I_yy_flag ;
|
||||
mass_map["I_zz"] = I_zz_flag ;
|
||||
mass_map["I_xz"] = I_xz_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_mass.cpp
|
8
src/FDM/UIUCModel/uiuc_map_mass.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_mass.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_MASS_H_
|
||||
#define _MAP_MASS_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_mass();
|
||||
|
||||
#endif // _MAP_MASS_H_
|
75
src/FDM/UIUCModel/uiuc_map_misc.cpp
Normal file
75
src/FDM/UIUCModel/uiuc_map_misc.cpp
Normal file
|
@ -0,0 +1,75 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_misc.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the misc map
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 04/08/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_misc.h"
|
||||
|
||||
|
||||
void uiuc_map_misc()
|
||||
{
|
||||
misc_map["simpleHingeMomentCoef"] = simpleHingeMomentCoef_flag ;
|
||||
misc_map["dfTimefdf"] = dfTimefdf_flag ;
|
||||
}
|
||||
|
||||
// end uiuc_map_misc.cpp
|
8
src/FDM/UIUCModel/uiuc_map_misc.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_misc.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_MISC_H_
|
||||
#define _MAP_MISC_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_misc();
|
||||
|
||||
#endif // _MAP_MISC_H_
|
152
src/FDM/UIUCModel/uiuc_map_record1.cpp
Normal file
152
src/FDM/UIUCModel/uiuc_map_record1.cpp
Normal file
|
@ -0,0 +1,152 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_record1.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the record maps for time, mass, geometry,
|
||||
positions, and accelerations
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 06/03/2000 file creation
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_record1.h"
|
||||
|
||||
|
||||
void uiuc_map_record1()
|
||||
{
|
||||
/************************* Time ************************/
|
||||
record_map["Simtime"] = Simtime_record ;
|
||||
record_map["dt"] = dt_record ;
|
||||
|
||||
|
||||
/************************* Mass ************************/
|
||||
record_map["Weight"] = Weight_record ;
|
||||
record_map["Mass"] = Mass_record ;
|
||||
record_map["I_xx"] = I_xx_record ;
|
||||
record_map["I_yy"] = I_yy_record ;
|
||||
record_map["I_zz"] = I_zz_record ;
|
||||
record_map["I_xz"] = I_xz_record ;
|
||||
|
||||
|
||||
/*********************** Geometry **********************/
|
||||
// pilot reference locations
|
||||
record_map["Dx_pilot"] = Dx_pilot_record ;
|
||||
record_map["Dy_pilot"] = Dy_pilot_record ;
|
||||
record_map["Dz_pilot"] = Dz_pilot_record ;
|
||||
|
||||
// cg reference locations
|
||||
record_map["Dx_cg"] = Dx_cg_record ;
|
||||
record_map["Dy_cg"] = Dy_cg_record ;
|
||||
record_map["Dz_cg"] = Dz_cg_record ;
|
||||
|
||||
|
||||
/********************** Positions **********************/
|
||||
// geocentric positions
|
||||
record_map["Lat_geocentric"] = Lat_geocentric_record ;
|
||||
record_map["Lon_geocentric"] = Lon_geocentric_record ;
|
||||
record_map["Radius_to_vehicle"] = Radius_to_vehicle_record ;
|
||||
|
||||
// geodetic positions
|
||||
record_map["Latitude"] = Latitude_record ;
|
||||
record_map["Longitude"] = Longitude_record ;
|
||||
record_map["Altitude"] = Altitude_record ;
|
||||
|
||||
// Euler angles
|
||||
record_map["Phi"] = Phi_record ;
|
||||
record_map["Theta"] = Theta_record ;
|
||||
record_map["Psi"] = Psi_record ;
|
||||
|
||||
|
||||
/******************** Accelerations ********************/
|
||||
// accelerations in local axes
|
||||
record_map["V_dot_north"] = V_dot_north_record ;
|
||||
record_map["V_dot_east"] = V_dot_east_record ;
|
||||
record_map["V_dot_down"] = V_dot_down_record ;
|
||||
|
||||
// accelerations in body axes
|
||||
record_map["U_dot_body"] = U_dot_body_record ;
|
||||
record_map["V_dot_body"] = V_dot_body_record ;
|
||||
record_map["W_dot_body"] = W_dot_body_record ;
|
||||
|
||||
// acceleration of pilot
|
||||
record_map["A_X_pilot"] = A_X_pilot_record ;
|
||||
record_map["A_Y_pilot"] = A_Y_pilot_record ;
|
||||
record_map["A_Z_pilot"] = A_Z_pilot_record ;
|
||||
|
||||
// acceleration of cg
|
||||
record_map["A_X_cg"] = A_X_cg_record ;
|
||||
record_map["A_Y_cg"] = A_Y_cg_record ;
|
||||
record_map["A_Z_cg"] = A_Z_cg_record ;
|
||||
|
||||
// acceleration of pilot
|
||||
record_map["N_X_pilot"] = N_X_pilot_record ;
|
||||
record_map["N_Y_pilot"] = N_Y_pilot_record ;
|
||||
record_map["N_Z_pilot"] = N_Z_pilot_record ;
|
||||
|
||||
// acceleration of cg
|
||||
record_map["N_X_cg"] = N_X_cg_record ;
|
||||
record_map["N_Y_cg"] = N_Y_cg_record ;
|
||||
record_map["N_Z_cg"] = N_Z_cg_record ;
|
||||
|
||||
// moment acceleration rates
|
||||
record_map["P_dot_body"] = P_dot_body_record ;
|
||||
record_map["Q_dot_body"] = Q_dot_body_record ;
|
||||
record_map["R_dot_body"] = R_dot_body_record ;
|
||||
}
|
||||
|
||||
// end uiuc_map_record1.cpp
|
8
src/FDM/UIUCModel/uiuc_map_record1.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_record1.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_RECORD1_H_
|
||||
#define _MAP_RECORD1_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_record1();
|
||||
|
||||
#endif // _MAP_RECORD1_H_
|
154
src/FDM/UIUCModel/uiuc_map_record2.cpp
Normal file
154
src/FDM/UIUCModel/uiuc_map_record2.cpp
Normal file
|
@ -0,0 +1,154 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_record2.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the record maps for velocities and angles
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 06/03/2000 file creation
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_record2.h"
|
||||
|
||||
|
||||
void uiuc_map_record2()
|
||||
{
|
||||
/********************** Velocities *********************/
|
||||
// local velocities
|
||||
record_map["V_north"] = V_north_record ;
|
||||
record_map["V_east"] = V_east_record ;
|
||||
record_map["V_down"] = V_down_record ;
|
||||
|
||||
// local velocities wrt ground
|
||||
record_map["V_north_rel_ground"] = V_north_rel_ground_record ;
|
||||
record_map["V_east_rel_ground"] = V_east_rel_ground_record ;
|
||||
record_map["V_down_rel_ground"] = V_down_rel_ground_record ;
|
||||
|
||||
// steady airmass velocities
|
||||
record_map["V_north_airmass"] = V_north_airmass_record ;
|
||||
record_map["V_east_airmass"] = V_east_airmass_record ;
|
||||
record_map["V_down_airmass"] = V_down_airmass_record ;
|
||||
|
||||
// local velocities wrt steady airmass
|
||||
record_map["V_north_rel_airmass"] = V_north_rel_airmass_record ;
|
||||
record_map["V_east_rel_airmass"] = V_east_rel_airmass_record ;
|
||||
record_map["V_down_rel_airmass"] = V_down_rel_airmass_record ;
|
||||
|
||||
// local linear turbulence velocities
|
||||
record_map["U_gust"] = U_gust_record ;
|
||||
record_map["V_gust"] = V_gust_record ;
|
||||
record_map["W_gust"] = W_gust_record ;
|
||||
|
||||
// wind velocities in body axis
|
||||
record_map["U_body"] = U_body_record ;
|
||||
record_map["V_body"] = V_body_record ;
|
||||
record_map["W_body"] = W_body_record ;
|
||||
|
||||
// other velocities
|
||||
record_map["V_rel_wind"] = V_rel_wind_record ;
|
||||
record_map["V_true_kts"] = V_true_kts_record ;
|
||||
record_map["V_rel_ground"] = V_rel_ground_record ;
|
||||
record_map["V_inertial"] = V_inertial_record ;
|
||||
record_map["V_ground_speed"] = V_ground_speed_record ;
|
||||
record_map["V_equiv"] = V_equiv_record ;
|
||||
record_map["V_equiv_kts"] = V_equiv_kts_record ;
|
||||
record_map["V_calibrated"] = V_calibrated_record ;
|
||||
record_map["V_calibrated_kts"] = V_calibrated_kts_record ;
|
||||
|
||||
// angular rates in local axis
|
||||
record_map["P_local"] = P_local_record ;
|
||||
record_map["Q_local"] = Q_local_record ;
|
||||
record_map["R_local"] = R_local_record ;
|
||||
|
||||
// angular rates in body axis
|
||||
record_map["P_body"] = P_body_record ;
|
||||
record_map["Q_body"] = Q_body_record ;
|
||||
record_map["R_body"] = R_body_record ;
|
||||
|
||||
// difference between local and body angular rates
|
||||
record_map["P_total"] = P_total_record ;
|
||||
record_map["Q_total"] = Q_total_record ;
|
||||
record_map["R_total"] = R_total_record ;
|
||||
|
||||
// Euler rates
|
||||
record_map["Phi_dot"] = Phi_dot_record ;
|
||||
record_map["Theta_dot"] = Theta_dot_record ;
|
||||
record_map["Psi_dot"] = Psi_dot_record ;
|
||||
|
||||
// Geocentric rates
|
||||
record_map["Latitude_dot"] = Latitude_dot_record ;
|
||||
record_map["Longitude_dot"] = Longitude_dot_record ;
|
||||
record_map["Radius_dot"] = Radius_dot_record ;
|
||||
|
||||
|
||||
/************************ Angles ***********************/
|
||||
record_map["Alpha"] = Alpha_record ;
|
||||
record_map["Alpha_deg"] = Alpha_deg_record ;
|
||||
record_map["Alpha_dot"] = Alpha_dot_record ;
|
||||
record_map["Alpha_dot_deg"] = Alpha_dot_deg_record ;
|
||||
record_map["Beta"] = Beta_record ;
|
||||
record_map["Beta_deg"] = Beta_deg_record ;
|
||||
record_map["Beta_dot"] = Beta_dot_record ;
|
||||
record_map["Beta_dot_deg"] = Beta_dot_deg_record ;
|
||||
record_map["Gamma_vert"] = Gamma_vert_record ;
|
||||
record_map["Gamma_vert_deg"] = Gamma_vert_deg_record ;
|
||||
record_map["Gamma_horiz"] = Gamma_horiz_record ;
|
||||
record_map["Gamma_horiz_deg"] = Gamma_horiz_deg_record ;
|
||||
}
|
||||
|
||||
// end uiuc_map_record2.cpp
|
8
src/FDM/UIUCModel/uiuc_map_record2.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_record2.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_RECORD2_H_
|
||||
#define _MAP_RECORD2_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_record2();
|
||||
|
||||
#endif // _MAP_RECORD2_H_
|
143
src/FDM/UIUCModel/uiuc_map_record3.cpp
Normal file
143
src/FDM/UIUCModel/uiuc_map_record3.cpp
Normal file
|
@ -0,0 +1,143 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_record3.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the record maps for atmospheric properties,
|
||||
Earth properties, engine inputs, and control inputs
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 06/03/2000 file creation
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_record3.h"
|
||||
|
||||
|
||||
void uiuc_map_record3()
|
||||
{
|
||||
/**************** Atmospheric Properties ***************/
|
||||
record_map["Density"] = Density_record ;
|
||||
record_map["V_sound"] = V_sound_record ;
|
||||
record_map["Mach_number"] = Mach_number_record ;
|
||||
|
||||
// pressures
|
||||
record_map["Static_pressure"] = Static_pressure_record ;
|
||||
record_map["Total_pressure"] = Total_pressure_record ;
|
||||
record_map["Impact_pressure"] = Impact_pressure_record ;
|
||||
record_map["Dynamic_pressure"] = Dynamic_pressure_record ;
|
||||
|
||||
// temperatures
|
||||
record_map["Static_temperature"]= Static_temperature_record ;
|
||||
record_map["Total_temperature"] = Total_temperature_record ;
|
||||
|
||||
|
||||
/******************** Earth Properties *****************/
|
||||
record_map["Gravity"] = Gravity_record ;
|
||||
record_map["Sea_level_radius"] = Sea_level_radius_record ;
|
||||
record_map["Earth_position_angle"]= Earth_position_angle_record;
|
||||
|
||||
// runway positions
|
||||
record_map["Runway_altitude"] = Runway_altitude_record ;
|
||||
record_map["Runway_latitude"] = Runway_latitude_record ;
|
||||
record_map["Runway_longitude"] = Runway_longitude_record ;
|
||||
record_map["Runway_heading"] = Runway_heading_record ;
|
||||
record_map["Radius_to_rwy"] = Radius_to_rwy_record ;
|
||||
|
||||
// pilot relative to runway in local axis
|
||||
record_map["D_pilot_north_of_rwy"]= D_pilot_north_of_rwy_record;
|
||||
record_map["D_pilot_east_of_rwy"] = D_pilot_east_of_rwy_record ;
|
||||
record_map["D_pilot_above_rwy"] = D_pilot_above_rwy_record ;
|
||||
|
||||
// pilot relative to runway in runway axis
|
||||
record_map["X_pilot_rwy"] = X_pilot_rwy_record ;
|
||||
record_map["Y_pilot_rwy"] = Y_pilot_rwy_record ;
|
||||
record_map["H_pilot_rwy"] = H_pilot_rwy_record ;
|
||||
|
||||
// cg relative to runway in local axis
|
||||
record_map["D_cg_north_of_rwy"] = D_cg_north_of_rwy_record ;
|
||||
record_map["D_cg_east_of_rwy"] = D_cg_east_of_rwy_record ;
|
||||
record_map["D_cg_above_rwy"] = D_cg_above_rwy_record ;
|
||||
|
||||
// cg relative to runway in runway axis
|
||||
record_map["X_cg_rwy"] = X_cg_rwy_record ;
|
||||
record_map["Y_cg_rwy"] = Y_cg_rwy_record ;
|
||||
record_map["H_cg_rwy"] = H_cg_rwy_record ;
|
||||
|
||||
|
||||
/********************* Engine Inputs *******************/
|
||||
record_map["Throttle_3"] = Throttle_3_record ;
|
||||
record_map["Throttle_pct"] = Throttle_pct_record ;
|
||||
|
||||
|
||||
/******************** Control Inputs *******************/
|
||||
record_map["Long_control"] = Long_control_record ;
|
||||
record_map["Long_trim"] = Long_trim_record ;
|
||||
record_map["Long_trim_deg"] = Long_trim_deg_record ;
|
||||
record_map["elevator"] = elevator_record ;
|
||||
record_map["elevator_deg"] = elevator_deg_record ;
|
||||
record_map["Lat_control"] = Lat_control_record ;
|
||||
record_map["aileron"] = aileron_record ;
|
||||
record_map["aileron_deg"] = aileron_deg_record ;
|
||||
record_map["Rudder_pedal"] = Rudder_pedal_record ;
|
||||
record_map["rudder"] = rudder_record ;
|
||||
record_map["rudder_deg"] = rudder_deg_record ;
|
||||
record_map["Flap_handle"] = Flap_handle_record ;
|
||||
record_map["flap"] = flap_record ;
|
||||
record_map["flap_deg" ] = flap_deg_record ;
|
||||
}
|
||||
|
||||
// end uiuc_map_record3.cpp
|
8
src/FDM/UIUCModel/uiuc_map_record3.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_record3.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_RECORD3_H_
|
||||
#define _MAP_RECORD3_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_record3();
|
||||
|
||||
#endif // _MAP_RECORD3_H_
|
139
src/FDM/UIUCModel/uiuc_map_record4.cpp
Normal file
139
src/FDM/UIUCModel/uiuc_map_record4.cpp
Normal file
|
@ -0,0 +1,139 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_record4.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the record maps for aerodynamic
|
||||
coefficients and ice detection parameters
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 06/03/2000 file creation
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_record4.h"
|
||||
|
||||
|
||||
void uiuc_map_record4()
|
||||
{
|
||||
/****************** Aero Coefficients ******************/
|
||||
record_map["CD"] = CD_record ;
|
||||
record_map["CDfaI"] = CDfaI_record ;
|
||||
record_map["CDfCLI"] = CDfCLI_record ;
|
||||
record_map["CDfadeI"] = CDfadeI_record ;
|
||||
record_map["CDfdfI"] = CDfdfI_record ;
|
||||
record_map["CDfadfI"] = CDfadfI_record ;
|
||||
record_map["CX"] = CX_record ;
|
||||
record_map["CL"] = CL_record ;
|
||||
record_map["CLfaI"] = CLfaI_record ;
|
||||
record_map["CLfadeI"] = CLfadeI_record ;
|
||||
record_map["CLfdfI"] = CLfdfI_record ;
|
||||
record_map["CLfadfI"] = CLfadfI_record ;
|
||||
record_map["CZ"] = CZ_record ;
|
||||
record_map["Cm"] = Cm_record ;
|
||||
record_map["CmfaI"] = CmfaI_record ;
|
||||
record_map["CmfadeI"] = CmfadeI_record ;
|
||||
record_map["CmfdfI"] = CmfdfI_record ;
|
||||
record_map["CmfadfI"] = CmfadfI_record ;
|
||||
record_map["CY"] = CY_record ;
|
||||
record_map["CYfadaI"] = CYfadaI_record ;
|
||||
record_map["CYfbetadrI"] = CYfbetadrI_record ;
|
||||
record_map["Cl"] = Cl_record ;
|
||||
record_map["ClfadaI"] = ClfadaI_record ;
|
||||
record_map["ClfbetadrI"] = ClfbetadrI_record ;
|
||||
record_map["Cn"] = Cn_record ;
|
||||
record_map["CnfadaI"] = CnfadaI_record ;
|
||||
record_map["CnfbetadrI"] = CnfbetadrI_record ;
|
||||
|
||||
|
||||
/******************** Ice Detection ********************/
|
||||
record_map["CLclean_wing"] = CLclean_wing_record ;
|
||||
record_map["CLiced_wing"] = CLiced_wing_record ;
|
||||
record_map["CLclean_tail"] = CLclean_tail_record ;
|
||||
record_map["CLiced_tail"] = CLiced_tail_record ;
|
||||
record_map["Lift_clean_wing"] = Lift_clean_wing_record ;
|
||||
record_map["Lift_iced_wing"] = Lift_iced_wing_record ;
|
||||
record_map["Lift_clean_tail"] = Lift_clean_tail_record ;
|
||||
record_map["Lift_iced_tail"] = Lift_iced_tail_record ;
|
||||
record_map["Gamma_clean_wing"] = Gamma_clean_wing_record ;
|
||||
record_map["Gamma_iced_wing"] = Gamma_iced_wing_record ;
|
||||
record_map["Gamma_clean_tail"] = Gamma_clean_tail_record ;
|
||||
record_map["Gamma_iced_tail"] = Gamma_iced_tail_record ;
|
||||
record_map["w_clean_wing"] = w_clean_wing_record ;
|
||||
record_map["w_iced_wing"] = w_iced_wing_record ;
|
||||
record_map["w_clean_tail"] = w_clean_tail_record ;
|
||||
record_map["w_iced_tail"] = w_iced_tail_record ;
|
||||
record_map["V_total_clean_wing"] = V_total_clean_wing_record ;
|
||||
record_map["V_total_iced_wing"] = V_total_iced_wing_record ;
|
||||
record_map["V_total_clean_tail"] = V_total_clean_tail_record ;
|
||||
record_map["V_total_iced_tail"] = V_total_iced_tail_record ;
|
||||
record_map["beta_flow_clean_wing"] = beta_flow_clean_wing_record ;
|
||||
record_map["beta_flow_clean_wing_deg"]= beta_flow_clean_wing_deg_record;
|
||||
record_map["beta_flow_iced_wing"] = beta_flow_iced_wing_record ;
|
||||
record_map["beta_flow_iced_wing_deg"] = beta_flow_iced_wing_deg_record ;
|
||||
record_map["beta_flow_clean_tail"] = beta_flow_clean_tail_record ;
|
||||
record_map["beta_flow_clean_tail_deg"]= beta_flow_clean_tail_deg_record;
|
||||
record_map["beta_flow_iced_tail"] = beta_flow_iced_tail_record ;
|
||||
record_map["beta_flow_iced_tail_deg"] = beta_flow_iced_tail_deg_record ;
|
||||
record_map["Dbeta_flow_wing"] = Dbeta_flow_wing_record ;
|
||||
record_map["Dbeta_flow_wing_deg"] = Dbeta_flow_wing_deg_record ;
|
||||
record_map["Dbeta_flow_tail"] = Dbeta_flow_tail_record ;
|
||||
record_map["Dbeta_flow_tail_deg"] = Dbeta_flow_tail_deg_record ;
|
||||
record_map["pct_beta_flow_wing"] = pct_beta_flow_wing_record ;
|
||||
record_map["pct_beta_flow_tail"] = pct_beta_flow_tail_record ;
|
||||
}
|
||||
|
||||
// end uiuc_map_record4.cpp
|
8
src/FDM/UIUCModel/uiuc_map_record4.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_record4.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_RECORD4_H_
|
||||
#define _MAP_RECORD4_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_record4();
|
||||
|
||||
#endif // _MAP_RECORD4_H_
|
125
src/FDM/UIUCModel/uiuc_map_record5.cpp
Normal file
125
src/FDM/UIUCModel/uiuc_map_record5.cpp
Normal file
|
@ -0,0 +1,125 @@
|
|||
/**********************************************************************
|
||||
|
||||
FILENAME: uiuc_map_record5.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: initializes the record maps for forces and moments
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 06/03/2000 file creation
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
Jeff Scott <jscott@mail.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: uiuc_initializemaps.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: none
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_map_record5.h"
|
||||
|
||||
|
||||
void uiuc_map_record5()
|
||||
{
|
||||
/************************ Forces ***********************/
|
||||
// aero forces in local axis
|
||||
record_map["F_X_wind"] = F_X_wind_record ;
|
||||
record_map["F_Y_wind"] = F_Y_wind_record ;
|
||||
record_map["F_Z_wind"] = F_Z_wind_record ;
|
||||
|
||||
// aero forces in body axis
|
||||
record_map["F_X_aero"] = F_X_aero_record ;
|
||||
record_map["F_Y_aero"] = F_Y_aero_record ;
|
||||
record_map["F_Z_aero"] = F_Z_aero_record ;
|
||||
|
||||
// engine forces
|
||||
record_map["F_X_engine"] = F_X_engine_record ;
|
||||
record_map["F_Y_engine"] = F_Y_engine_record ;
|
||||
record_map["F_Z_engine"] = F_Z_engine_record ;
|
||||
|
||||
// gear forces
|
||||
record_map["F_X_gear"] = F_X_gear_record ;
|
||||
record_map["F_Y_gear"] = F_Y_gear_record ;
|
||||
record_map["F_Z_gear"] = F_Z_gear_record ;
|
||||
|
||||
// total forces in body axis
|
||||
record_map["F_X"] = F_X_record ;
|
||||
record_map["F_Y"] = F_Y_record ;
|
||||
record_map["F_Z"] = F_Z_record ;
|
||||
|
||||
// total forces in local axis
|
||||
record_map["F_north"] = F_north_record ;
|
||||
record_map["F_east"] = F_east_record ;
|
||||
record_map["F_down"] = F_down_record ;
|
||||
|
||||
|
||||
/*********************** Moments ***********************/
|
||||
// aero moments
|
||||
record_map["M_l_aero"] = M_l_aero_record ;
|
||||
record_map["M_m_aero"] = M_m_aero_record ;
|
||||
record_map["M_n_aero"] = M_n_aero_record ;
|
||||
|
||||
// engine moments
|
||||
record_map["M_l_engine"] = M_l_engine_record ;
|
||||
record_map["M_m_engine"] = M_m_engine_record ;
|
||||
record_map["M_n_engine"] = M_n_engine_record ;
|
||||
|
||||
// gear moments
|
||||
record_map["M_l_gear"] = M_l_gear_record ;
|
||||
record_map["M_m_gear"] = M_m_gear_record ;
|
||||
record_map["M_n_gear"] = M_n_gear_record ;
|
||||
|
||||
// total moments
|
||||
record_map["M_l_rp"] = M_l_rp_record ;
|
||||
record_map["M_m_rp"] = M_m_rp_record ;
|
||||
record_map["M_n_rp"] = M_n_rp_record ;
|
||||
}
|
||||
|
||||
// end uiuc_map_record5.cpp
|
8
src/FDM/UIUCModel/uiuc_map_record5.h
Normal file
8
src/FDM/UIUCModel/uiuc_map_record5.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _MAP_RECORD5_H_
|
||||
#define _MAP_RECORD5_H_
|
||||
|
||||
#include "uiuc_aircraft.h"
|
||||
|
||||
void uiuc_map_record5();
|
||||
|
||||
#endif // _MAP_RECORD5_H_
|
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,9 @@
|
|||
#include "uiuc_initializemaps.h"
|
||||
#include "uiuc_1DdataFileReader.h"
|
||||
#include "uiuc_2DdataFileReader.h"
|
||||
#include "../LaRCsim/ls_generic.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
#include "../FDM/LaRCsim/ls_cockpit.h" /* Long_trim defined */
|
||||
#include "../FDM/LaRCsim/ls_constants.h" /* INVG defined */
|
||||
|
||||
bool check_float(string &token); // To check whether the token is a float or not
|
||||
void uiuc_menu (string aircraft);
|
||||
|
|
|
@ -62,11 +62,10 @@
|
|||
USA or view http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
**********************************************************************/
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
|
||||
#include "uiuc_parsefile.h"
|
||||
|
||||
FG_USING_NAMESPACE(std);
|
||||
|
||||
ParseFile :: ParseFile (const string fileName)
|
||||
{
|
||||
|
|
|
@ -1,20 +1,10 @@
|
|||
#ifndef _PARSE_FILE_H_
|
||||
#define _PARSE_FILE_H_
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <fstream>
|
||||
|
||||
FG_USING_STD(string);
|
||||
FG_USING_STD(list);
|
||||
#if defined ( MACOS ) || defined ( _MSC_VER )
|
||||
FG_USING_STD(ifstream);
|
||||
FG_USING_STD(iostream);
|
||||
FG_USING_STD(endl);
|
||||
#endif
|
||||
|
||||
#define DELIMITERS " \t"
|
||||
#define COMMENT "#"
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,6 +5,8 @@
|
|||
#include "uiuc_parsefile.h"
|
||||
#include "uiuc_aircraft.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
#include "../FDM/LaRCsim/ls_cockpit.h"
|
||||
#include "../FDM/LaRCsim/ls_constants.h"
|
||||
|
||||
extern double Simtime;
|
||||
|
||||
|
|
|
@ -74,12 +74,8 @@ for information.
|
|||
USA or view http://www.gnu.org/copyleft/gpl.html.
|
||||
|
||||
**********************************************************************/
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include "uiuc_warnings_errors.h"
|
||||
|
||||
FG_USING_NAMESPACE(std);
|
||||
|
||||
void uiuc_warnings_errors(int errorCode, string line)
|
||||
{
|
||||
switch (errorCode)
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
#ifndef _WARNINGS_ERRORS_H_
|
||||
#define _WARNINGS_ERRORS_H_
|
||||
|
||||
#include <simgear/compiler.h> /* for FG_USING_STD */
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <stdlib.h> /* for exit */
|
||||
|
||||
FG_USING_STD(string);
|
||||
FG_USING_STD(iostream);
|
||||
|
||||
void uiuc_warnings_errors(int errorCode, string line);
|
||||
|
||||
|
|
|
@ -1,68 +1,67 @@
|
|||
/**********************************************************************
|
||||
*
|
||||
* FILENAME: uiuc_wrapper.cpp
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* DESCRIPTION: A wrapper(interface) between the UIUC Aeromodel (C++ files)
|
||||
* and the LaRCsim FDM (C files)
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* STATUS: alpha version
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* REFERENCES:
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* HISTORY: 01/26/2000 initial release
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* VARIABLES:
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* INPUTS: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* OUTPUTS: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* CALLED BY: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* CALLS TO: *
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* COPYRIGHT: (C) 2000 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.
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
FILENAME: uiuc_wrapper.cpp
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
DESCRIPTION: A wrapper(interface) between the UIUC Aeromodel (C++ files)
|
||||
and the LaRCsim FDM (C files)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
STATUS: alpha version
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
REFERENCES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
HISTORY: 01/26/2000 initial release
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
VARIABLES:
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
INPUTS: *
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
OUTPUTS: *
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLED BY: *
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
CALLS TO: *
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
COPYRIGHT: (C) 2000 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_aircraft.h"
|
||||
#include "uiuc_aircraftdir.h"
|
||||
|
@ -71,8 +70,8 @@
|
|||
#include "uiuc_aerodeflections.h"
|
||||
#include "uiuc_recorder.h"
|
||||
#include "uiuc_menu.h"
|
||||
#include "../LaRCsim/ls_generic.h"
|
||||
|
||||
#include "uiuc_betaprobe.h"
|
||||
#include "../FDM/LaRCsim/ls_generic.h"
|
||||
|
||||
extern "C" void uiuc_init_aeromodel ();
|
||||
extern "C" void uiuc_force_moment(double dt);
|
||||
|
@ -100,25 +99,32 @@ void uiuc_force_moment(double dt)
|
|||
double qScbar = qS * cbar;
|
||||
double qSb = qS * bw;
|
||||
|
||||
uiuc_aerodeflections();
|
||||
uiuc_aerodeflections(dt);
|
||||
uiuc_coefficients();
|
||||
|
||||
|
||||
/* Calculate the wind axis forces */
|
||||
if (CX && CZ)
|
||||
{
|
||||
CD = -CX * cos(Alpha) - CZ * sin(Alpha);
|
||||
CL = CX * sin(Alpha) - CZ * cos(Alpha);
|
||||
}
|
||||
F_X_wind = -1 * CD * qS;
|
||||
F_Y_wind = CY * qS;
|
||||
F_Z_wind = -1 * CL * qS;
|
||||
|
||||
|
||||
/* wind-axis to body-axis transformation */
|
||||
F_X_aero = F_X_wind * Cos_alpha * Cos_beta - F_Y_wind * Cos_alpha * Sin_beta - F_Z_wind * Sin_alpha;
|
||||
F_Y_aero = F_X_wind * Sin_beta + F_Y_wind * Cos_beta;
|
||||
F_Z_aero = F_X_wind * Sin_alpha * Cos_beta - F_Y_wind * Sin_alpha * Sin_beta + F_Z_wind * Cos_alpha;
|
||||
|
||||
/* Moment calculations */
|
||||
|
||||
/* Moment calculations */
|
||||
M_l_aero = Cl * qSb;
|
||||
M_m_aero = Cm * qScbar;
|
||||
M_n_aero = Cn * qSb;
|
||||
M_n_aero = Cn * qSb;
|
||||
|
||||
uiuc_recorder(dt);
|
||||
/* Call fligt data recorder */
|
||||
if (Simtime >= recordStartTime)
|
||||
uiuc_recorder(dt);
|
||||
}
|
||||
|
||||
void uiuc_engine_routine()
|
||||
|
|
Loading…
Add table
Reference in a new issue