1 /**********************************************************************
3 FILENAME: uiuc_menu.cpp
5 ----------------------------------------------------------------------
7 DESCRIPTION: reads input file for specified aircraft and creates
8 approporiate data storage space
10 ----------------------------------------------------------------------
14 ----------------------------------------------------------------------
16 REFERENCES: based on "menu reader" format of Michael Selig
18 ----------------------------------------------------------------------
20 HISTORY: 01/29/2000 initial release
21 02/18/2000 (JS) added 1D data file capability for
22 CL(a) and CD(a) -- calls
24 02/22/2000 (JS) added ice map functions
25 02/29/2000 (JS) added 2D data file capability for
26 CL(a,de), CD(a,de), Cm(a,de), CY(a,da),
27 CY(beta,dr), Cl(a,da), Cl(beta,dr),
28 Cn(a,da), Cn(beta,dr) -- calls
30 02/02/2000 (JS) added record options for 1D and
31 2D interpolated variables
32 03/28/2000 (JS) streamlined conversion factors for
33 file readers -- since they are global
34 variables, it is not necessary to put
35 them in the function calls
36 03/29/2000 (JS) added Cmfa and Weight flags;
37 added misc map; added Dx_cg (etc) to init
39 04/01/2000 (JS) added throttle, longitudinal, lateral,
40 and rudder inputs to record map
41 04/05/2000 (JS) added Altitude to init and record
42 maps; added zero_Long_trim to
44 03/09/2001 (DPM) added support for gear.
45 06/18/2001 (RD) Added Alpha, Beta, U_body,
46 V_body, and W_body to init map. Added
47 aileron_input, rudder_input, pilot_elev_no,
48 pilot_ail_no, and pilot_rud_no to
49 controlSurface map. Added Throttle_pct_input
50 to engine map. Added CZfa to CL map.
51 07/05/2001 (RD) Changed pilot_elev_no = true to pilot_
52 elev_no_check=false. This is to allow pilot
53 to fly aircraft after input files have been
55 08/27/2001 (RD) Added xxx_init_true and xxx_init for
56 P_body, Q_body, R_body, Phi, Theta, Psi,
57 U_body, V_body, and W_body to help in
58 starting the A/C at an initial condition.
59 10/25/2001 (RD) Added new variables needed for the non-
60 linear Twin Otter model at zero flaps
62 11/12/2001 (RD) Added new variables needed for the non-
63 linear Twin Otter model with flaps
64 (Cxfxxf). Removed zero flap variables.
65 Added minmaxfind() which is needed for non-
67 01/11/2002 (AP) Added keywords for bootTime
68 02/13/2002 (RD) Added variables so linear aero model
69 values can be recorded
70 02/18/2002 (RD) Added variables necessary to use the
71 uiuc_3Dinterp_quick() function. Takes
72 advantage of data in a "nice" form (data
73 that are in a rectangular matrix).
74 03/13/2002 (RD) Added aircraft_directory so full path
75 is no longer needed in the aircraft.dat file
76 04/02/2002 (RD) Removed minmaxfind() since it was no
77 longer needed. Added d_2_to_3(),
78 d_1_to_2(), and i_1_to_2() so uiuc_menu()
79 will compile with certain compilers.
80 08/29/2002 (RD) Separated each primary keyword into its
81 own function to speed up compile time
82 08/29/2002 (RD w/ help from CO) Made changes to shorten
83 compile time. [] RD to add more comments here.
84 08/29/2003 (MSS) Adding new keywords for new engine model
85 and slipstream effects on tail.
87 ----------------------------------------------------------------------
89 AUTHOR(S): Bipin Sehgal <bsehgal@uiuc.edu>
90 Jeff Scott <jscott@mail.com>
91 Robert Deters <rdeters@uiuc.edu>
92 Michael Selig <m-selig@uiuc.edu>
93 David Megginson <david@megginson.com>
94 Ann Peedikayil <peedikay@uiuc.edu>
95 ----------------------------------------------------------------------
99 ----------------------------------------------------------------------
103 ----------------------------------------------------------------------
107 ----------------------------------------------------------------------
109 CALLED BY: uiuc_wrapper.cpp
111 ----------------------------------------------------------------------
113 CALLS TO: aircraft.dat
114 tabulated data files (if needed)
116 ----------------------------------------------------------------------
118 COPYRIGHT: (C) 2000 by Michael Selig
120 This program is free software; you can redistribute it and/or
121 modify it under the terms of the GNU General Public License
122 as published by the Free Software Foundation.
124 This program is distributed in the hope that it will be useful,
125 but WITHOUT ANY WARRANTY; without even the implied warranty of
126 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
127 GNU General Public License for more details.
129 You should have received a copy of the GNU General Public License
130 along with this program; if not, write to the Free Software
131 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
132 USA or view http://www.gnu.org/copyleft/gpl.html.
134 **********************************************************************/
136 #include <simgear/compiler.h>
138 #if defined( __MWERKS__ )
139 // -dw- optimizer chokes (big-time) trying to optimize humongous
140 // loop/switch statements
141 #pragma optimization_level 0
146 #include STL_IOSTREAM
148 #include "uiuc_menu.h"
150 #if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
160 bool check_float( const string &token)
163 istrstream stream(token.c_str());
164 return (stream >> value);
167 void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D)
169 for (register int i=0; i<=99; i++)
171 for (register int j=1; j<=99; j++)
173 array3D[index3D][i][j]=array2D[i][j];
178 void d_1_to_2( double array1D[100], double array2D[][100], int index2D)
180 for (register int i=0; i<=99; i++)
182 array2D[index2D][i]=array1D[i];
186 void d_1_to_1( double array1[100], double array2[100] )
188 for (register int i=0; i<=99; i++)
194 void i_1_to_2( int array1D[100], int array2D[][100], int index2D)
196 for (register int i=0; i<=99; i++)
198 array2D[index2D][i]=array1D[i];
202 void parse_init( const string& linetoken2, const string& linetoken3,
203 const string& linetoken4, LIST command_line ) {
205 istrstream token3(linetoken3.c_str());
206 istrstream token4(linetoken4.c_str());
207 int token_value_recordRate;
209 switch(init_map[linetoken2])
213 if (check_float(linetoken3))
214 token3 >> token_value;
216 uiuc_warnings_errors(1, *command_line);
218 Dx_pilot = token_value;
219 initParts -> storeCommands (*command_line);
224 if (check_float(linetoken3))
225 token3 >> token_value;
227 uiuc_warnings_errors(1, *command_line);
229 Dy_pilot = token_value;
230 initParts -> storeCommands (*command_line);
235 if (check_float(linetoken3))
236 token3 >> token_value;
238 uiuc_warnings_errors(1, *command_line);
240 Dz_pilot = token_value;
241 initParts -> storeCommands (*command_line);
246 if (check_float(linetoken3))
247 token3 >> token_value;
249 uiuc_warnings_errors(1, *command_line);
252 initParts -> storeCommands (*command_line);
257 if (check_float(linetoken3))
258 token3 >> token_value;
260 uiuc_warnings_errors(1, *command_line);
263 initParts -> storeCommands (*command_line);
268 if (check_float(linetoken3))
269 token3 >> token_value;
271 uiuc_warnings_errors(1, *command_line);
274 initParts -> storeCommands (*command_line);
279 if (check_float(linetoken3))
280 token3 >> token_value;
282 uiuc_warnings_errors(1, *command_line);
284 Altitude = token_value;
285 initParts -> storeCommands (*command_line);
290 if (check_float(linetoken3))
291 token3 >> token_value;
293 uiuc_warnings_errors(1, *command_line);
295 V_north = token_value;
296 initParts -> storeCommands (*command_line);
301 initParts -> storeCommands (*command_line);
302 if (check_float(linetoken3))
303 token3 >> token_value;
305 uiuc_warnings_errors(1, *command_line);
307 V_east = token_value;
312 if (check_float(linetoken3))
313 token3 >> token_value;
315 uiuc_warnings_errors(1, *command_line);
317 V_down = token_value;
318 initParts -> storeCommands (*command_line);
323 if (check_float(linetoken3))
324 token3 >> token_value;
326 uiuc_warnings_errors(1, *command_line);
328 P_body_init_true = true;
329 P_body_init = token_value;
330 initParts -> storeCommands (*command_line);
335 if (check_float(linetoken3))
336 token3 >> token_value;
338 uiuc_warnings_errors(1, *command_line);
340 Q_body_init_true = true;
341 Q_body_init = token_value;
342 initParts -> storeCommands (*command_line);
347 if (check_float(linetoken3))
348 token3 >> token_value;
350 uiuc_warnings_errors(1, *command_line);
352 R_body_init_true = true;
353 R_body_init = token_value;
354 initParts -> storeCommands (*command_line);
359 if (check_float(linetoken3))
360 token3 >> token_value;
362 uiuc_warnings_errors(1, *command_line);
364 Phi_init_true = true;
365 Phi_init = token_value;
366 initParts -> storeCommands (*command_line);
371 if (check_float(linetoken3))
372 token3 >> token_value;
374 uiuc_warnings_errors(1, *command_line);
376 Theta_init_true = true;
377 Theta_init = token_value;
378 initParts -> storeCommands (*command_line);
383 if (check_float(linetoken3))
384 token3 >> token_value;
386 uiuc_warnings_errors(1, *command_line);
388 Psi_init_true = true;
389 Psi_init = token_value;
390 initParts -> storeCommands (*command_line);
395 if (check_float(linetoken3))
396 token3 >> token_value;
398 uiuc_warnings_errors(1, *command_line);
400 Long_trim = token_value;
401 initParts -> storeCommands (*command_line);
404 case recordRate_flag:
406 //can't use check_float since variable is integer
407 token3 >> token_value_recordRate;
408 recordRate = 120 / token_value_recordRate;
411 case recordStartTime_flag:
413 if (check_float(linetoken3))
414 token3 >> token_value;
416 uiuc_warnings_errors(1, *command_line);
418 recordStartTime = token_value;
421 case use_V_rel_wind_2U_flag:
423 use_V_rel_wind_2U = true;
426 case nondim_rate_V_rel_wind_flag:
428 nondim_rate_V_rel_wind = true;
431 case use_abs_U_body_2U_flag:
433 use_abs_U_body_2U = true;
436 case dyn_on_speed_flag:
438 if (check_float(linetoken3))
439 token3 >> token_value;
441 uiuc_warnings_errors(1, *command_line);
443 dyn_on_speed = token_value;
446 case dyn_on_speed_zero_flag:
448 if (check_float(linetoken3))
449 token3 >> token_value;
451 uiuc_warnings_errors(1, *command_line);
453 dyn_on_speed_zero = token_value;
456 case use_dyn_on_speed_curve1_flag:
458 use_dyn_on_speed_curve1 = true;
461 case use_Alpha_dot_on_speed_flag:
463 use_Alpha_dot_on_speed = true;
464 if (check_float(linetoken3))
465 token3 >> token_value;
467 uiuc_warnings_errors(1, *command_line);
468 Alpha_dot_on_speed = token_value;
471 case downwashMode_flag:
473 b_downwashMode = true;
474 token3 >> downwashMode;
475 if (downwashMode==100)
477 // compute downwash using downwashCoef, do nothing here
479 uiuc_warnings_errors(4, *command_line);
482 case downwashCoef_flag:
484 if (check_float(linetoken3))
485 token3 >> token_value;
487 uiuc_warnings_errors(1, *command_line);
488 downwashCoef = token_value;
493 if (check_float(linetoken3))
494 token3 >> token_value;
496 uiuc_warnings_errors(1, *command_line);
498 Alpha_init_true = true;
499 Alpha_init = token_value * DEG_TO_RAD;
504 if (check_float(linetoken3))
505 token3 >> token_value;
507 uiuc_warnings_errors(1, *command_line);
509 Beta_init_true = true;
510 Beta_init = token_value * DEG_TO_RAD;
515 if (check_float(linetoken3))
516 token3 >> token_value;
518 uiuc_warnings_errors(1, *command_line);
520 U_body_init_true = true;
521 U_body_init = token_value;
526 if (check_float(linetoken3))
527 token3 >> token_value;
529 uiuc_warnings_errors(1, *command_line);
531 V_body_init_true = true;
532 V_body_init = token_value;
537 if (check_float(linetoken3))
538 token3 >> token_value;
540 uiuc_warnings_errors(1, *command_line);
542 W_body_init_true = true;
543 W_body_init = token_value;
546 case ignore_unknown_flag:
551 case trim_case_2_flag:
556 case use_uiuc_network_flag:
558 use_uiuc_network = true;
559 server_IP = linetoken3;
563 case old_flap_routine_flag:
565 old_flap_routine = true;
568 case icing_demo_flag:
573 case outside_control_flag:
575 outside_control = true;
581 uiuc_warnings_errors(2, *command_line);
587 void parse_geometry( const string& linetoken2, const string& linetoken3,
588 LIST command_line ) {
590 istrstream token3(linetoken3.c_str());
592 switch(geometry_map[linetoken2])
596 if (check_float(linetoken3))
597 token3 >> token_value;
599 uiuc_warnings_errors(1, *command_line);
602 geometryParts -> storeCommands (*command_line);
607 if (check_float(linetoken3))
608 token3 >> token_value;
610 uiuc_warnings_errors(1, *command_line);
613 geometryParts -> storeCommands (*command_line);
618 if (check_float(linetoken3))
619 token3 >> token_value;
621 uiuc_warnings_errors(1, *command_line);
624 geometryParts -> storeCommands (*command_line);
629 if (check_float(linetoken3))
630 token3 >> token_value;
632 uiuc_warnings_errors(1, *command_line);
635 geometryParts -> storeCommands (*command_line);
640 if (check_float(linetoken3))
641 token3 >> token_value;
643 uiuc_warnings_errors(1, *command_line);
646 geometryParts -> storeCommands (*command_line);
651 if (check_float(linetoken3))
652 token3 >> token_value;
654 uiuc_warnings_errors(1, *command_line);
657 geometryParts -> storeCommands (*command_line);
662 if (check_float(linetoken3))
663 token3 >> token_value;
665 uiuc_warnings_errors(1, *command_line);
668 geometryParts -> storeCommands (*command_line);
674 uiuc_warnings_errors(2, *command_line);
680 void parse_controlSurface( const string& linetoken2, const string& linetoken3,
681 const string& linetoken4, const string& linetoken5,
682 const string& linetoken6,
683 const string& aircraft_directory,
684 LIST command_line ) {
686 int token_value_convert1, token_value_convert2;
687 istrstream token3(linetoken3.c_str());
688 istrstream token4(linetoken4.c_str());
689 istrstream token5(linetoken5.c_str());
690 istrstream token6(linetoken6.c_str());
692 switch(controlSurface_map[linetoken2])
696 if (check_float(linetoken3))
697 token3 >> token_value;
699 uiuc_warnings_errors(1, *command_line);
703 if (check_float(linetoken4))
704 token4 >> token_value;
706 uiuc_warnings_errors(1, *command_line);
713 if (check_float(linetoken3))
714 token3 >> token_value;
716 uiuc_warnings_errors(1, *command_line);
720 if (check_float(linetoken4))
721 token4 >> token_value;
723 uiuc_warnings_errors(1, *command_line);
730 if (check_float(linetoken3))
731 token3 >> token_value;
733 uiuc_warnings_errors(1, *command_line);
737 if (check_float(linetoken4))
738 token4 >> token_value;
740 uiuc_warnings_errors(1, *command_line);
745 case set_Long_trim_flag:
747 if (check_float(linetoken3))
748 token3 >> token_value;
750 uiuc_warnings_errors(1, *command_line);
752 set_Long_trim = true;
753 elevator_tab = token_value;
756 case set_Long_trim_deg_flag:
758 if (check_float(linetoken3))
759 token3 >> token_value;
761 uiuc_warnings_errors(1, *command_line);
763 set_Long_trim = true;
764 elevator_tab = token_value * DEG_TO_RAD;
767 case zero_Long_trim_flag:
769 zero_Long_trim = true;
772 case elevator_step_flag:
774 // set step input flag
775 elevator_step = true;
777 // read in step angle in degrees and convert
778 if (check_float(linetoken3))
779 token3 >> token_value;
781 uiuc_warnings_errors(1, *command_line);
783 elevator_step_angle = token_value * DEG_TO_RAD;
785 // read in step start time
786 if (check_float(linetoken4))
787 token4 >> token_value;
789 uiuc_warnings_errors(1, *command_line);
791 elevator_step_startTime = token_value;
794 case elevator_singlet_flag:
796 // set singlet input flag
797 elevator_singlet = true;
799 // read in singlet angle in degrees and convert
800 if (check_float(linetoken3))
801 token3 >> token_value;
803 uiuc_warnings_errors(1, *command_line);
805 elevator_singlet_angle = token_value * DEG_TO_RAD;
807 // read in singlet start time
808 if (check_float(linetoken4))
809 token4 >> token_value;
811 uiuc_warnings_errors(1, *command_line);
813 elevator_singlet_startTime = token_value;
815 // read in singlet duration
816 if (check_float(linetoken5))
817 token5 >> token_value;
819 uiuc_warnings_errors(1, *command_line);
821 elevator_singlet_duration = token_value;
824 case elevator_doublet_flag:
826 // set doublet input flag
827 elevator_doublet = true;
829 // read in doublet angle in degrees and convert
830 if (check_float(linetoken3))
831 token3 >> token_value;
833 uiuc_warnings_errors(1, *command_line);
835 elevator_doublet_angle = token_value * DEG_TO_RAD;
837 // read in doublet start time
838 if (check_float(linetoken4))
839 token4 >> token_value;
841 uiuc_warnings_errors(1, *command_line);
843 elevator_doublet_startTime = token_value;
845 // read in doublet duration
846 if (check_float(linetoken5))
847 token5 >> token_value;
849 uiuc_warnings_errors(1, *command_line);
851 elevator_doublet_duration = token_value;
854 case elevator_input_flag:
856 elevator_input = true;
857 elevator_input_file = aircraft_directory + linetoken3;
858 token4 >> token_value_convert1;
859 token5 >> token_value_convert2;
860 convert_y = uiuc_convert(token_value_convert1);
861 convert_x = uiuc_convert(token_value_convert2);
862 uiuc_1DdataFileReader(elevator_input_file,
863 elevator_input_timeArray,
864 elevator_input_deArray,
865 elevator_input_ntime);
866 token6 >> token_value;
867 elevator_input_startTime = token_value;
870 case aileron_input_flag:
872 aileron_input = true;
873 aileron_input_file = aircraft_directory + linetoken3;
874 token4 >> token_value_convert1;
875 token5 >> token_value_convert2;
876 convert_y = uiuc_convert(token_value_convert1);
877 convert_x = uiuc_convert(token_value_convert2);
878 uiuc_1DdataFileReader(aileron_input_file,
879 aileron_input_timeArray,
880 aileron_input_daArray,
881 aileron_input_ntime);
882 token6 >> token_value;
883 aileron_input_startTime = token_value;
886 case rudder_input_flag:
889 rudder_input_file = aircraft_directory + linetoken3;
890 token4 >> token_value_convert1;
891 token5 >> token_value_convert2;
892 convert_y = uiuc_convert(token_value_convert1);
893 convert_x = uiuc_convert(token_value_convert2);
894 uiuc_1DdataFileReader(rudder_input_file,
895 rudder_input_timeArray,
896 rudder_input_drArray,
898 token6 >> token_value;
899 rudder_input_startTime = token_value;
902 case flap_pos_input_flag:
904 flap_pos_input = true;
905 flap_pos_input_file = aircraft_directory + linetoken3;
906 token4 >> token_value_convert1;
907 token5 >> token_value_convert2;
908 convert_y = uiuc_convert(token_value_convert1);
909 convert_x = uiuc_convert(token_value_convert2);
910 uiuc_1DdataFileReader(flap_pos_input_file,
911 flap_pos_input_timeArray,
912 flap_pos_input_dfArray,
913 flap_pos_input_ntime);
914 token6 >> token_value;
915 flap_pos_input_startTime = token_value;
918 case pilot_elev_no_flag:
920 pilot_elev_no_check = true;
923 case pilot_ail_no_flag:
925 pilot_ail_no_check = true;
928 case pilot_rud_no_flag:
930 pilot_rud_no_check = true;
935 if (check_float(linetoken3))
936 token3 >> token_value;
938 uiuc_warnings_errors(1, *command_line);
940 flap_max = token_value;
945 if (check_float(linetoken3))
946 token3 >> token_value;
948 uiuc_warnings_errors(1, *command_line);
950 flap_rate = token_value;
956 uiuc_warnings_errors(2, *command_line);
962 void parse_mass( const string& linetoken2, const string& linetoken3,
963 LIST command_line ) {
965 istrstream token3(linetoken3.c_str());
967 switch(mass_map[linetoken2])
971 if (check_float(linetoken3))
972 token3 >> token_value;
974 uiuc_warnings_errors(1, *command_line);
976 Weight = token_value;
977 Mass = Weight * INVG;
978 massParts -> storeCommands (*command_line);
983 if (check_float(linetoken3))
984 token3 >> token_value;
986 uiuc_warnings_errors(1, *command_line);
989 massParts -> storeCommands (*command_line);
994 if (check_float(linetoken3))
995 token3 >> token_value;
997 uiuc_warnings_errors(1, *command_line);
1000 massParts -> storeCommands (*command_line);
1005 if (check_float(linetoken3))
1006 token3 >> token_value;
1008 uiuc_warnings_errors(1, *command_line);
1011 massParts -> storeCommands (*command_line);
1016 if (check_float(linetoken3))
1017 token3 >> token_value;
1019 uiuc_warnings_errors(1, *command_line);
1022 massParts -> storeCommands (*command_line);
1027 if (check_float(linetoken3))
1028 token3 >> token_value;
1030 uiuc_warnings_errors(1, *command_line);
1033 massParts -> storeCommands (*command_line);
1036 case Mass_appMass_ratio_flag:
1038 if (check_float(linetoken3))
1039 token3 >> token_value;
1041 uiuc_warnings_errors(1, *command_line);
1043 Mass_appMass_ratio = token_value;
1044 massParts -> storeCommands (*command_line);
1047 case I_xx_appMass_ratio_flag:
1049 if (check_float(linetoken3))
1050 token3 >> token_value;
1052 uiuc_warnings_errors(1, *command_line);
1054 I_xx_appMass_ratio = token_value;
1055 massParts -> storeCommands (*command_line);
1058 case I_yy_appMass_ratio_flag:
1060 if (check_float(linetoken3))
1061 token3 >> token_value;
1063 uiuc_warnings_errors(1, *command_line);
1065 I_yy_appMass_ratio = token_value;
1066 massParts -> storeCommands (*command_line);
1069 case I_zz_appMass_ratio_flag:
1071 if (check_float(linetoken3))
1072 token3 >> token_value;
1074 uiuc_warnings_errors(1, *command_line);
1076 I_zz_appMass_ratio = token_value;
1077 massParts -> storeCommands (*command_line);
1080 case Mass_appMass_flag:
1082 if (check_float(linetoken3))
1083 token3 >> token_value;
1085 uiuc_warnings_errors(1, *command_line);
1087 Mass_appMass = token_value;
1088 massParts -> storeCommands (*command_line);
1091 case I_xx_appMass_flag:
1093 if (check_float(linetoken3))
1094 token3 >> token_value;
1096 uiuc_warnings_errors(1, *command_line);
1098 I_xx_appMass = token_value;
1099 massParts -> storeCommands (*command_line);
1102 case I_yy_appMass_flag:
1104 if (check_float(linetoken3))
1105 token3 >> token_value;
1107 uiuc_warnings_errors(1, *command_line);
1109 I_yy_appMass = token_value;
1110 massParts -> storeCommands (*command_line);
1113 case I_zz_appMass_flag:
1115 if (check_float(linetoken3))
1116 token3 >> token_value;
1118 uiuc_warnings_errors(1, *command_line);
1120 I_zz_appMass = token_value;
1121 massParts -> storeCommands (*command_line);
1127 uiuc_warnings_errors(2, *command_line);
1133 void parse_engine( const string& linetoken2, const string& linetoken3,
1134 const string& linetoken4, const string& linetoken5,
1135 const string& linetoken6, const string& aircraft_directory,
1136 LIST command_line ) {
1138 int token_value_convert1, token_value_convert2;
1139 istrstream token3(linetoken3.c_str());
1140 istrstream token4(linetoken4.c_str());
1141 istrstream token5(linetoken5.c_str());
1142 istrstream token6(linetoken6.c_str());
1144 switch(engine_map[linetoken2])
1146 case simpleSingle_flag:
1148 if (check_float(linetoken3))
1149 token3 >> token_value;
1151 uiuc_warnings_errors(1, *command_line);
1153 simpleSingleMaxThrust = token_value;
1154 engineParts -> storeCommands (*command_line);
1157 case simpleSingleModel_flag:
1159 simpleSingleModel = true;
1160 /* input the thrust at zero speed */
1161 if (check_float(linetoken3))
1162 token3 >> token_value;
1164 uiuc_warnings_errors(1, *command_line);
1166 /* input slope of thrust at speed for which thrust is zero */
1167 if (check_float(linetoken4))
1168 token4 >> token_value;
1170 uiuc_warnings_errors(1, *command_line);
1171 dtdv_t0 = token_value;
1172 /* input speed at which thrust is zero */
1173 if (check_float(linetoken5))
1174 token5 >> token_value;
1176 uiuc_warnings_errors(1, *command_line);
1178 dtdvvt = -dtdv_t0 * v_t0 / t_v0;
1179 engineParts -> storeCommands (*command_line);
1184 engineParts -> storeCommands (*command_line);
1189 engineParts -> storeCommands (*command_line);
1192 case Throttle_pct_input_flag:
1194 Throttle_pct_input = true;
1195 Throttle_pct_input_file = aircraft_directory + linetoken3;
1196 token4 >> token_value_convert1;
1197 token5 >> token_value_convert2;
1198 convert_y = uiuc_convert(token_value_convert1);
1199 convert_x = uiuc_convert(token_value_convert2);
1200 uiuc_1DdataFileReader(Throttle_pct_input_file,
1201 Throttle_pct_input_timeArray,
1202 Throttle_pct_input_dTArray,
1203 Throttle_pct_input_ntime);
1204 token6 >> token_value;
1205 Throttle_pct_input_startTime = token_value;
1208 case gyroForce_Q_body_flag:
1210 /* include gyroscopic forces due to pitch */
1211 gyroForce_Q_body = true;
1214 case gyroForce_R_body_flag:
1216 /* include gyroscopic forces due to yaw */
1217 gyroForce_R_body = true;
1221 case slipstream_effects_flag:
1223 // include slipstream effects
1224 b_slipstreamEffects = true;
1225 if (!simpleSingleModel)
1226 uiuc_warnings_errors(3, *command_line);
1231 if (check_float(linetoken3))
1232 token3 >> token_value;
1234 uiuc_warnings_errors(1, *command_line);
1235 propDia = token_value;
1238 case eta_q_Cm_q_flag:
1240 // include slipstream effects due to Cm_q
1241 if (check_float(linetoken3))
1242 token3 >> token_value;
1244 uiuc_warnings_errors(1, *command_line);
1245 eta_q_Cm_q_fac = token_value;
1246 if (eta_q_Cm_q_fac == 0.0) {eta_q_Cm_q_fac = 1.0;}
1249 case eta_q_Cm_adot_flag:
1251 // include slipstream effects due to Cm_adot
1252 if (check_float(linetoken3))
1253 token3 >> token_value;
1255 uiuc_warnings_errors(1, *command_line);
1256 eta_q_Cm_adot_fac = token_value;
1257 if (eta_q_Cm_adot_fac == 0.0) {eta_q_Cm_adot_fac = 1.0;}
1260 case eta_q_Cmfade_flag:
1262 // include slipstream effects due to Cmfade
1263 if (check_float(linetoken3))
1264 token3 >> token_value;
1266 uiuc_warnings_errors(1, *command_line);
1267 eta_q_Cmfade_fac = token_value;
1268 if (eta_q_Cmfade_fac == 0.0) {eta_q_Cmfade_fac = 1.0;}
1271 case eta_q_Cl_beta_flag:
1273 // include slipstream effects due to Cl_beta
1274 if (check_float(linetoken3))
1275 token3 >> token_value;
1277 uiuc_warnings_errors(1, *command_line);
1278 eta_q_Cl_beta_fac = token_value;
1279 if (eta_q_Cl_beta_fac == 0.0) {eta_q_Cl_beta_fac = 1.0;}
1282 case eta_q_Cl_p_flag:
1284 // include slipstream effects due to Cl_p
1285 if (check_float(linetoken3))
1286 token3 >> token_value;
1288 uiuc_warnings_errors(1, *command_line);
1289 eta_q_Cl_p_fac = token_value;
1290 if (eta_q_Cl_p_fac == 0.0) {eta_q_Cl_p_fac = 1.0;}
1293 case eta_q_Cl_r_flag:
1295 // include slipstream effects due to Cl_r
1296 if (check_float(linetoken3))
1297 token3 >> token_value;
1299 uiuc_warnings_errors(1, *command_line);
1300 eta_q_Cl_r_fac = token_value;
1301 if (eta_q_Cl_r_fac == 0.0) {eta_q_Cl_r_fac = 1.0;}
1304 case eta_q_Cl_dr_flag:
1306 // include slipstream effects due to Cl_dr
1307 if (check_float(linetoken3))
1308 token3 >> token_value;
1310 uiuc_warnings_errors(1, *command_line);
1311 eta_q_Cl_dr_fac = token_value;
1312 if (eta_q_Cl_dr_fac == 0.0) {eta_q_Cl_dr_fac = 1.0;}
1315 case eta_q_CY_beta_flag:
1317 // include slipstream effects due to CY_beta
1318 if (check_float(linetoken3))
1319 token3 >> token_value;
1321 uiuc_warnings_errors(1, *command_line);
1322 eta_q_CY_beta_fac = token_value;
1323 if (eta_q_CY_beta_fac == 0.0) {eta_q_CY_beta_fac = 1.0;}
1326 case eta_q_CY_p_flag:
1328 // include slipstream effects due to CY_p
1329 if (check_float(linetoken3))
1330 token3 >> token_value;
1332 uiuc_warnings_errors(1, *command_line);
1333 eta_q_CY_p_fac = token_value;
1334 if (eta_q_CY_p_fac == 0.0) {eta_q_CY_p_fac = 1.0;}
1337 case eta_q_CY_r_flag:
1339 // include slipstream effects due to CY_r
1340 if (check_float(linetoken3))
1341 token3 >> token_value;
1343 uiuc_warnings_errors(1, *command_line);
1344 eta_q_CY_r_fac = token_value;
1345 if (eta_q_CY_r_fac == 0.0) {eta_q_CY_r_fac = 1.0;}
1348 case eta_q_CY_dr_flag:
1350 // include slipstream effects due to CY_dr
1351 if (check_float(linetoken3))
1352 token3 >> token_value;
1354 uiuc_warnings_errors(1, *command_line);
1355 eta_q_CY_dr_fac = token_value;
1356 if (eta_q_CY_dr_fac == 0.0) {eta_q_CY_dr_fac = 1.0;}
1359 case eta_q_Cn_beta_flag:
1361 // include slipstream effects due to Cn_beta
1362 if (check_float(linetoken3))
1363 token3 >> token_value;
1365 uiuc_warnings_errors(1, *command_line);
1366 eta_q_Cn_beta_fac = token_value;
1367 if (eta_q_Cn_beta_fac == 0.0) {eta_q_Cn_beta_fac = 1.0;}
1370 case eta_q_Cn_p_flag:
1372 // include slipstream effects due to Cn_p
1373 if (check_float(linetoken3))
1374 token3 >> token_value;
1376 uiuc_warnings_errors(1, *command_line);
1377 eta_q_Cn_p_fac = token_value;
1378 if (eta_q_Cn_p_fac == 0.0) {eta_q_Cn_p_fac = 1.0;}
1381 case eta_q_Cn_r_flag:
1383 // include slipstream effects due to Cn_r
1384 if (check_float(linetoken3))
1385 token3 >> token_value;
1387 uiuc_warnings_errors(1, *command_line);
1388 eta_q_Cn_r_fac = token_value;
1389 if (eta_q_Cn_r_fac == 0.0) {eta_q_Cn_r_fac = 1.0;}
1392 case eta_q_Cn_dr_flag:
1394 // include slipstream effects due to Cn_dr
1395 if (check_float(linetoken3))
1396 token3 >> token_value;
1398 uiuc_warnings_errors(1, *command_line);
1399 eta_q_Cn_dr_fac = token_value;
1400 if (eta_q_Cn_dr_fac == 0.0) {eta_q_Cn_dr_fac = 1.0;}
1406 if (check_float(linetoken3))
1407 token3 >> token_value;
1409 uiuc_warnings_errors(1, *command_line);
1410 minOmega = token_value;
1411 if (check_float(linetoken4))
1412 token4 >> token_value;
1414 uiuc_warnings_errors(1, *command_line);
1415 maxOmega = token_value;
1420 if (check_float(linetoken3))
1421 token3 >> token_value;
1423 uiuc_warnings_errors(1, *command_line);
1424 minOmegaRPM = token_value;
1425 minOmega = minOmegaRPM * 2.0 * LS_PI / 60;
1426 if (check_float(linetoken4))
1427 token4 >> token_value;
1429 uiuc_warnings_errors(1, *command_line);
1430 maxOmegaRPM = token_value;
1431 maxOmega = maxOmegaRPM * 2.0 * LS_PI / 60;
1434 case polarInertia_flag:
1436 if (check_float(linetoken3))
1437 token3 >> token_value;
1439 uiuc_warnings_errors(1, *command_line);
1440 polarInertia = token_value;
1445 engineParts -> storeCommands (*command_line);
1451 Xp_input_file = aircraft_directory + linetoken3;
1452 token4 >> token_value_convert1;
1453 token5 >> token_value_convert2;
1454 convert_y = uiuc_convert(token_value_convert1);
1455 convert_x = uiuc_convert(token_value_convert2);
1456 uiuc_1DdataFileReader(Xp_input_file,
1460 token6 >> token_value;
1461 Xp_input_startTime = token_value;
1467 Zp_input_file = aircraft_directory + linetoken3;
1468 token4 >> token_value_convert1;
1469 token5 >> token_value_convert2;
1470 convert_y = uiuc_convert(token_value_convert1);
1471 convert_x = uiuc_convert(token_value_convert2);
1472 uiuc_1DdataFileReader(Zp_input_file,
1476 token6 >> token_value;
1477 Zp_input_startTime = token_value;
1483 Mp_input_file = aircraft_directory + linetoken3;
1484 token4 >> token_value_convert1;
1485 token5 >> token_value_convert2;
1486 convert_y = uiuc_convert(token_value_convert1);
1487 convert_x = uiuc_convert(token_value_convert2);
1488 uiuc_1DdataFileReader(Mp_input_file,
1492 token6 >> token_value;
1493 Mp_input_startTime = token_value;
1499 uiuc_warnings_errors(2, *command_line);
1505 void parse_CD( const string& linetoken2, const string& linetoken3,
1506 const string& linetoken4, const string& linetoken5,
1507 const string& linetoken6, const string& linetoken7,
1508 const string& linetoken8, const string& linetoken9,
1509 const string& aircraft_directory,
1510 bool &CXfabetaf_first, bool &CXfadef_first,
1511 bool &CXfaqf_first, LIST command_line ) {
1513 int token_value_convert1, token_value_convert2, token_value_convert3;
1514 double datafile_xArray[100][100], datafile_yArray[100];
1515 double datafile_zArray[100][100];
1516 int datafile_nxArray[100], datafile_ny;
1517 istrstream token3(linetoken3.c_str());
1518 istrstream token4(linetoken4.c_str());
1519 istrstream token5(linetoken5.c_str());
1520 istrstream token6(linetoken6.c_str());
1521 istrstream token7(linetoken7.c_str());
1522 istrstream token8(linetoken8.c_str());
1523 istrstream token9(linetoken9.c_str());
1525 switch(CD_map[linetoken2])
1529 if (check_float(linetoken3))
1530 token3 >> token_value;
1532 uiuc_warnings_errors(1, *command_line);
1536 aeroDragParts -> storeCommands (*command_line);
1541 if (check_float(linetoken3))
1542 token3 >> token_value;
1544 uiuc_warnings_errors(1, *command_line);
1548 aeroDragParts -> storeCommands (*command_line);
1553 if (check_float(linetoken3))
1554 token3 >> token_value;
1556 uiuc_warnings_errors(1, *command_line);
1560 aeroDragParts -> storeCommands (*command_line);
1565 if (check_float(linetoken3))
1566 token3 >> token_value;
1568 uiuc_warnings_errors(1, *command_line);
1570 CD_adot = token_value;
1571 CD_adot_clean = CD_adot;
1572 aeroDragParts -> storeCommands (*command_line);
1577 if (check_float(linetoken3))
1578 token3 >> token_value;
1580 uiuc_warnings_errors(1, *command_line);
1584 aeroDragParts -> storeCommands (*command_line);
1589 if (check_float(linetoken3))
1590 token3 >> token_value;
1592 uiuc_warnings_errors(1, *command_line);
1594 CD_ih = token_value;
1595 aeroDragParts -> storeCommands (*command_line);
1600 if (check_float(linetoken3))
1601 token3 >> token_value;
1603 uiuc_warnings_errors(1, *command_line);
1605 CD_de = token_value;
1606 CD_de_clean = CD_de;
1607 aeroDragParts -> storeCommands (*command_line);
1612 CDfa = aircraft_directory + linetoken3;
1613 token4 >> token_value_convert1;
1614 token5 >> token_value_convert2;
1615 convert_y = uiuc_convert(token_value_convert1);
1616 convert_x = uiuc_convert(token_value_convert2);
1617 /* call 1D File Reader with file name (CDfa) and conversion
1618 factors; function returns array of alphas (aArray) and
1619 corresponding CD values (CDArray) and max number of
1620 terms in arrays (nAlpha) */
1621 uiuc_1DdataFileReader(CDfa,
1625 aeroDragParts -> storeCommands (*command_line);
1630 CDfCL = aircraft_directory + linetoken3;
1631 token4 >> token_value_convert1;
1632 token5 >> token_value_convert2;
1633 convert_y = uiuc_convert(token_value_convert1);
1634 convert_x = uiuc_convert(token_value_convert2);
1635 /* call 1D File Reader with file name (CDfCL) and conversion
1636 factors; function returns array of CLs (CLArray) and
1637 corresponding CD values (CDArray) and max number of
1638 terms in arrays (nCL) */
1639 uiuc_1DdataFileReader(CDfCL,
1643 aeroDragParts -> storeCommands (*command_line);
1648 CDfade = aircraft_directory + linetoken3;
1649 token4 >> token_value_convert1;
1650 token5 >> token_value_convert2;
1651 token6 >> token_value_convert3;
1652 convert_z = uiuc_convert(token_value_convert1);
1653 convert_x = uiuc_convert(token_value_convert2);
1654 convert_y = uiuc_convert(token_value_convert3);
1655 /* call 2D File Reader with file name (CDfade) and
1656 conversion factors; function returns array of
1657 elevator deflections (deArray) and corresponding
1658 alpha (aArray) and delta CD (CDArray) values and
1659 max number of terms in alpha arrays (nAlphaArray)
1660 and deflection array (nde) */
1661 uiuc_2DdataFileReader(CDfade,
1667 aeroDragParts -> storeCommands (*command_line);
1672 CDfdf = aircraft_directory + linetoken3;
1673 token4 >> token_value_convert1;
1674 token5 >> token_value_convert2;
1675 convert_y = uiuc_convert(token_value_convert1);
1676 convert_x = uiuc_convert(token_value_convert2);
1677 /* call 1D File Reader with file name (CDfdf) and conversion
1678 factors; function returns array of dfs (dfArray) and
1679 corresponding CD values (CDArray) and max number of
1680 terms in arrays (ndf) */
1681 uiuc_1DdataFileReader(CDfdf,
1685 aeroDragParts -> storeCommands (*command_line);
1690 CDfadf = aircraft_directory + linetoken3;
1691 token4 >> token_value_convert1;
1692 token5 >> token_value_convert2;
1693 token6 >> token_value_convert3;
1694 convert_z = uiuc_convert(token_value_convert1);
1695 convert_x = uiuc_convert(token_value_convert2);
1696 convert_y = uiuc_convert(token_value_convert3);
1697 /* call 2D File Reader with file name (CDfadf) and
1698 conversion factors; function returns array of
1699 flap deflections (dfArray) and corresponding
1700 alpha (aArray) and delta CD (CDArray) values and
1701 max number of terms in alpha arrays (nAlphaArray)
1702 and deflection array (ndf) */
1703 uiuc_2DdataFileReader(CDfadf,
1709 aeroDragParts -> storeCommands (*command_line);
1714 if (check_float(linetoken3))
1715 token3 >> token_value;
1717 uiuc_warnings_errors(1, *command_line);
1721 aeroDragParts -> storeCommands (*command_line);
1726 if (check_float(linetoken3))
1727 token3 >> token_value;
1729 uiuc_warnings_errors(1, *command_line);
1733 aeroDragParts -> storeCommands (*command_line);
1738 if (check_float(linetoken3))
1739 token3 >> token_value;
1741 uiuc_warnings_errors(1, *command_line);
1745 aeroDragParts -> storeCommands (*command_line);
1750 if (check_float(linetoken3))
1751 token3 >> token_value;
1753 uiuc_warnings_errors(1, *command_line);
1755 CX_a2 = token_value;
1756 CX_a2_clean = CX_a2;
1757 aeroDragParts -> storeCommands (*command_line);
1762 if (check_float(linetoken3))
1763 token3 >> token_value;
1765 uiuc_warnings_errors(1, *command_line);
1767 CX_a3 = token_value;
1768 CX_a3_clean = CX_a3;
1769 aeroDragParts -> storeCommands (*command_line);
1774 if (check_float(linetoken3))
1775 token3 >> token_value;
1777 uiuc_warnings_errors(1, *command_line);
1779 CX_adot = token_value;
1780 CX_adot_clean = CX_adot;
1781 aeroDragParts -> storeCommands (*command_line);
1786 if (check_float(linetoken3))
1787 token3 >> token_value;
1789 uiuc_warnings_errors(1, *command_line);
1793 aeroDragParts -> storeCommands (*command_line);
1798 if (check_float(linetoken3))
1799 token3 >> token_value;
1801 uiuc_warnings_errors(1, *command_line);
1803 CX_de = token_value;
1804 CX_de_clean = CX_de;
1805 aeroDragParts -> storeCommands (*command_line);
1810 if (check_float(linetoken3))
1811 token3 >> token_value;
1813 uiuc_warnings_errors(1, *command_line);
1815 CX_dr = token_value;
1816 CX_dr_clean = CX_dr;
1817 aeroDragParts -> storeCommands (*command_line);
1822 if (check_float(linetoken3))
1823 token3 >> token_value;
1825 uiuc_warnings_errors(1, *command_line);
1827 CX_df = token_value;
1828 CX_df_clean = CX_df;
1829 aeroDragParts -> storeCommands (*command_line);
1834 if (check_float(linetoken3))
1835 token3 >> token_value;
1837 uiuc_warnings_errors(1, *command_line);
1839 CX_adf = token_value;
1840 CX_adf_clean = CX_adf;
1841 aeroDragParts -> storeCommands (*command_line);
1844 case CXfabetaf_flag:
1846 int CXfabetaf_index, i;
1847 string CXfabetaf_file;
1849 CXfabetaf_file = aircraft_directory + linetoken3;
1850 token4 >> CXfabetaf_index;
1851 if (CXfabetaf_index < 1 || CXfabetaf_index >= 30)
1852 uiuc_warnings_errors(1, *command_line);
1853 if (CXfabetaf_index > CXfabetaf_nf)
1854 CXfabetaf_nf = CXfabetaf_index;
1855 token5 >> flap_value;
1856 CXfabetaf_fArray[CXfabetaf_index] = flap_value;
1857 token6 >> token_value_convert1;
1858 token7 >> token_value_convert2;
1859 token8 >> token_value_convert3;
1860 token9 >> CXfabetaf_nice;
1861 convert_z = uiuc_convert(token_value_convert1);
1862 convert_x = uiuc_convert(token_value_convert2);
1863 convert_y = uiuc_convert(token_value_convert3);
1864 /* call 2D File Reader with file name (CXfabetaf_file) and
1865 conversion factors; function returns array of
1866 elevator deflections (deArray) and corresponding
1867 alpha (aArray) and delta CZ (CZArray) values and
1868 max number of terms in alpha arrays (nAlphaArray)
1869 and delfection array (nde) */
1870 uiuc_2DdataFileReader(CXfabetaf_file,
1876 d_2_to_3(datafile_xArray, CXfabetaf_aArray, CXfabetaf_index);
1877 d_1_to_2(datafile_yArray, CXfabetaf_betaArray, CXfabetaf_index);
1878 d_2_to_3(datafile_zArray, CXfabetaf_CXArray, CXfabetaf_index);
1879 i_1_to_2(datafile_nxArray, CXfabetaf_nAlphaArray, CXfabetaf_index);
1880 CXfabetaf_nbeta[CXfabetaf_index] = datafile_ny;
1881 if (CXfabetaf_first==true)
1883 if (CXfabetaf_nice == 1)
1885 CXfabetaf_na_nice = datafile_nxArray[1];
1886 CXfabetaf_nb_nice = datafile_ny;
1887 d_1_to_1(datafile_yArray, CXfabetaf_bArray_nice);
1888 for (i=1; i<=CXfabetaf_na_nice; i++)
1889 CXfabetaf_aArray_nice[i] = datafile_xArray[1][i];
1891 aeroDragParts -> storeCommands (*command_line);
1892 CXfabetaf_first=false;
1898 int CXfadef_index, i;
1899 string CXfadef_file;
1901 CXfadef_file = aircraft_directory + linetoken3;
1902 token4 >> CXfadef_index;
1903 if (CXfadef_index < 0 || CXfadef_index >= 30)
1904 uiuc_warnings_errors(1, *command_line);
1905 if (CXfadef_index > CXfadef_nf)
1906 CXfadef_nf = CXfadef_index;
1907 token5 >> flap_value;
1908 CXfadef_fArray[CXfadef_index] = flap_value;
1909 token6 >> token_value_convert1;
1910 token7 >> token_value_convert2;
1911 token8 >> token_value_convert3;
1912 token9 >> CXfadef_nice;
1913 convert_z = uiuc_convert(token_value_convert1);
1914 convert_x = uiuc_convert(token_value_convert2);
1915 convert_y = uiuc_convert(token_value_convert3);
1916 /* call 2D File Reader with file name (CXfadef_file) and
1917 conversion factors; function returns array of
1918 elevator deflections (deArray) and corresponding
1919 alpha (aArray) and delta CZ (CZArray) values and
1920 max number of terms in alpha arrays (nAlphaArray)
1921 and delfection array (nde) */
1922 uiuc_2DdataFileReader(CXfadef_file,
1928 d_2_to_3(datafile_xArray, CXfadef_aArray, CXfadef_index);
1929 d_1_to_2(datafile_yArray, CXfadef_deArray, CXfadef_index);
1930 d_2_to_3(datafile_zArray, CXfadef_CXArray, CXfadef_index);
1931 i_1_to_2(datafile_nxArray, CXfadef_nAlphaArray, CXfadef_index);
1932 CXfadef_nde[CXfadef_index] = datafile_ny;
1933 if (CXfadef_first==true)
1935 if (CXfadef_nice == 1)
1937 CXfadef_na_nice = datafile_nxArray[1];
1938 CXfadef_nde_nice = datafile_ny;
1939 d_1_to_1(datafile_yArray, CXfadef_deArray_nice);
1940 for (i=1; i<=CXfadef_na_nice; i++)
1941 CXfadef_aArray_nice[i] = datafile_xArray[1][i];
1943 aeroDragParts -> storeCommands (*command_line);
1944 CXfadef_first=false;
1950 int CXfaqf_index, i;
1953 CXfaqf_file = aircraft_directory + linetoken3;
1954 token4 >> CXfaqf_index;
1955 if (CXfaqf_index < 0 || CXfaqf_index >= 30)
1956 uiuc_warnings_errors(1, *command_line);
1957 if (CXfaqf_index > CXfaqf_nf)
1958 CXfaqf_nf = CXfaqf_index;
1959 token5 >> flap_value;
1960 CXfaqf_fArray[CXfaqf_index] = flap_value;
1961 token6 >> token_value_convert1;
1962 token7 >> token_value_convert2;
1963 token8 >> token_value_convert3;
1964 token9 >> CXfaqf_nice;
1965 convert_z = uiuc_convert(token_value_convert1);
1966 convert_x = uiuc_convert(token_value_convert2);
1967 convert_y = uiuc_convert(token_value_convert3);
1968 /* call 2D File Reader with file name (CXfaqf_file) and
1969 conversion factors; function returns array of
1970 elevator deflections (deArray) and corresponding
1971 alpha (aArray) and delta CZ (CZArray) values and
1972 max number of terms in alpha arrays (nAlphaArray)
1973 and delfection array (nde) */
1974 uiuc_2DdataFileReader(CXfaqf_file,
1980 d_2_to_3(datafile_xArray, CXfaqf_aArray, CXfaqf_index);
1981 d_1_to_2(datafile_yArray, CXfaqf_qArray, CXfaqf_index);
1982 d_2_to_3(datafile_zArray, CXfaqf_CXArray, CXfaqf_index);
1983 i_1_to_2(datafile_nxArray, CXfaqf_nAlphaArray, CXfaqf_index);
1984 CXfaqf_nq[CXfaqf_index] = datafile_ny;
1985 if (CXfaqf_first==true)
1987 if (CXfaqf_nice == 1)
1989 CXfaqf_na_nice = datafile_nxArray[1];
1990 CXfaqf_nq_nice = datafile_ny;
1991 d_1_to_1(datafile_yArray, CXfaqf_qArray_nice);
1992 for (i=1; i<=CXfaqf_na_nice; i++)
1993 CXfaqf_aArray_nice[i] = datafile_xArray[1][i];
1995 aeroDragParts -> storeCommands (*command_line);
2003 uiuc_warnings_errors(2, *command_line);
2010 void parse_CL( const string& linetoken2, const string& linetoken3,
2011 const string& linetoken4, const string& linetoken5,
2012 const string& linetoken6, const string& linetoken7,
2013 const string& linetoken8, const string& linetoken9,
2014 const string& aircraft_directory,
2015 bool &CZfabetaf_first, bool &CZfadef_first,
2016 bool &CZfaqf_first, LIST command_line ) {
2018 int token_value_convert1, token_value_convert2, token_value_convert3;
2019 double datafile_xArray[100][100], datafile_yArray[100];
2020 double datafile_zArray[100][100];
2021 int datafile_nxArray[100], datafile_ny;
2022 istrstream token3(linetoken3.c_str());
2023 istrstream token4(linetoken4.c_str());
2024 istrstream token5(linetoken5.c_str());
2025 istrstream token6(linetoken6.c_str());
2026 istrstream token7(linetoken7.c_str());
2027 istrstream token8(linetoken8.c_str());
2028 istrstream token9(linetoken9.c_str());
2030 switch(CL_map[linetoken2])
2034 if (check_float(linetoken3))
2035 token3 >> token_value;
2037 uiuc_warnings_errors(1, *command_line);
2041 aeroLiftParts -> storeCommands (*command_line);
2046 if (check_float(linetoken3))
2047 token3 >> token_value;
2049 uiuc_warnings_errors(1, *command_line);
2053 aeroLiftParts -> storeCommands (*command_line);
2058 if (check_float(linetoken3))
2059 token3 >> token_value;
2061 uiuc_warnings_errors(1, *command_line);
2063 CL_adot = token_value;
2064 CL_adot_clean = CL_adot;
2065 aeroLiftParts -> storeCommands (*command_line);
2070 if (check_float(linetoken3))
2071 token3 >> token_value;
2073 uiuc_warnings_errors(1, *command_line);
2077 aeroLiftParts -> storeCommands (*command_line);
2082 if (check_float(linetoken3))
2083 token3 >> token_value;
2085 uiuc_warnings_errors(1, *command_line);
2087 CL_ih = token_value;
2088 aeroLiftParts -> storeCommands (*command_line);
2093 if (check_float(linetoken3))
2094 token3 >> token_value;
2096 uiuc_warnings_errors(1, *command_line);
2098 CL_de = token_value;
2099 CL_de_clean = CL_de;
2100 aeroLiftParts -> storeCommands (*command_line);
2105 CLfa = aircraft_directory + linetoken3;
2106 token4 >> token_value_convert1;
2107 token5 >> token_value_convert2;
2108 convert_y = uiuc_convert(token_value_convert1);
2109 convert_x = uiuc_convert(token_value_convert2);
2110 /* call 1D File Reader with file name (CLfa) and conversion
2111 factors; function returns array of alphas (aArray) and
2112 corresponding CL values (CLArray) and max number of
2113 terms in arrays (nAlpha) */
2114 uiuc_1DdataFileReader(CLfa,
2118 aeroLiftParts -> storeCommands (*command_line);
2123 CLfade = aircraft_directory + linetoken3;
2124 token4 >> token_value_convert1;
2125 token5 >> token_value_convert2;
2126 token6 >> token_value_convert3;
2127 convert_z = uiuc_convert(token_value_convert1);
2128 convert_x = uiuc_convert(token_value_convert2);
2129 convert_y = uiuc_convert(token_value_convert3);
2130 /* call 2D File Reader with file name (CLfade) and
2131 conversion factors; function returns array of
2132 elevator deflections (deArray) and corresponding
2133 alpha (aArray) and delta CL (CLArray) values and
2134 max number of terms in alpha arrays (nAlphaArray)
2135 and deflection array (nde) */
2136 uiuc_2DdataFileReader(CLfade,
2142 aeroLiftParts -> storeCommands (*command_line);
2147 CLfdf = aircraft_directory + linetoken3;
2148 token4 >> token_value_convert1;
2149 token5 >> token_value_convert2;
2150 convert_y = uiuc_convert(token_value_convert1);
2151 convert_x = uiuc_convert(token_value_convert2);
2152 /* call 1D File Reader with file name (CLfdf) and conversion
2153 factors; function returns array of dfs (dfArray) and
2154 corresponding CL values (CLArray) and max number of
2155 terms in arrays (ndf) */
2156 uiuc_1DdataFileReader(CLfdf,
2160 aeroLiftParts -> storeCommands (*command_line);
2162 // additional variables to streamline flap routine in aerodeflections
2164 int temp_counter = 1;
2165 while (temp_counter <= ndf)
2167 dfArray[temp_counter] = CLfdf_dfArray[temp_counter];
2168 TimeArray[temp_counter] = dfTimefdf_TimeArray[temp_counter];
2175 CLfadf = aircraft_directory + linetoken3;
2176 token4 >> token_value_convert1;
2177 token5 >> token_value_convert2;
2178 token6 >> token_value_convert3;
2179 convert_z = uiuc_convert(token_value_convert1);
2180 convert_x = uiuc_convert(token_value_convert2);
2181 convert_y = uiuc_convert(token_value_convert3);
2182 /* call 2D File Reader with file name (CLfadf) and
2183 conversion factors; function returns array of
2184 flap deflections (dfArray) and corresponding
2185 alpha (aArray) and delta CL (CLArray) values and
2186 max number of terms in alpha arrays (nAlphaArray)
2187 and deflection array (ndf) */
2188 uiuc_2DdataFileReader(CLfadf,
2194 aeroLiftParts -> storeCommands (*command_line);
2199 if (check_float(linetoken3))
2200 token3 >> token_value;
2202 uiuc_warnings_errors(1, *command_line);
2206 aeroLiftParts -> storeCommands (*command_line);
2211 if (check_float(linetoken3))
2212 token3 >> token_value;
2214 uiuc_warnings_errors(1, *command_line);
2218 aeroLiftParts -> storeCommands (*command_line);
2223 if (check_float(linetoken3))
2224 token3 >> token_value;
2226 uiuc_warnings_errors(1, *command_line);
2228 CZ_a2 = token_value;
2229 CZ_a2_clean = CZ_a2;
2230 aeroLiftParts -> storeCommands (*command_line);
2235 if (check_float(linetoken3))
2236 token3 >> token_value;
2238 uiuc_warnings_errors(1, *command_line);
2240 CZ_a3 = token_value;
2241 CZ_a3_clean = CZ_a3;
2242 aeroLiftParts -> storeCommands (*command_line);
2247 if (check_float(linetoken3))
2248 token3 >> token_value;
2250 uiuc_warnings_errors(1, *command_line);
2252 CZ_adot = token_value;
2253 CZ_adot_clean = CZ_adot;
2254 aeroLiftParts -> storeCommands (*command_line);
2259 if (check_float(linetoken3))
2260 token3 >> token_value;
2262 uiuc_warnings_errors(1, *command_line);
2266 aeroLiftParts -> storeCommands (*command_line);
2271 if (check_float(linetoken3))
2272 token3 >> token_value;
2274 uiuc_warnings_errors(1, *command_line);
2276 CZ_de = token_value;
2277 CZ_de_clean = CZ_de;
2278 aeroLiftParts -> storeCommands (*command_line);
2283 if (check_float(linetoken3))
2284 token3 >> token_value;
2286 uiuc_warnings_errors(1, *command_line);
2288 CZ_deb2 = token_value;
2289 CZ_deb2_clean = CZ_deb2;
2290 aeroLiftParts -> storeCommands (*command_line);
2295 if (check_float(linetoken3))
2296 token3 >> token_value;
2298 uiuc_warnings_errors(1, *command_line);
2300 CZ_df = token_value;
2301 CZ_df_clean = CZ_df;
2302 aeroLiftParts -> storeCommands (*command_line);
2307 if (check_float(linetoken3))
2308 token3 >> token_value;
2310 uiuc_warnings_errors(1, *command_line);
2312 CZ_adf = token_value;
2313 CZ_adf_clean = CZ_adf;
2314 aeroLiftParts -> storeCommands (*command_line);
2319 CZfa = aircraft_directory + linetoken3;
2320 token4 >> token_value_convert1;
2321 token5 >> token_value_convert2;
2322 convert_y = uiuc_convert(token_value_convert1);
2323 convert_x = uiuc_convert(token_value_convert2);
2324 /* call 1D File Reader with file name (CZfa) and conversion
2325 factors; function returns array of alphas (aArray) and
2326 corresponding CZ values (CZArray) and max number of
2327 terms in arrays (nAlpha) */
2328 uiuc_1DdataFileReader(CZfa,
2332 aeroLiftParts -> storeCommands (*command_line);
2335 case CZfabetaf_flag:
2337 int CZfabetaf_index, i;
2338 string CZfabetaf_file;
2340 CZfabetaf_file = aircraft_directory + linetoken3;
2341 token4 >> CZfabetaf_index;
2342 if (CZfabetaf_index < 0 || CZfabetaf_index >= 30)
2343 uiuc_warnings_errors(1, *command_line);
2344 if (CZfabetaf_index > CZfabetaf_nf)
2345 CZfabetaf_nf = CZfabetaf_index;
2346 token5 >> flap_value;
2347 CZfabetaf_fArray[CZfabetaf_index] = flap_value;
2348 token6 >> token_value_convert1;
2349 token7 >> token_value_convert2;
2350 token8 >> token_value_convert3;
2351 token9 >> CZfabetaf_nice;
2352 convert_z = uiuc_convert(token_value_convert1);
2353 convert_x = uiuc_convert(token_value_convert2);
2354 convert_y = uiuc_convert(token_value_convert3);
2355 /* call 2D File Reader with file name (CZfabetaf_file) and
2356 conversion factors; function returns array of
2357 beta (betaArray) and corresponding
2358 alpha (aArray) and CZ (CZArray) values and
2359 max number of terms in alpha arrays (nAlphaArray)
2360 and beta array (nbeta) */
2361 uiuc_2DdataFileReader(CZfabetaf_file,
2367 d_2_to_3(datafile_xArray, CZfabetaf_aArray, CZfabetaf_index);
2368 d_1_to_2(datafile_yArray, CZfabetaf_betaArray, CZfabetaf_index);
2369 d_2_to_3(datafile_zArray, CZfabetaf_CZArray, CZfabetaf_index);
2370 i_1_to_2(datafile_nxArray, CZfabetaf_nAlphaArray, CZfabetaf_index);
2371 CZfabetaf_nbeta[CZfabetaf_index] = datafile_ny;
2372 if (CZfabetaf_first==true)
2374 if (CZfabetaf_nice == 1)
2376 CZfabetaf_na_nice = datafile_nxArray[1];
2377 CZfabetaf_nb_nice = datafile_ny;
2378 d_1_to_1(datafile_yArray, CZfabetaf_bArray_nice);
2379 for (i=1; i<=CZfabetaf_na_nice; i++)
2380 CZfabetaf_aArray_nice[i] = datafile_xArray[1][i];
2382 aeroLiftParts -> storeCommands (*command_line);
2383 CZfabetaf_first=false;
2389 int CZfadef_index, i;
2390 string CZfadef_file;
2392 CZfadef_file = aircraft_directory + linetoken3;
2393 token4 >> CZfadef_index;
2394 if (CZfadef_index < 0 || CZfadef_index >= 30)
2395 uiuc_warnings_errors(1, *command_line);
2396 if (CZfadef_index > CZfadef_nf)
2397 CZfadef_nf = CZfadef_index;
2398 token5 >> flap_value;
2399 CZfadef_fArray[CZfadef_index] = flap_value;
2400 token6 >> token_value_convert1;
2401 token7 >> token_value_convert2;
2402 token8 >> token_value_convert3;
2403 token9 >> CZfadef_nice;
2404 convert_z = uiuc_convert(token_value_convert1);
2405 convert_x = uiuc_convert(token_value_convert2);
2406 convert_y = uiuc_convert(token_value_convert3);
2407 /* call 2D File Reader with file name (CZfadef_file) and
2408 conversion factors; function returns array of
2409 elevator deflections (deArray) and corresponding
2410 alpha (aArray) and delta CZ (CZArray) values and
2411 max number of terms in alpha arrays (nAlphaArray)
2412 and delfection array (nde) */
2413 uiuc_2DdataFileReader(CZfadef_file,
2419 d_2_to_3(datafile_xArray, CZfadef_aArray, CZfadef_index);
2420 d_1_to_2(datafile_yArray, CZfadef_deArray, CZfadef_index);
2421 d_2_to_3(datafile_zArray, CZfadef_CZArray, CZfadef_index);
2422 i_1_to_2(datafile_nxArray, CZfadef_nAlphaArray, CZfadef_index);
2423 CZfadef_nde[CZfadef_index] = datafile_ny;
2424 if (CZfadef_first==true)
2426 if (CZfadef_nice == 1)
2428 CZfadef_na_nice = datafile_nxArray[1];
2429 CZfadef_nde_nice = datafile_ny;
2430 d_1_to_1(datafile_yArray, CZfadef_deArray_nice);
2431 for (i=1; i<=CZfadef_na_nice; i++)
2432 CZfadef_aArray_nice[i] = datafile_xArray[1][i];
2434 aeroLiftParts -> storeCommands (*command_line);
2435 CZfadef_first=false;
2441 int CZfaqf_index, i;
2444 CZfaqf_file = aircraft_directory + linetoken3;
2445 token4 >> CZfaqf_index;
2446 if (CZfaqf_index < 0 || CZfaqf_index >= 30)
2447 uiuc_warnings_errors(1, *command_line);
2448 if (CZfaqf_index > CZfaqf_nf)
2449 CZfaqf_nf = CZfaqf_index;
2450 token5 >> flap_value;
2451 CZfaqf_fArray[CZfaqf_index] = flap_value;
2452 token6 >> token_value_convert1;
2453 token7 >> token_value_convert2;
2454 token8 >> token_value_convert3;
2455 token9 >> CZfaqf_nice;
2456 convert_z = uiuc_convert(token_value_convert1);
2457 convert_x = uiuc_convert(token_value_convert2);
2458 convert_y = uiuc_convert(token_value_convert3);
2459 /* call 2D File Reader with file name (CZfaqf_file) and
2460 conversion factors; function returns array of
2461 pitch rate (qArray) and corresponding
2462 alpha (aArray) and delta CZ (CZArray) values and
2463 max number of terms in alpha arrays (nAlphaArray)
2464 and pitch rate array (nq) */
2465 uiuc_2DdataFileReader(CZfaqf_file,
2471 d_2_to_3(datafile_xArray, CZfaqf_aArray, CZfaqf_index);
2472 d_1_to_2(datafile_yArray, CZfaqf_qArray, CZfaqf_index);
2473 d_2_to_3(datafile_zArray, CZfaqf_CZArray, CZfaqf_index);
2474 i_1_to_2(datafile_nxArray, CZfaqf_nAlphaArray, CZfaqf_index);
2475 CZfaqf_nq[CZfaqf_index] = datafile_ny;
2476 if (CZfaqf_first==true)
2478 if (CZfaqf_nice == 1)
2480 CZfaqf_na_nice = datafile_nxArray[1];
2481 CZfaqf_nq_nice = datafile_ny;
2482 d_1_to_1(datafile_yArray, CZfaqf_qArray_nice);
2483 for (i=1; i<=CZfaqf_na_nice; i++)
2484 CZfaqf_aArray_nice[i] = datafile_xArray[1][i];
2486 aeroLiftParts -> storeCommands (*command_line);
2494 uiuc_warnings_errors(2, *command_line);
2501 void parse_Cm( const string& linetoken2, const string& linetoken3,
2502 const string& linetoken4, const string& linetoken5,
2503 const string& linetoken6, const string& linetoken7,
2504 const string& linetoken8, const string& linetoken9,
2505 const string& aircraft_directory,
2506 bool &Cmfabetaf_first, bool &Cmfadef_first,
2507 bool &Cmfaqf_first, LIST command_line ) {
2509 int token_value_convert1, token_value_convert2, token_value_convert3;
2510 double datafile_xArray[100][100], datafile_yArray[100];
2511 double datafile_zArray[100][100];
2512 int datafile_nxArray[100], datafile_ny;
2513 istrstream token3(linetoken3.c_str());
2514 istrstream token4(linetoken4.c_str());
2515 istrstream token5(linetoken5.c_str());
2516 istrstream token6(linetoken6.c_str());
2517 istrstream token7(linetoken7.c_str());
2518 istrstream token8(linetoken8.c_str());
2519 istrstream token9(linetoken9.c_str());
2521 switch(Cm_map[linetoken2])
2525 if (check_float(linetoken3))
2526 token3 >> token_value;
2528 uiuc_warnings_errors(1, *command_line);
2532 aeroPitchParts -> storeCommands (*command_line);
2537 if (check_float(linetoken3))
2538 token3 >> token_value;
2540 uiuc_warnings_errors(1, *command_line);
2544 aeroPitchParts -> storeCommands (*command_line);
2549 if (check_float(linetoken3))
2550 token3 >> token_value;
2552 uiuc_warnings_errors(1, *command_line);
2554 Cm_a2 = token_value;
2555 Cm_a2_clean = Cm_a2;
2556 aeroPitchParts -> storeCommands (*command_line);
2561 if (check_float(linetoken3))
2562 token3 >> token_value;
2564 uiuc_warnings_errors(1, *command_line);
2566 Cm_adot = token_value;
2567 Cm_adot_clean = Cm_adot;
2568 aeroPitchParts -> storeCommands (*command_line);
2573 if (check_float(linetoken3))
2574 token3 >> token_value;
2576 uiuc_warnings_errors(1, *command_line);
2580 aeroPitchParts -> storeCommands (*command_line);
2585 if (check_float(linetoken3))
2586 token3 >> token_value;
2588 uiuc_warnings_errors(1, *command_line);
2590 Cm_ih = token_value;
2591 aeroPitchParts -> storeCommands (*command_line);
2596 if (check_float(linetoken3))
2597 token3 >> token_value;
2599 uiuc_warnings_errors(1, *command_line);
2601 Cm_de = token_value;
2602 Cm_de_clean = Cm_de;
2603 aeroPitchParts -> storeCommands (*command_line);
2608 if (check_float(linetoken3))
2609 token3 >> token_value;
2611 uiuc_warnings_errors(1, *command_line);
2613 Cm_b2 = token_value;
2614 Cm_b2_clean = Cm_b2;
2615 aeroPitchParts -> storeCommands (*command_line);
2620 if (check_float(linetoken3))
2621 token3 >> token_value;
2623 uiuc_warnings_errors(1, *command_line);
2627 aeroPitchParts -> storeCommands (*command_line);
2632 if (check_float(linetoken3))
2633 token3 >> token_value;
2635 uiuc_warnings_errors(1, *command_line);
2637 Cm_df = token_value;
2638 Cm_df_clean = Cm_df;
2639 aeroPitchParts -> storeCommands (*command_line);
2644 Cmfa = aircraft_directory + linetoken3;
2645 token4 >> token_value_convert1;
2646 token5 >> token_value_convert2;
2647 convert_y = uiuc_convert(token_value_convert1);
2648 convert_x = uiuc_convert(token_value_convert2);
2649 /* call 1D File Reader with file name (Cmfa) and conversion
2650 factors; function returns array of alphas (aArray) and
2651 corresponding Cm values (CmArray) and max number of
2652 terms in arrays (nAlpha) */
2653 uiuc_1DdataFileReader(Cmfa,
2657 aeroPitchParts -> storeCommands (*command_line);
2662 Cmfade = aircraft_directory + linetoken3;
2663 token4 >> token_value_convert1;
2664 token5 >> token_value_convert2;
2665 token6 >> token_value_convert3;
2666 convert_z = uiuc_convert(token_value_convert1);
2667 convert_x = uiuc_convert(token_value_convert2);
2668 convert_y = uiuc_convert(token_value_convert3);
2669 /* call 2D File Reader with file name (Cmfade) and
2670 conversion factors; function returns array of
2671 elevator deflections (deArray) and corresponding
2672 alpha (aArray) and delta Cm (CmArray) values and
2673 max number of terms in alpha arrays (nAlphaArray)
2674 and deflection array (nde) */
2675 uiuc_2DdataFileReader(Cmfade,
2681 aeroPitchParts -> storeCommands (*command_line);
2686 Cmfdf = aircraft_directory + linetoken3;
2687 token4 >> token_value_convert1;
2688 token5 >> token_value_convert2;
2689 convert_y = uiuc_convert(token_value_convert1);
2690 convert_x = uiuc_convert(token_value_convert2);
2691 /* call 1D File Reader with file name (Cmfdf) and conversion
2692 factors; function returns array of dfs (dfArray) and
2693 corresponding Cm values (CmArray) and max number of
2694 terms in arrays (ndf) */
2695 uiuc_1DdataFileReader(Cmfdf,
2699 aeroPitchParts -> storeCommands (*command_line);
2704 Cmfadf = aircraft_directory + linetoken3;
2705 token4 >> token_value_convert1;
2706 token5 >> token_value_convert2;
2707 token6 >> token_value_convert3;
2708 convert_z = uiuc_convert(token_value_convert1);
2709 convert_x = uiuc_convert(token_value_convert2);
2710 convert_y = uiuc_convert(token_value_convert3);
2711 /* call 2D File Reader with file name (Cmfadf) and
2712 conversion factors; function returns array of
2713 flap deflections (dfArray) and corresponding
2714 alpha (aArray) and delta Cm (CmArray) values and
2715 max number of terms in alpha arrays (nAlphaArray)
2716 and deflection array (ndf) */
2717 uiuc_2DdataFileReader(Cmfadf,
2723 aeroPitchParts -> storeCommands (*command_line);
2726 case Cmfabetaf_flag:
2728 int Cmfabetaf_index, i;
2729 string Cmfabetaf_file;
2731 Cmfabetaf_file = aircraft_directory + linetoken3;
2732 token4 >> Cmfabetaf_index;
2733 if (Cmfabetaf_index < 0 || Cmfabetaf_index >= 30)
2734 uiuc_warnings_errors(1, *command_line);
2735 if (Cmfabetaf_index > Cmfabetaf_nf)
2736 Cmfabetaf_nf = Cmfabetaf_index;
2737 token5 >> flap_value;
2738 Cmfabetaf_fArray[Cmfabetaf_index] = flap_value;
2739 token6 >> token_value_convert1;
2740 token7 >> token_value_convert2;
2741 token8 >> token_value_convert3;
2742 token9 >> Cmfabetaf_nice;
2743 convert_z = uiuc_convert(token_value_convert1);
2744 convert_x = uiuc_convert(token_value_convert2);
2745 convert_y = uiuc_convert(token_value_convert3);
2746 /* call 2D File Reader with file name (Cmfabetaf_file) and
2747 conversion factors; function returns array of
2748 elevator deflections (deArray) and corresponding
2749 alpha (aArray) and delta CZ (CZArray) values and
2750 max number of terms in alpha arrays (nAlphaArray)
2751 and delfection array (nde) */
2752 uiuc_2DdataFileReader(Cmfabetaf_file,
2758 d_2_to_3(datafile_xArray, Cmfabetaf_aArray, Cmfabetaf_index);
2759 d_1_to_2(datafile_yArray, Cmfabetaf_betaArray, Cmfabetaf_index);
2760 d_2_to_3(datafile_zArray, Cmfabetaf_CmArray, Cmfabetaf_index);
2761 i_1_to_2(datafile_nxArray, Cmfabetaf_nAlphaArray, Cmfabetaf_index);
2762 Cmfabetaf_nbeta[Cmfabetaf_index] = datafile_ny;
2763 if (Cmfabetaf_first==true)
2765 if (Cmfabetaf_nice == 1)
2767 Cmfabetaf_na_nice = datafile_nxArray[1];
2768 Cmfabetaf_nb_nice = datafile_ny;
2769 d_1_to_1(datafile_yArray, Cmfabetaf_bArray_nice);
2770 for (i=1; i<=Cmfabetaf_na_nice; i++)
2771 Cmfabetaf_aArray_nice[i] = datafile_xArray[1][i];
2773 aeroPitchParts -> storeCommands (*command_line);
2774 Cmfabetaf_first=false;
2780 int Cmfadef_index, i;
2781 string Cmfadef_file;
2783 Cmfadef_file = aircraft_directory + linetoken3;
2784 token4 >> Cmfadef_index;
2785 if (Cmfadef_index < 0 || Cmfadef_index >= 30)
2786 uiuc_warnings_errors(1, *command_line);
2787 if (Cmfadef_index > Cmfadef_nf)
2788 Cmfadef_nf = Cmfadef_index;
2789 token5 >> flap_value;
2790 Cmfadef_fArray[Cmfadef_index] = flap_value;
2791 token6 >> token_value_convert1;
2792 token7 >> token_value_convert2;
2793 token8 >> token_value_convert3;
2794 token9 >> Cmfadef_nice;
2795 convert_z = uiuc_convert(token_value_convert1);
2796 convert_x = uiuc_convert(token_value_convert2);
2797 convert_y = uiuc_convert(token_value_convert3);
2798 /* call 2D File Reader with file name (Cmfadef_file) and
2799 conversion factors; function returns array of
2800 elevator deflections (deArray) and corresponding
2801 alpha (aArray) and delta CZ (CZArray) values and
2802 max number of terms in alpha arrays (nAlphaArray)
2803 and delfection array (nde) */
2804 uiuc_2DdataFileReader(Cmfadef_file,
2810 d_2_to_3(datafile_xArray, Cmfadef_aArray, Cmfadef_index);
2811 d_1_to_2(datafile_yArray, Cmfadef_deArray, Cmfadef_index);
2812 d_2_to_3(datafile_zArray, Cmfadef_CmArray, Cmfadef_index);
2813 i_1_to_2(datafile_nxArray, Cmfadef_nAlphaArray, Cmfadef_index);
2814 Cmfadef_nde[Cmfadef_index] = datafile_ny;
2815 if (Cmfadef_first==true)
2817 if (Cmfadef_nice == 1)
2819 Cmfadef_na_nice = datafile_nxArray[1];
2820 Cmfadef_nde_nice = datafile_ny;
2821 d_1_to_1(datafile_yArray, Cmfadef_deArray_nice);
2822 for (i=1; i<=Cmfadef_na_nice; i++)
2823 Cmfadef_aArray_nice[i] = datafile_xArray[1][i];
2825 aeroPitchParts -> storeCommands (*command_line);
2826 Cmfadef_first=false;
2832 int Cmfaqf_index, i;
2835 Cmfaqf_file = aircraft_directory + linetoken3;
2836 token4 >> Cmfaqf_index;
2837 if (Cmfaqf_index < 0 || Cmfaqf_index >= 30)
2838 uiuc_warnings_errors(1, *command_line);
2839 if (Cmfaqf_index > Cmfaqf_nf)
2840 Cmfaqf_nf = Cmfaqf_index;
2841 token5 >> flap_value;
2842 Cmfaqf_fArray[Cmfaqf_index] = flap_value;
2843 token6 >> token_value_convert1;
2844 token7 >> token_value_convert2;
2845 token8 >> token_value_convert3;
2846 token9 >> Cmfaqf_nice;
2847 convert_z = uiuc_convert(token_value_convert1);
2848 convert_x = uiuc_convert(token_value_convert2);
2849 convert_y = uiuc_convert(token_value_convert3);
2850 /* call 2D File Reader with file name (Cmfaqf_file) and
2851 conversion factors; function returns array of
2852 elevator deflections (deArray) and corresponding
2853 alpha (aArray) and delta CZ (CZArray) values and
2854 max number of terms in alpha arrays (nAlphaArray)
2855 and delfection array (nde) */
2856 uiuc_2DdataFileReader(Cmfaqf_file,
2862 d_2_to_3(datafile_xArray, Cmfaqf_aArray, Cmfaqf_index);
2863 d_1_to_2(datafile_yArray, Cmfaqf_qArray, Cmfaqf_index);
2864 d_2_to_3(datafile_zArray, Cmfaqf_CmArray, Cmfaqf_index);
2865 i_1_to_2(datafile_nxArray, Cmfaqf_nAlphaArray, Cmfaqf_index);
2866 Cmfaqf_nq[Cmfaqf_index] = datafile_ny;
2867 if (Cmfaqf_first==true)
2869 if (Cmfaqf_nice == 1)
2871 Cmfaqf_na_nice = datafile_nxArray[1];
2872 Cmfaqf_nq_nice = datafile_ny;
2873 d_1_to_1(datafile_yArray, Cmfaqf_qArray_nice);
2874 for (i=1; i<=Cmfaqf_na_nice; i++)
2875 Cmfaqf_aArray_nice[i] = datafile_xArray[1][i];
2877 aeroPitchParts -> storeCommands (*command_line);
2885 uiuc_warnings_errors(2, *command_line);
2892 void parse_CY( const string& linetoken2, const string& linetoken3,
2893 const string& linetoken4, const string& linetoken5,
2894 const string& linetoken6, const string& linetoken7,
2895 const string& linetoken8, const string& linetoken9,
2896 const string& aircraft_directory,
2897 bool &CYfabetaf_first, bool &CYfadaf_first,
2898 bool &CYfadrf_first, bool &CYfapf_first,
2899 bool &CYfarf_first, LIST command_line ) {
2901 int token_value_convert1, token_value_convert2, token_value_convert3;
2902 double datafile_xArray[100][100], datafile_yArray[100];
2903 double datafile_zArray[100][100];
2904 int datafile_nxArray[100], datafile_ny;
2905 istrstream token3(linetoken3.c_str());
2906 istrstream token4(linetoken4.c_str());
2907 istrstream token5(linetoken5.c_str());
2908 istrstream token6(linetoken6.c_str());
2909 istrstream token7(linetoken7.c_str());
2910 istrstream token8(linetoken8.c_str());
2911 istrstream token9(linetoken9.c_str());
2913 switch(CY_map[linetoken2])
2917 if (check_float(linetoken3))
2918 token3 >> token_value;
2920 uiuc_warnings_errors(1, *command_line);
2924 aeroSideforceParts -> storeCommands (*command_line);
2929 if (check_float(linetoken3))
2930 token3 >> token_value;
2932 uiuc_warnings_errors(1, *command_line);
2934 CY_beta = token_value;
2935 CY_beta_clean = CY_beta;
2936 aeroSideforceParts -> storeCommands (*command_line);
2941 if (check_float(linetoken3))
2942 token3 >> token_value;
2944 uiuc_warnings_errors(1, *command_line);
2948 aeroSideforceParts -> storeCommands (*command_line);
2953 if (check_float(linetoken3))
2954 token3 >> token_value;
2956 uiuc_warnings_errors(1, *command_line);
2960 aeroSideforceParts -> storeCommands (*command_line);
2965 if (check_float(linetoken3))
2966 token3 >> token_value;
2968 uiuc_warnings_errors(1, *command_line);
2970 CY_da = token_value;
2971 CY_da_clean = CY_da;
2972 aeroSideforceParts -> storeCommands (*command_line);
2977 if (check_float(linetoken3))
2978 token3 >> token_value;
2980 uiuc_warnings_errors(2, *command_line);
2982 CY_dr = token_value;
2983 CY_dr_clean = CY_dr;
2984 aeroSideforceParts -> storeCommands (*command_line);
2989 if (check_float(linetoken3))
2990 token3 >> token_value;
2992 uiuc_warnings_errors(2, *command_line);
2994 CY_dra = token_value;
2995 CY_dra_clean = CY_dra;
2996 aeroSideforceParts -> storeCommands (*command_line);
3001 if (check_float(linetoken3))
3002 token3 >> token_value;
3004 uiuc_warnings_errors(2, *command_line);
3006 CY_bdot = token_value;
3007 CY_bdot_clean = CY_bdot;
3008 aeroSideforceParts -> storeCommands (*command_line);
3013 CYfada = aircraft_directory + linetoken3;
3014 token4 >> token_value_convert1;
3015 token5 >> token_value_convert2;
3016 token6 >> token_value_convert3;
3017 convert_z = uiuc_convert(token_value_convert1);
3018 convert_x = uiuc_convert(token_value_convert2);
3019 convert_y = uiuc_convert(token_value_convert3);
3020 /* call 2D File Reader with file name (CYfada) and
3021 conversion factors; function returns array of
3022 aileron deflections (daArray) and corresponding
3023 alpha (aArray) and delta CY (CYArray) values and
3024 max number of terms in alpha arrays (nAlphaArray)
3025 and deflection array (nda) */
3026 uiuc_2DdataFileReader(CYfada,
3032 aeroSideforceParts -> storeCommands (*command_line);
3035 case CYfbetadr_flag:
3037 CYfbetadr = aircraft_directory + linetoken3;
3038 token4 >> token_value_convert1;
3039 token5 >> token_value_convert2;
3040 token6 >> token_value_convert3;
3041 convert_z = uiuc_convert(token_value_convert1);
3042 convert_x = uiuc_convert(token_value_convert2);
3043 convert_y = uiuc_convert(token_value_convert3);
3044 /* call 2D File Reader with file name (CYfbetadr) and
3045 conversion factors; function returns array of
3046 rudder deflections (drArray) and corresponding
3047 beta (betaArray) and delta CY (CYArray) values and
3048 max number of terms in beta arrays (nBetaArray)
3049 and deflection array (ndr) */
3050 uiuc_2DdataFileReader(CYfbetadr,
3051 CYfbetadr_betaArray,
3054 CYfbetadr_nBetaArray,
3056 aeroSideforceParts -> storeCommands (*command_line);
3059 case CYfabetaf_flag:
3061 int CYfabetaf_index, i;
3062 string CYfabetaf_file;
3064 CYfabetaf_file = aircraft_directory + linetoken3;
3065 token4 >> CYfabetaf_index;
3066 if (CYfabetaf_index < 0 || CYfabetaf_index >= 30)
3067 uiuc_warnings_errors(1, *command_line);
3068 if (CYfabetaf_index > CYfabetaf_nf)
3069 CYfabetaf_nf = CYfabetaf_index;
3070 token5 >> flap_value;
3071 CYfabetaf_fArray[CYfabetaf_index] = flap_value;
3072 token6 >> token_value_convert1;
3073 token7 >> token_value_convert2;
3074 token8 >> token_value_convert3;
3075 token9 >> CYfabetaf_nice;
3076 convert_z = uiuc_convert(token_value_convert1);
3077 convert_x = uiuc_convert(token_value_convert2);
3078 convert_y = uiuc_convert(token_value_convert3);
3079 /* call 2D File Reader with file name (CYfabetaf_file) and
3080 conversion factors; function returns array of
3081 elevator deflections (deArray) and corresponding
3082 alpha (aArray) and delta CZ (CZArray) values and
3083 max number of terms in alpha arrays (nAlphaArray)
3084 and delfection array (nde) */
3085 uiuc_2DdataFileReader(CYfabetaf_file,
3091 d_2_to_3(datafile_xArray, CYfabetaf_aArray, CYfabetaf_index);
3092 d_1_to_2(datafile_yArray, CYfabetaf_betaArray, CYfabetaf_index);
3093 d_2_to_3(datafile_zArray, CYfabetaf_CYArray, CYfabetaf_index);
3094 i_1_to_2(datafile_nxArray, CYfabetaf_nAlphaArray, CYfabetaf_index);
3095 CYfabetaf_nbeta[CYfabetaf_index] = datafile_ny;
3096 if (CYfabetaf_first==true)
3098 if (CYfabetaf_nice == 1)
3100 CYfabetaf_na_nice = datafile_nxArray[1];
3101 CYfabetaf_nb_nice = datafile_ny;
3102 d_1_to_1(datafile_yArray, CYfabetaf_bArray_nice);
3103 for (i=1; i<=CYfabetaf_na_nice; i++)
3104 CYfabetaf_aArray_nice[i] = datafile_xArray[1][i];
3106 aeroSideforceParts -> storeCommands (*command_line);
3107 CYfabetaf_first=false;
3113 int CYfadaf_index, i;
3114 string CYfadaf_file;
3116 CYfadaf_file = aircraft_directory + linetoken3;
3117 token4 >> CYfadaf_index;
3118 if (CYfadaf_index < 0 || CYfadaf_index >= 30)
3119 uiuc_warnings_errors(1, *command_line);
3120 if (CYfadaf_index > CYfadaf_nf)
3121 CYfadaf_nf = CYfadaf_index;
3122 token5 >> flap_value;
3123 CYfadaf_fArray[CYfadaf_index] = flap_value;
3124 token6 >> token_value_convert1;
3125 token7 >> token_value_convert2;
3126 token8 >> token_value_convert3;
3127 token9 >> CYfadaf_nice;
3128 convert_z = uiuc_convert(token_value_convert1);
3129 convert_x = uiuc_convert(token_value_convert2);
3130 convert_y = uiuc_convert(token_value_convert3);
3131 /* call 2D File Reader with file name (CYfadaf_file) and
3132 conversion factors; function returns array of
3133 elevator deflections (deArray) and corresponding
3134 alpha (aArray) and delta CZ (CZArray) values and
3135 max number of terms in alpha arrays (nAlphaArray)
3136 and delfection array (nde) */
3137 uiuc_2DdataFileReader(CYfadaf_file,
3143 d_2_to_3(datafile_xArray, CYfadaf_aArray, CYfadaf_index);
3144 d_1_to_2(datafile_yArray, CYfadaf_daArray, CYfadaf_index);
3145 d_2_to_3(datafile_zArray, CYfadaf_CYArray, CYfadaf_index);
3146 i_1_to_2(datafile_nxArray, CYfadaf_nAlphaArray, CYfadaf_index);
3147 CYfadaf_nda[CYfadaf_index] = datafile_ny;
3148 if (CYfadaf_first==true)
3150 if (CYfadaf_nice == 1)
3152 CYfadaf_na_nice = datafile_nxArray[1];
3153 CYfadaf_nda_nice = datafile_ny;
3154 d_1_to_1(datafile_yArray, CYfadaf_daArray_nice);
3155 for (i=1; i<=CYfadaf_na_nice; i++)
3156 CYfadaf_aArray_nice[i] = datafile_xArray[1][i];
3158 aeroSideforceParts -> storeCommands (*command_line);
3159 CYfadaf_first=false;
3165 int CYfadrf_index, i;
3166 string CYfadrf_file;
3168 CYfadrf_file = aircraft_directory + linetoken3;
3169 token4 >> CYfadrf_index;
3170 if (CYfadrf_index < 0 || CYfadrf_index >= 30)
3171 uiuc_warnings_errors(1, *command_line);
3172 if (CYfadrf_index > CYfadrf_nf)
3173 CYfadrf_nf = CYfadrf_index;
3174 token5 >> flap_value;
3175 CYfadrf_fArray[CYfadrf_index] = flap_value;
3176 token6 >> token_value_convert1;
3177 token7 >> token_value_convert2;
3178 token8 >> token_value_convert3;
3179 token9 >> CYfadrf_nice;
3180 convert_z = uiuc_convert(token_value_convert1);
3181 convert_x = uiuc_convert(token_value_convert2);
3182 convert_y = uiuc_convert(token_value_convert3);
3183 /* call 2D File Reader with file name (CYfadrf_file) and
3184 conversion factors; function returns array of
3185 elevator deflections (deArray) and corresponding
3186 alpha (aArray) and delta CZ (CZArray) values and
3187 max number of terms in alpha arrays (nAlphaArray)
3188 and delfection array (nde) */
3189 uiuc_2DdataFileReader(CYfadrf_file,
3195 d_2_to_3(datafile_xArray, CYfadrf_aArray, CYfadrf_index);
3196 d_1_to_2(datafile_yArray, CYfadrf_drArray, CYfadrf_index);
3197 d_2_to_3(datafile_zArray, CYfadrf_CYArray, CYfadrf_index);
3198 i_1_to_2(datafile_nxArray, CYfadrf_nAlphaArray, CYfadrf_index);
3199 CYfadrf_ndr[CYfadrf_index] = datafile_ny;
3200 if (CYfadrf_first==true)
3202 if (CYfadrf_nice == 1)
3204 CYfadrf_na_nice = datafile_nxArray[1];
3205 CYfadrf_ndr_nice = datafile_ny;
3206 d_1_to_1(datafile_yArray, CYfadrf_drArray_nice);
3207 for (i=1; i<=CYfadrf_na_nice; i++)
3208 CYfadrf_aArray_nice[i] = datafile_xArray[1][i];
3210 aeroSideforceParts -> storeCommands (*command_line);
3211 CYfadrf_first=false;
3217 int CYfapf_index, i;
3220 CYfapf_file = aircraft_directory + linetoken3;
3221 token4 >> CYfapf_index;
3222 if (CYfapf_index < 0 || CYfapf_index >= 30)
3223 uiuc_warnings_errors(1, *command_line);
3224 if (CYfapf_index > CYfapf_nf)
3225 CYfapf_nf = CYfapf_index;
3226 token5 >> flap_value;
3227 CYfapf_fArray[CYfapf_index] = flap_value;
3228 token6 >> token_value_convert1;
3229 token7 >> token_value_convert2;
3230 token8 >> token_value_convert3;
3231 token9 >> CYfapf_nice;
3232 convert_z = uiuc_convert(token_value_convert1);
3233 convert_x = uiuc_convert(token_value_convert2);
3234 convert_y = uiuc_convert(token_value_convert3);
3235 /* call 2D File Reader with file name (CYfapf_file) and
3236 conversion factors; function returns array of
3237 elevator deflections (deArray) and corresponding
3238 alpha (aArray) and delta CZ (CZArray) values and
3239 max number of terms in alpha arrays (nAlphaArray)
3240 and delfection array (nde) */
3241 uiuc_2DdataFileReader(CYfapf_file,
3247 d_2_to_3(datafile_xArray, CYfapf_aArray, CYfapf_index);
3248 d_1_to_2(datafile_yArray, CYfapf_pArray, CYfapf_index);
3249 d_2_to_3(datafile_zArray, CYfapf_CYArray, CYfapf_index);
3250 i_1_to_2(datafile_nxArray, CYfapf_nAlphaArray, CYfapf_index);
3251 CYfapf_np[CYfapf_index] = datafile_ny;
3252 if (CYfapf_first==true)
3254 if (CYfapf_nice == 1)
3256 CYfapf_na_nice = datafile_nxArray[1];
3257 CYfapf_np_nice = datafile_ny;
3258 d_1_to_1(datafile_yArray, CYfapf_pArray_nice);
3259 for (i=1; i<=CYfapf_na_nice; i++)
3260 CYfapf_aArray_nice[i] = datafile_xArray[1][i];
3262 aeroSideforceParts -> storeCommands (*command_line);
3269 int CYfarf_index, i;
3272 CYfarf_file = aircraft_directory + linetoken3;
3273 token4 >> CYfarf_index;
3274 if (CYfarf_index < 0 || CYfarf_index >= 30)
3275 uiuc_warnings_errors(1, *command_line);
3276 if (CYfarf_index > CYfarf_nf)
3277 CYfarf_nf = CYfarf_index;
3278 token5 >> flap_value;
3279 CYfarf_fArray[CYfarf_index] = flap_value;
3280 token6 >> token_value_convert1;
3281 token7 >> token_value_convert2;
3282 token8 >> token_value_convert3;
3283 token9 >> CYfarf_nice;
3284 convert_z = uiuc_convert(token_value_convert1);
3285 convert_x = uiuc_convert(token_value_convert2);
3286 convert_y = uiuc_convert(token_value_convert3);
3287 /* call 2D File Reader with file name (CYfarf_file) and
3288 conversion factors; function returns array of
3289 elevator deflections (deArray) and corresponding
3290 alpha (aArray) and delta CZ (CZArray) values and
3291 max number of terms in alpha arrays (nAlphaArray)
3292 and delfection array (nde) */
3293 uiuc_2DdataFileReader(CYfarf_file,
3299 d_2_to_3(datafile_xArray, CYfarf_aArray, CYfarf_index);
3300 d_1_to_2(datafile_yArray, CYfarf_rArray, CYfarf_index);
3301 d_2_to_3(datafile_zArray, CYfarf_CYArray, CYfarf_index);
3302 i_1_to_2(datafile_nxArray, CYfarf_nAlphaArray, CYfarf_index);
3303 CYfarf_nr[CYfarf_index] = datafile_ny;
3304 if (CYfarf_first==true)
3306 if (CYfarf_nice == 1)
3308 CYfarf_na_nice = datafile_nxArray[1];
3309 CYfarf_nr_nice = datafile_ny;
3310 d_1_to_1(datafile_yArray, CYfarf_rArray_nice);
3311 for (i=1; i<=CYfarf_na_nice; i++)
3312 CYfarf_aArray_nice[i] = datafile_xArray[1][i];
3314 aeroSideforceParts -> storeCommands (*command_line);
3322 uiuc_warnings_errors(2, *command_line);
3328 void parse_Cl( const string& linetoken2, const string& linetoken3,
3329 const string& linetoken4, const string& linetoken5,
3330 const string& linetoken6, const string& linetoken7,
3331 const string& linetoken8, const string& linetoken9,
3332 const string& aircraft_directory,
3333 bool &Clfabetaf_first, bool &Clfadaf_first,
3334 bool &Clfadrf_first, bool &Clfapf_first,
3335 bool &Clfarf_first, LIST command_line ) {
3337 int token_value_convert1, token_value_convert2, token_value_convert3;
3338 double datafile_xArray[100][100], datafile_yArray[100];
3339 double datafile_zArray[100][100];
3340 int datafile_nxArray[100], datafile_ny;
3341 istrstream token3(linetoken3.c_str());
3342 istrstream token4(linetoken4.c_str());
3343 istrstream token5(linetoken5.c_str());
3344 istrstream token6(linetoken6.c_str());
3345 istrstream token7(linetoken7.c_str());
3346 istrstream token8(linetoken8.c_str());
3347 istrstream token9(linetoken9.c_str());
3349 switch(Cl_map[linetoken2])
3353 if (check_float(linetoken3))
3354 token3 >> token_value;
3356 uiuc_warnings_errors(1, *command_line);
3360 aeroRollParts -> storeCommands (*command_line);
3365 if (check_float(linetoken3))
3366 token3 >> token_value;
3368 uiuc_warnings_errors(1, *command_line);
3370 Cl_beta = token_value;
3371 Cl_beta_clean = Cl_beta;
3372 aeroRollParts -> storeCommands (*command_line);
3377 if (check_float(linetoken3))
3378 token3 >> token_value;
3380 uiuc_warnings_errors(1, *command_line);
3384 aeroRollParts -> storeCommands (*command_line);
3389 if (check_float(linetoken3))
3390 token3 >> token_value;
3392 uiuc_warnings_errors(1, *command_line);
3396 aeroRollParts -> storeCommands (*command_line);
3401 if (check_float(linetoken3))
3402 token3 >> token_value;
3404 uiuc_warnings_errors(1, *command_line);
3406 Cl_da = token_value;
3407 Cl_da_clean = Cl_da;
3408 aeroRollParts -> storeCommands (*command_line);
3413 if (check_float(linetoken3))
3414 token3 >> token_value;
3416 uiuc_warnings_errors(1, *command_line);
3418 Cl_dr = token_value;
3419 Cl_dr_clean = Cl_dr;
3420 aeroRollParts -> storeCommands (*command_line);
3425 if (check_float(linetoken3))
3426 token3 >> token_value;
3428 uiuc_warnings_errors(1, *command_line);
3430 Cl_daa = token_value;
3431 Cl_daa_clean = Cl_daa;
3432 aeroRollParts -> storeCommands (*command_line);
3437 Clfada = aircraft_directory + linetoken3;
3438 token4 >> token_value_convert1;
3439 token5 >> token_value_convert2;
3440 token6 >> token_value_convert3;
3441 convert_z = uiuc_convert(token_value_convert1);
3442 convert_x = uiuc_convert(token_value_convert2);
3443 convert_y = uiuc_convert(token_value_convert3);
3444 /* call 2D File Reader with file name (Clfada) and
3445 conversion factors; function returns array of
3446 aileron deflections (daArray) and corresponding
3447 alpha (aArray) and delta Cl (ClArray) values and
3448 max number of terms in alpha arrays (nAlphaArray)
3449 and deflection array (nda) */
3450 uiuc_2DdataFileReader(Clfada,
3456 aeroRollParts -> storeCommands (*command_line);
3459 case Clfbetadr_flag:
3461 Clfbetadr = aircraft_directory + linetoken3;
3462 token4 >> token_value_convert1;
3463 token5 >> token_value_convert2;
3464 token6 >> token_value_convert3;
3465 convert_z = uiuc_convert(token_value_convert1);
3466 convert_x = uiuc_convert(token_value_convert2);
3467 convert_y = uiuc_convert(token_value_convert3);
3468 /* call 2D File Reader with file name (Clfbetadr) and
3469 conversion factors; function returns array of
3470 rudder deflections (drArray) and corresponding
3471 beta (betaArray) and delta Cl (ClArray) values and
3472 max number of terms in beta arrays (nBetaArray)
3473 and deflection array (ndr) */
3474 uiuc_2DdataFileReader(Clfbetadr,
3475 Clfbetadr_betaArray,
3478 Clfbetadr_nBetaArray,
3480 aeroRollParts -> storeCommands (*command_line);
3483 case Clfabetaf_flag:
3485 int Clfabetaf_index, i;
3486 string Clfabetaf_file;
3488 Clfabetaf_file = aircraft_directory + linetoken3;
3489 token4 >> Clfabetaf_index;
3490 if (Clfabetaf_index < 0 || Clfabetaf_index >= 100)
3491 uiuc_warnings_errors(1, *command_line);
3492 if (Clfabetaf_index > Clfabetaf_nf)
3493 Clfabetaf_nf = Clfabetaf_index;
3494 token5 >> flap_value;
3495 Clfabetaf_fArray[Clfabetaf_index] = flap_value;
3496 token6 >> token_value_convert1;
3497 token7 >> token_value_convert2;
3498 token8 >> token_value_convert3;
3499 token9 >> Clfabetaf_nice;
3500 convert_z = uiuc_convert(token_value_convert1);
3501 convert_x = uiuc_convert(token_value_convert2);
3502 convert_y = uiuc_convert(token_value_convert3);
3503 /* call 2D File Reader with file name (Clfabetaf_file) and
3504 conversion factors; function returns array of
3505 elevator deflections (deArray) and corresponding
3506 alpha (aArray) and delta CZ (CZArray) values and
3507 max number of terms in alpha arrays (nAlphaArray)
3508 and delfection array (nde) */
3509 uiuc_2DdataFileReader(Clfabetaf_file,
3515 d_2_to_3(datafile_xArray, Clfabetaf_aArray, Clfabetaf_index);
3516 d_1_to_2(datafile_yArray, Clfabetaf_betaArray, Clfabetaf_index);
3517 d_2_to_3(datafile_zArray, Clfabetaf_ClArray, Clfabetaf_index);
3518 i_1_to_2(datafile_nxArray, Clfabetaf_nAlphaArray, Clfabetaf_index);
3519 Clfabetaf_nbeta[Clfabetaf_index] = datafile_ny;
3520 if (Clfabetaf_first==true)
3522 if (Clfabetaf_nice == 1)
3524 Clfabetaf_na_nice = datafile_nxArray[1];
3525 Clfabetaf_nb_nice = datafile_ny;
3526 d_1_to_1(datafile_yArray, Clfabetaf_bArray_nice);
3527 for (i=1; i<=Clfabetaf_na_nice; i++)
3528 Clfabetaf_aArray_nice[i] = datafile_xArray[1][i];
3530 aeroRollParts -> storeCommands (*command_line);
3531 Clfabetaf_first=false;
3537 int Clfadaf_index, i;
3538 string Clfadaf_file;
3540 Clfadaf_file = aircraft_directory + linetoken3;
3541 token4 >> Clfadaf_index;
3542 if (Clfadaf_index < 0 || Clfadaf_index >= 100)
3543 uiuc_warnings_errors(1, *command_line);
3544 if (Clfadaf_index > Clfadaf_nf)
3545 Clfadaf_nf = Clfadaf_index;
3546 token5 >> flap_value;
3547 Clfadaf_fArray[Clfadaf_index] = flap_value;
3548 token6 >> token_value_convert1;
3549 token7 >> token_value_convert2;
3550 token8 >> token_value_convert3;
3551 token9 >> Clfadaf_nice;
3552 convert_z = uiuc_convert(token_value_convert1);
3553 convert_x = uiuc_convert(token_value_convert2);
3554 convert_y = uiuc_convert(token_value_convert3);
3555 /* call 2D File Reader with file name (Clfadaf_file) and
3556 conversion factors; function returns array of
3557 elevator deflections (deArray) and corresponding
3558 alpha (aArray) and delta CZ (CZArray) values and
3559 max number of terms in alpha arrays (nAlphaArray)
3560 and delfection array (nde) */
3561 uiuc_2DdataFileReader(Clfadaf_file,
3567 d_2_to_3(datafile_xArray, Clfadaf_aArray, Clfadaf_index);
3568 d_1_to_2(datafile_yArray, Clfadaf_daArray, Clfadaf_index);
3569 d_2_to_3(datafile_zArray, Clfadaf_ClArray, Clfadaf_index);
3570 i_1_to_2(datafile_nxArray, Clfadaf_nAlphaArray, Clfadaf_index);
3571 Clfadaf_nda[Clfadaf_index] = datafile_ny;
3572 if (Clfadaf_first==true)
3574 if (Clfadaf_nice == 1)
3576 Clfadaf_na_nice = datafile_nxArray[1];
3577 Clfadaf_nda_nice = datafile_ny;
3578 d_1_to_1(datafile_yArray, Clfadaf_daArray_nice);
3579 for (i=1; i<=Clfadaf_na_nice; i++)
3580 Clfadaf_aArray_nice[i] = datafile_xArray[1][i];
3582 aeroRollParts -> storeCommands (*command_line);
3583 Clfadaf_first=false;
3589 int Clfadrf_index, i;
3590 string Clfadrf_file;
3592 Clfadrf_file = aircraft_directory + linetoken3;
3593 token4 >> Clfadrf_index;
3594 if (Clfadrf_index < 0 || Clfadrf_index >= 100)
3595 uiuc_warnings_errors(1, *command_line);
3596 if (Clfadrf_index > Clfadrf_nf)
3597 Clfadrf_nf = Clfadrf_index;
3598 token5 >> flap_value;
3599 Clfadrf_fArray[Clfadrf_index] = flap_value;
3600 token6 >> token_value_convert1;
3601 token7 >> token_value_convert2;
3602 token8 >> token_value_convert3;
3603 token9 >> Clfadrf_nice;
3604 convert_z = uiuc_convert(token_value_convert1);
3605 convert_x = uiuc_convert(token_value_convert2);
3606 convert_y = uiuc_convert(token_value_convert3);
3607 /* call 2D File Reader with file name (Clfadrf_file) and
3608 conversion factors; function returns array of
3609 elevator deflections (deArray) and corresponding
3610 alpha (aArray) and delta CZ (CZArray) values and
3611 max number of terms in alpha arrays (nAlphaArray)
3612 and delfection array (nde) */
3613 uiuc_2DdataFileReader(Clfadrf_file,
3619 d_2_to_3(datafile_xArray, Clfadrf_aArray, Clfadrf_index);
3620 d_1_to_2(datafile_yArray, Clfadrf_drArray, Clfadrf_index);
3621 d_2_to_3(datafile_zArray, Clfadrf_ClArray, Clfadrf_index);
3622 i_1_to_2(datafile_nxArray, Clfadrf_nAlphaArray, Clfadrf_index);
3623 Clfadrf_ndr[Clfadrf_index] = datafile_ny;
3624 if (Clfadrf_first==true)
3626 if (Clfadrf_nice == 1)
3628 Clfadrf_na_nice = datafile_nxArray[1];
3629 Clfadrf_ndr_nice = datafile_ny;
3630 d_1_to_1(datafile_yArray, Clfadrf_drArray_nice);
3631 for (i=1; i<=Clfadrf_na_nice; i++)
3632 Clfadrf_aArray_nice[i] = datafile_xArray[1][i];
3634 aeroRollParts -> storeCommands (*command_line);
3635 Clfadrf_first=false;
3641 int Clfapf_index, i;
3644 Clfapf_file = aircraft_directory + linetoken3;
3645 token4 >> Clfapf_index;
3646 if (Clfapf_index < 0 || Clfapf_index >= 100)
3647 uiuc_warnings_errors(1, *command_line);
3648 if (Clfapf_index > Clfapf_nf)
3649 Clfapf_nf = Clfapf_index;
3650 token5 >> flap_value;
3651 Clfapf_fArray[Clfapf_index] = flap_value;
3652 token6 >> token_value_convert1;
3653 token7 >> token_value_convert2;
3654 token8 >> token_value_convert3;
3655 token9 >> Clfapf_nice;
3656 convert_z = uiuc_convert(token_value_convert1);
3657 convert_x = uiuc_convert(token_value_convert2);
3658 convert_y = uiuc_convert(token_value_convert3);
3659 /* call 2D File Reader with file name (Clfapf_file) and
3660 conversion factors; function returns array of
3661 elevator deflections (deArray) and corresponding
3662 alpha (aArray) and delta CZ (CZArray) values and
3663 max number of terms in alpha arrays (nAlphaArray)
3664 and delfection array (nde) */
3665 uiuc_2DdataFileReader(Clfapf_file,
3671 d_2_to_3(datafile_xArray, Clfapf_aArray, Clfapf_index);
3672 d_1_to_2(datafile_yArray, Clfapf_pArray, Clfapf_index);
3673 d_2_to_3(datafile_zArray, Clfapf_ClArray, Clfapf_index);
3674 i_1_to_2(datafile_nxArray, Clfapf_nAlphaArray, Clfapf_index);
3675 Clfapf_np[Clfapf_index] = datafile_ny;
3676 if (Clfapf_first==true)
3678 if (Clfapf_nice == 1)
3680 Clfapf_na_nice = datafile_nxArray[1];
3681 Clfapf_np_nice = datafile_ny;
3682 d_1_to_1(datafile_yArray, Clfapf_pArray_nice);
3683 for (i=1; i<=Clfapf_na_nice; i++)
3684 Clfapf_aArray_nice[i] = datafile_xArray[1][i];
3686 aeroRollParts -> storeCommands (*command_line);
3693 int Clfarf_index, i;
3696 Clfarf_file = aircraft_directory + linetoken3;
3697 token4 >> Clfarf_index;
3698 if (Clfarf_index < 0 || Clfarf_index >= 100)
3699 uiuc_warnings_errors(1, *command_line);
3700 if (Clfarf_index > Clfarf_nf)
3701 Clfarf_nf = Clfarf_index;
3702 token5 >> flap_value;
3703 Clfarf_fArray[Clfarf_index] = flap_value;
3704 token6 >> token_value_convert1;
3705 token7 >> token_value_convert2;
3706 token8 >> token_value_convert3;
3707 token9 >> Clfarf_nice;
3708 convert_z = uiuc_convert(token_value_convert1);
3709 convert_x = uiuc_convert(token_value_convert2);
3710 convert_y = uiuc_convert(token_value_convert3);
3711 /* call 2D File Reader with file name (Clfarf_file) and
3712 conversion factors; function returns array of
3713 elevator deflections (deArray) and corresponding
3714 alpha (aArray) and delta CZ (CZArray) values and
3715 max number of terms in alpha arrays (nAlphaArray)
3716 and delfection array (nde) */
3717 uiuc_2DdataFileReader(Clfarf_file,
3723 d_2_to_3(datafile_xArray, Clfarf_aArray, Clfarf_index);
3724 d_1_to_2(datafile_yArray, Clfarf_rArray, Clfarf_index);
3725 d_2_to_3(datafile_zArray, Clfarf_ClArray, Clfarf_index);
3726 i_1_to_2(datafile_nxArray, Clfarf_nAlphaArray, Clfarf_index);
3727 Clfarf_nr[Clfarf_index] = datafile_ny;
3728 if (Clfarf_first==true)
3730 if (Clfarf_nice == 1)
3732 Clfarf_na_nice = datafile_nxArray[1];
3733 Clfarf_nr_nice = datafile_ny;
3734 d_1_to_1(datafile_yArray, Clfarf_rArray_nice);
3735 for (i=1; i<=Clfarf_na_nice; i++)
3736 Clfarf_aArray_nice[i] = datafile_xArray[1][i];
3738 aeroRollParts -> storeCommands (*command_line);
3746 uiuc_warnings_errors(2, *command_line);
3753 void parse_Cn( const string& linetoken2, const string& linetoken3,
3754 const string& linetoken4, const string& linetoken5,
3755 const string& linetoken6, const string& linetoken7,
3756 const string& linetoken8, const string& linetoken9,
3757 const string& aircraft_directory,
3758 bool &Cnfabetaf_first, bool &Cnfadaf_first,
3759 bool &Cnfadrf_first, bool &Cnfapf_first,
3760 bool &Cnfarf_first, LIST command_line ) {
3762 int token_value_convert1, token_value_convert2, token_value_convert3;
3763 double datafile_xArray[100][100], datafile_yArray[100];
3764 double datafile_zArray[100][100];
3765 int datafile_nxArray[100], datafile_ny;
3766 istrstream token3(linetoken3.c_str());
3767 istrstream token4(linetoken4.c_str());
3768 istrstream token5(linetoken5.c_str());
3769 istrstream token6(linetoken6.c_str());
3770 istrstream token7(linetoken7.c_str());
3771 istrstream token8(linetoken8.c_str());
3772 istrstream token9(linetoken9.c_str());
3774 switch(Cn_map[linetoken2])
3778 if (check_float(linetoken3))
3779 token3 >> token_value;
3781 uiuc_warnings_errors(1, *command_line);
3785 aeroYawParts -> storeCommands (*command_line);
3790 if (check_float(linetoken3))
3791 token3 >> token_value;
3793 uiuc_warnings_errors(1, *command_line);
3795 Cn_beta = token_value;
3796 Cn_beta_clean = Cn_beta;
3797 aeroYawParts -> storeCommands (*command_line);
3802 if (check_float(linetoken3))
3803 token3 >> token_value;
3805 uiuc_warnings_errors(1, *command_line);
3809 aeroYawParts -> storeCommands (*command_line);
3814 if (check_float(linetoken3))
3815 token3 >> token_value;
3817 uiuc_warnings_errors(1, *command_line);
3821 aeroYawParts -> storeCommands (*command_line);
3826 if (check_float(linetoken3))
3827 token3 >> token_value;
3829 uiuc_warnings_errors(1, *command_line);
3831 Cn_da = token_value;
3832 Cn_da_clean = Cn_da;
3833 aeroYawParts -> storeCommands (*command_line);
3838 if (check_float(linetoken3))
3839 token3 >> token_value;
3841 uiuc_warnings_errors(1, *command_line);
3843 Cn_dr = token_value;
3844 Cn_dr_clean = Cn_dr;
3845 aeroYawParts -> storeCommands (*command_line);
3850 if (check_float(linetoken3))
3851 token3 >> token_value;
3853 uiuc_warnings_errors(1, *command_line);
3857 aeroYawParts -> storeCommands (*command_line);
3862 if (check_float(linetoken3))
3863 token3 >> token_value;
3865 uiuc_warnings_errors(1, *command_line);
3867 Cn_b3 = token_value;
3868 Cn_b3_clean = Cn_b3;
3869 aeroYawParts -> storeCommands (*command_line);
3874 Cnfada = aircraft_directory + linetoken3;
3875 token4 >> token_value_convert1;
3876 token5 >> token_value_convert2;
3877 token6 >> token_value_convert3;
3878 convert_z = uiuc_convert(token_value_convert1);
3879 convert_x = uiuc_convert(token_value_convert2);
3880 convert_y = uiuc_convert(token_value_convert3);
3881 /* call 2D File Reader with file name (Cnfada) and
3882 conversion factors; function returns array of
3883 aileron deflections (daArray) and corresponding
3884 alpha (aArray) and delta Cn (CnArray) values and
3885 max number of terms in alpha arrays (nAlphaArray)
3886 and deflection array (nda) */
3887 uiuc_2DdataFileReader(Cnfada,
3893 aeroYawParts -> storeCommands (*command_line);
3896 case Cnfbetadr_flag:
3898 Cnfbetadr = aircraft_directory + linetoken3;
3899 token4 >> token_value_convert1;
3900 token5 >> token_value_convert2;
3901 token6 >> token_value_convert3;
3902 convert_z = uiuc_convert(token_value_convert1);
3903 convert_x = uiuc_convert(token_value_convert2);
3904 convert_y = uiuc_convert(token_value_convert3);
3905 /* call 2D File Reader with file name (Cnfbetadr) and
3906 conversion factors; function returns array of
3907 rudder deflections (drArray) and corresponding
3908 beta (betaArray) and delta Cn (CnArray) values and
3909 max number of terms in beta arrays (nBetaArray)
3910 and deflection array (ndr) */
3911 uiuc_2DdataFileReader(Cnfbetadr,
3912 Cnfbetadr_betaArray,
3915 Cnfbetadr_nBetaArray,
3917 aeroYawParts -> storeCommands (*command_line);
3920 case Cnfabetaf_flag:
3922 int Cnfabetaf_index, i;
3923 string Cnfabetaf_file;
3925 Cnfabetaf_file = aircraft_directory + linetoken3;
3926 token4 >> Cnfabetaf_index;
3927 if (Cnfabetaf_index < 0 || Cnfabetaf_index >= 100)
3928 uiuc_warnings_errors(1, *command_line);
3929 if (Cnfabetaf_index > Cnfabetaf_nf)
3930 Cnfabetaf_nf = Cnfabetaf_index;
3931 token5 >> flap_value;
3932 Cnfabetaf_fArray[Cnfabetaf_index] = flap_value;
3933 token6 >> token_value_convert1;
3934 token7 >> token_value_convert2;
3935 token8 >> token_value_convert3;
3936 token9 >> Cnfabetaf_nice;
3937 convert_z = uiuc_convert(token_value_convert1);
3938 convert_x = uiuc_convert(token_value_convert2);
3939 convert_y = uiuc_convert(token_value_convert3);
3940 /* call 2D File Reader with file name (Cnfabetaf_file) and
3941 conversion factors; function returns array of
3942 elevator deflections (deArray) and corresponding
3943 alpha (aArray) and delta CZ (CZArray) values and
3944 max number of terms in alpha arrays (nAlphaArray)
3945 and delfection array (nde) */
3946 uiuc_2DdataFileReader(Cnfabetaf_file,
3952 d_2_to_3(datafile_xArray, Cnfabetaf_aArray, Cnfabetaf_index);
3953 d_1_to_2(datafile_yArray, Cnfabetaf_betaArray, Cnfabetaf_index);
3954 d_2_to_3(datafile_zArray, Cnfabetaf_CnArray, Cnfabetaf_index);
3955 i_1_to_2(datafile_nxArray, Cnfabetaf_nAlphaArray, Cnfabetaf_index);
3956 Cnfabetaf_nbeta[Cnfabetaf_index] = datafile_ny;
3957 if (Cnfabetaf_first==true)
3959 if (Cnfabetaf_nice == 1)
3961 Cnfabetaf_na_nice = datafile_nxArray[1];
3962 Cnfabetaf_nb_nice = datafile_ny;
3963 d_1_to_1(datafile_yArray, Cnfabetaf_bArray_nice);
3964 for (i=1; i<=Cnfabetaf_na_nice; i++)
3965 Cnfabetaf_aArray_nice[i] = datafile_xArray[1][i];
3967 aeroYawParts -> storeCommands (*command_line);
3968 Cnfabetaf_first=false;
3974 int Cnfadaf_index, i;
3975 string Cnfadaf_file;
3977 Cnfadaf_file = aircraft_directory + linetoken3;
3978 token4 >> Cnfadaf_index;
3979 if (Cnfadaf_index < 0 || Cnfadaf_index >= 100)
3980 uiuc_warnings_errors(1, *command_line);
3981 if (Cnfadaf_index > Cnfadaf_nf)
3982 Cnfadaf_nf = Cnfadaf_index;
3983 token5 >> flap_value;
3984 Cnfadaf_fArray[Cnfadaf_index] = flap_value;
3985 token6 >> token_value_convert1;
3986 token7 >> token_value_convert2;
3987 token8 >> token_value_convert3;
3988 token9 >> Cnfadaf_nice;
3989 convert_z = uiuc_convert(token_value_convert1);
3990 convert_x = uiuc_convert(token_value_convert2);
3991 convert_y = uiuc_convert(token_value_convert3);
3992 /* call 2D File Reader with file name (Cnfadaf_file) and
3993 conversion factors; function returns array of
3994 elevator deflections (deArray) and corresponding
3995 alpha (aArray) and delta CZ (CZArray) values and
3996 max number of terms in alpha arrays (nAlphaArray)
3997 and delfection array (nde) */
3998 uiuc_2DdataFileReader(Cnfadaf_file,
4004 d_2_to_3(datafile_xArray, Cnfadaf_aArray, Cnfadaf_index);
4005 d_1_to_2(datafile_yArray, Cnfadaf_daArray, Cnfadaf_index);
4006 d_2_to_3(datafile_zArray, Cnfadaf_CnArray, Cnfadaf_index);
4007 i_1_to_2(datafile_nxArray, Cnfadaf_nAlphaArray, Cnfadaf_index);
4008 Cnfadaf_nda[Cnfadaf_index] = datafile_ny;
4009 if (Cnfadaf_first==true)
4011 if (Cnfadaf_nice == 1)
4013 Cnfadaf_na_nice = datafile_nxArray[1];
4014 Cnfadaf_nda_nice = datafile_ny;
4015 d_1_to_1(datafile_yArray, Cnfadaf_daArray_nice);
4016 for (i=1; i<=Cnfadaf_na_nice; i++)
4017 Cnfadaf_aArray_nice[i] = datafile_xArray[1][i];
4019 aeroYawParts -> storeCommands (*command_line);
4020 Cnfadaf_first=false;
4026 int Cnfadrf_index, i;
4027 string Cnfadrf_file;
4029 Cnfadrf_file = aircraft_directory + linetoken3;
4030 token4 >> Cnfadrf_index;
4031 if (Cnfadrf_index < 0 || Cnfadrf_index >= 100)
4032 uiuc_warnings_errors(1, *command_line);
4033 if (Cnfadrf_index > Cnfadrf_nf)
4034 Cnfadrf_nf = Cnfadrf_index;
4035 token5 >> flap_value;
4036 Cnfadrf_fArray[Cnfadrf_index] = flap_value;
4037 token6 >> token_value_convert1;
4038 token7 >> token_value_convert2;
4039 token8 >> token_value_convert3;
4040 token9 >> Cnfadrf_nice;
4041 convert_z = uiuc_convert(token_value_convert1);
4042 convert_x = uiuc_convert(token_value_convert2);
4043 convert_y = uiuc_convert(token_value_convert3);
4044 /* call 2D File Reader with file name (Cnfadrf_file) and
4045 conversion factors; function returns array of
4046 elevator deflections (deArray) and corresponding
4047 alpha (aArray) and delta CZ (CZArray) values and
4048 max number of terms in alpha arrays (nAlphaArray)
4049 and delfection array (nde) */
4050 uiuc_2DdataFileReader(Cnfadrf_file,
4056 d_2_to_3(datafile_xArray, Cnfadrf_aArray, Cnfadrf_index);
4057 d_1_to_2(datafile_yArray, Cnfadrf_drArray, Cnfadrf_index);
4058 d_2_to_3(datafile_zArray, Cnfadrf_CnArray, Cnfadrf_index);
4059 i_1_to_2(datafile_nxArray, Cnfadrf_nAlphaArray, Cnfadrf_index);
4060 Cnfadrf_ndr[Cnfadrf_index] = datafile_ny;
4061 if (Cnfadrf_first==true)
4063 if (Cnfadrf_nice == 1)
4065 Cnfadrf_na_nice = datafile_nxArray[1];
4066 Cnfadrf_ndr_nice = datafile_ny;
4067 d_1_to_1(datafile_yArray, Cnfadrf_drArray_nice);
4068 for (i=1; i<=Cnfadrf_na_nice; i++)
4069 Cnfadrf_aArray_nice[i] = datafile_xArray[1][i];
4071 aeroYawParts -> storeCommands (*command_line);
4072 Cnfadrf_first=false;
4078 int Cnfapf_index, i;
4081 Cnfapf_file = aircraft_directory + linetoken3;
4082 token4 >> Cnfapf_index;
4083 if (Cnfapf_index < 0 || Cnfapf_index >= 100)
4084 uiuc_warnings_errors(1, *command_line);
4085 if (Cnfapf_index > Cnfapf_nf)
4086 Cnfapf_nf = Cnfapf_index;
4087 token5 >> flap_value;
4088 Cnfapf_fArray[Cnfapf_index] = flap_value;
4089 token6 >> token_value_convert1;
4090 token7 >> token_value_convert2;
4091 token8 >> token_value_convert3;
4092 token9 >> Cnfapf_nice;
4093 convert_z = uiuc_convert(token_value_convert1);
4094 convert_x = uiuc_convert(token_value_convert2);
4095 convert_y = uiuc_convert(token_value_convert3);
4096 /* call 2D File Reader with file name (Cnfapf_file) and
4097 conversion factors; function returns array of
4098 elevator deflections (deArray) and corresponding
4099 alpha (aArray) and delta CZ (CZArray) values and
4100 max number of terms in alpha arrays (nAlphaArray)
4101 and delfection array (nde) */
4102 uiuc_2DdataFileReader(Cnfapf_file,
4108 d_2_to_3(datafile_xArray, Cnfapf_aArray, Cnfapf_index);
4109 d_1_to_2(datafile_yArray, Cnfapf_pArray, Cnfapf_index);
4110 d_2_to_3(datafile_zArray, Cnfapf_CnArray, Cnfapf_index);
4111 i_1_to_2(datafile_nxArray, Cnfapf_nAlphaArray, Cnfapf_index);
4112 Cnfapf_np[Cnfapf_index] = datafile_ny;
4113 if (Cnfapf_first==true)
4115 if (Cnfapf_nice == 1)
4117 Cnfapf_na_nice = datafile_nxArray[1];
4118 Cnfapf_np_nice = datafile_ny;
4119 d_1_to_1(datafile_yArray, Cnfapf_pArray_nice);
4120 for (i=1; i<=Cnfapf_na_nice; i++)
4121 Cnfapf_aArray_nice[i] = datafile_xArray[1][i];
4123 aeroYawParts -> storeCommands (*command_line);
4130 int Cnfarf_index, i;
4133 Cnfarf_file = aircraft_directory + linetoken3;
4134 token4 >> Cnfarf_index;
4135 if (Cnfarf_index < 0 || Cnfarf_index >= 100)
4136 uiuc_warnings_errors(1, *command_line);
4137 if (Cnfarf_index > Cnfarf_nf)
4138 Cnfarf_nf = Cnfarf_index;
4139 token5 >> flap_value;
4140 Cnfarf_fArray[Cnfarf_index] = flap_value;
4141 token6 >> token_value_convert1;
4142 token7 >> token_value_convert2;
4143 token8 >> token_value_convert3;
4144 token9 >> Cnfarf_nice;
4145 convert_z = uiuc_convert(token_value_convert1);
4146 convert_x = uiuc_convert(token_value_convert2);
4147 convert_y = uiuc_convert(token_value_convert3);
4148 /* call 2D File Reader with file name (Cnfarf_file) and
4149 conversion factors; function returns array of
4150 elevator deflections (deArray) and corresponding
4151 alpha (aArray) and delta CZ (CZArray) values and
4152 max number of terms in alpha arrays (nAlphaArray)
4153 and delfection array (nde) */
4154 uiuc_2DdataFileReader(Cnfarf_file,
4160 d_2_to_3(datafile_xArray, Cnfarf_aArray, Cnfarf_index);
4161 d_1_to_2(datafile_yArray, Cnfarf_rArray, Cnfarf_index);
4162 d_2_to_3(datafile_zArray, Cnfarf_CnArray, Cnfarf_index);
4163 i_1_to_2(datafile_nxArray, Cnfarf_nAlphaArray, Cnfarf_index);
4164 Cnfarf_nr[Cnfarf_index] = datafile_ny;
4165 if (Cnfarf_first==true)
4167 if (Cnfarf_nice == 1)
4169 Cnfarf_na_nice = datafile_nxArray[1];
4170 Cnfarf_nr_nice = datafile_ny;
4171 d_1_to_1(datafile_yArray, Cnfarf_rArray_nice);
4172 for (i=1; i<=Cnfarf_na_nice; i++)
4173 Cnfarf_aArray_nice[i] = datafile_xArray[1][i];
4175 aeroYawParts -> storeCommands (*command_line);
4183 uiuc_warnings_errors(2, *command_line);
4189 void parse_gear( const string& linetoken2, const string& linetoken3,
4190 const string& linetoken4, const int& index,
4191 LIST command_line ) {
4193 istrstream token3(linetoken3.c_str());
4194 istrstream token4(linetoken4.c_str());
4196 switch(gear_map[linetoken2])
4200 if (check_float(linetoken3))
4201 token4 >> token_value;
4203 uiuc_warnings_errors(1, *command_line);
4204 D_gear_v[index][0] = token_value;
4205 gear_model[index] = true;
4210 if (check_float(linetoken3))
4211 token4 >> token_value;
4213 uiuc_warnings_errors(1, *command_line);
4214 D_gear_v[index][1] = token_value;
4215 gear_model[index] = true;
4220 if (check_float(linetoken3))
4221 token4 >> token_value;
4223 uiuc_warnings_errors(1, *command_line);
4224 D_gear_v[index][2] = token_value;
4225 gear_model[index] = true;
4230 if (check_float(linetoken3))
4231 token4 >> token_value;
4233 uiuc_warnings_errors(1, *command_line);
4234 cgear[index] = token_value;
4235 gear_model[index] = true;
4240 if (check_float(linetoken3))
4241 token4 >> token_value;
4243 uiuc_warnings_errors(1, *command_line);
4244 kgear[index] = token_value;
4245 gear_model[index] = true;
4250 if (check_float(linetoken3))
4251 token4 >> token_value;
4253 uiuc_warnings_errors(1, *command_line);
4254 muGear[index] = token_value;
4255 gear_model[index] = true;
4258 case strutLength_flag:
4260 if (check_float(linetoken3))
4261 token4 >> token_value;
4263 uiuc_warnings_errors(1, *command_line);
4264 strutLength[index] = token_value;
4265 gear_model[index] = true;
4271 uiuc_warnings_errors(2, *command_line);
4278 void parse_ice( const string& linetoken2, const string& linetoken3,
4279 const string& linetoken4, const string& linetoken5,
4280 const string& linetoken6, const string& linetoken7,
4281 const string& linetoken8, const string& linetoken9,
4282 const string& aircraft_directory,
4283 bool &tactilefadef_first, LIST command_line ) {
4285 int token_value_convert1, token_value_convert2, token_value_convert3;
4286 double datafile_xArray[100][100], datafile_yArray[100];
4287 double datafile_zArray[100][100];
4288 int datafile_nxArray[100], datafile_ny;
4289 istrstream token3(linetoken3.c_str());
4290 istrstream token4(linetoken4.c_str());
4291 istrstream token5(linetoken5.c_str());
4292 istrstream token6(linetoken6.c_str());
4293 istrstream token7(linetoken7.c_str());
4294 istrstream token8(linetoken8.c_str());
4295 istrstream token9(linetoken9.c_str());
4297 switch(ice_map[linetoken2])
4301 if (check_float(linetoken3))
4302 token3 >> token_value;
4305 uiuc_warnings_errors(1, *command_line);
4308 iceTime = token_value;
4311 case transientTime_flag:
4313 if (check_float(linetoken3))
4314 token3 >> token_value;
4316 uiuc_warnings_errors(1, *command_line);
4318 transientTime = token_value;
4321 case eta_ice_final_flag:
4323 if (check_float(linetoken3))
4324 token3 >> token_value;
4326 uiuc_warnings_errors(1, *command_line);
4328 eta_ice_final = token_value;
4331 case beta_probe_wing_flag:
4333 if (check_float(linetoken3))
4334 token3 >> token_value;
4336 uiuc_warnings_errors(1, *command_line);
4339 x_probe_wing = token_value;
4342 case beta_probe_tail_flag:
4344 if (check_float(linetoken3))
4345 token3 >> token_value;
4347 uiuc_warnings_errors(1, *command_line);
4350 x_probe_tail = token_value;
4355 if (check_float(linetoken3))
4356 token3 >> token_value;
4358 uiuc_warnings_errors(1, *command_line);
4365 if (check_float(linetoken3))
4366 token3 >> token_value;
4368 uiuc_warnings_errors(1, *command_line);
4375 if (check_float(linetoken3))
4376 token3 >> token_value;
4378 uiuc_warnings_errors(1, *command_line);
4380 kCD_a = token_value;
4385 if (check_float(linetoken3))
4386 token3 >> token_value;
4388 uiuc_warnings_errors(1, *command_line);
4390 kCD_adot = token_value;
4395 if (check_float(linetoken3))
4396 token3 >> token_value;
4398 uiuc_warnings_errors(1, *command_line);
4400 kCD_q = token_value;
4405 if (check_float(linetoken3))
4406 token3 >> token_value;
4408 uiuc_warnings_errors(1, *command_line);
4410 kCD_de = token_value;
4415 if (check_float(linetoken3))
4416 token3 >> token_value;
4418 uiuc_warnings_errors(1, *command_line);
4425 if (check_float(linetoken3))
4426 token3 >> token_value;
4428 uiuc_warnings_errors(1, *command_line);
4435 if (check_float(linetoken3))
4436 token3 >> token_value;
4438 uiuc_warnings_errors(1, *command_line);
4440 kCX_a = token_value;
4445 if (check_float(linetoken3))
4446 token3 >> token_value;
4448 uiuc_warnings_errors(1, *command_line);
4450 kCX_a2 = token_value;
4455 if (check_float(linetoken3))
4456 token3 >> token_value;
4458 uiuc_warnings_errors(1, *command_line);
4460 kCX_a3 = token_value;
4465 if (check_float(linetoken3))
4466 token3 >> token_value;
4468 uiuc_warnings_errors(1, *command_line);
4470 kCX_adot = token_value;
4475 if (check_float(linetoken3))
4476 token3 >> token_value;
4478 uiuc_warnings_errors(1, *command_line);
4480 kCX_q = token_value;
4485 if (check_float(linetoken3))
4486 token3 >> token_value;
4488 uiuc_warnings_errors(1, *command_line);
4490 kCX_de = token_value;
4495 if (check_float(linetoken3))
4496 token3 >> token_value;
4498 uiuc_warnings_errors(1, *command_line);
4500 kCX_dr = token_value;
4505 if (check_float(linetoken3))
4506 token3 >> token_value;
4508 uiuc_warnings_errors(1, *command_line);
4510 kCX_df = token_value;
4515 if (check_float(linetoken3))
4516 token3 >> token_value;
4518 uiuc_warnings_errors(1, *command_line);
4520 kCX_adf = token_value;
4525 if (check_float(linetoken3))
4526 token3 >> token_value;
4528 uiuc_warnings_errors(1, *command_line);
4535 if (check_float(linetoken3))
4536 token3 >> token_value;
4538 uiuc_warnings_errors(1, *command_line);
4540 kCL_a = token_value;
4545 if (check_float(linetoken3))
4546 token3 >> token_value;
4548 uiuc_warnings_errors(1, *command_line);
4550 kCL_adot = token_value;
4555 if (check_float(linetoken3))
4556 token3 >> token_value;
4558 uiuc_warnings_errors(1, *command_line);
4560 kCL_q = token_value;
4565 if (check_float(linetoken3))
4566 token3 >> token_value;
4568 uiuc_warnings_errors(1, *command_line);
4570 kCL_de = token_value;
4575 if (check_float(linetoken3))
4576 token3 >> token_value;
4578 uiuc_warnings_errors(1, *command_line);
4585 if (check_float(linetoken3))
4586 token3 >> token_value;
4588 uiuc_warnings_errors(1, *command_line);
4590 kCZ_a = token_value;
4595 if (check_float(linetoken3))
4596 token3 >> token_value;
4598 uiuc_warnings_errors(1, *command_line);
4600 kCZ_a2 = token_value;
4605 if (check_float(linetoken3))
4606 token3 >> token_value;
4608 uiuc_warnings_errors(1, *command_line);
4610 kCZ_a3 = token_value;
4615 if (check_float(linetoken3))
4616 token3 >> token_value;
4618 uiuc_warnings_errors(1, *command_line);
4620 kCZ_adot = token_value;
4625 if (check_float(linetoken3))
4626 token3 >> token_value;
4628 uiuc_warnings_errors(1, *command_line);
4630 kCZ_q = token_value;
4635 if (check_float(linetoken3))
4636 token3 >> token_value;
4638 uiuc_warnings_errors(1, *command_line);
4640 kCZ_de = token_value;
4645 if (check_float(linetoken3))
4646 token3 >> token_value;
4648 uiuc_warnings_errors(1, *command_line);
4650 kCZ_deb2 = token_value;
4655 if (check_float(linetoken3))
4656 token3 >> token_value;
4658 uiuc_warnings_errors(1, *command_line);
4660 kCZ_df = token_value;
4665 if (check_float(linetoken3))
4666 token3 >> token_value;
4668 uiuc_warnings_errors(1, *command_line);
4670 kCZ_adf = token_value;
4675 if (check_float(linetoken3))
4676 token3 >> token_value;
4678 uiuc_warnings_errors(1, *command_line);
4685 if (check_float(linetoken3))
4686 token3 >> token_value;
4688 uiuc_warnings_errors(1, *command_line);
4690 kCm_a = token_value;
4695 if (check_float(linetoken3))
4696 token3 >> token_value;
4698 uiuc_warnings_errors(1, *command_line);
4700 kCm_a2 = token_value;
4705 if (check_float(linetoken3))
4706 token3 >> token_value;
4708 uiuc_warnings_errors(1, *command_line);
4710 kCm_adot = token_value;
4715 if (check_float(linetoken3))
4716 token3 >> token_value;
4718 uiuc_warnings_errors(1, *command_line);
4720 kCm_q = token_value;
4725 if (check_float(linetoken3))
4726 token3 >> token_value;
4728 uiuc_warnings_errors(1, *command_line);
4730 kCm_de = token_value;
4735 if (check_float(linetoken3))
4736 token3 >> token_value;
4738 uiuc_warnings_errors(1, *command_line);
4740 kCm_b2 = token_value;
4745 if (check_float(linetoken3))
4746 token3 >> token_value;
4748 uiuc_warnings_errors(1, *command_line);
4750 kCm_r = token_value;
4755 if (check_float(linetoken3))
4756 token3 >> token_value;
4758 uiuc_warnings_errors(1, *command_line);
4760 kCm_df = token_value;
4765 if (check_float(linetoken3))
4766 token3 >> token_value;
4768 uiuc_warnings_errors(1, *command_line);
4775 if (check_float(linetoken3))
4776 token3 >> token_value;
4778 uiuc_warnings_errors(1, *command_line);
4780 kCY_beta = token_value;
4785 if (check_float(linetoken3))
4786 token3 >> token_value;
4788 uiuc_warnings_errors(1, *command_line);
4790 kCY_p = token_value;
4795 if (check_float(linetoken3))
4796 token3 >> token_value;
4798 uiuc_warnings_errors(1, *command_line);
4800 kCY_r = token_value;
4805 if (check_float(linetoken3))
4806 token3 >> token_value;
4808 uiuc_warnings_errors(1, *command_line);
4810 kCY_da = token_value;
4815 if (check_float(linetoken3))
4816 token3 >> token_value;
4818 uiuc_warnings_errors(1, *command_line);
4820 kCY_dr = token_value;
4825 if (check_float(linetoken3))
4826 token3 >> token_value;
4828 uiuc_warnings_errors(1, *command_line);
4830 kCY_dra = token_value;
4835 if (check_float(linetoken3))
4836 token3 >> token_value;
4838 uiuc_warnings_errors(1, *command_line);
4840 kCY_bdot = token_value;
4845 if (check_float(linetoken3))
4846 token3 >> token_value;
4848 uiuc_warnings_errors(1, *command_line);
4855 if (check_float(linetoken3))
4856 token3 >> token_value;
4858 uiuc_warnings_errors(1, *command_line);
4860 kCl_beta = token_value;
4865 if (check_float(linetoken3))
4866 token3 >> token_value;
4868 uiuc_warnings_errors(1, *command_line);
4870 kCl_p = token_value;
4875 if (check_float(linetoken3))
4876 token3 >> token_value;
4878 uiuc_warnings_errors(1, *command_line);
4880 kCl_r = token_value;
4885 if (check_float(linetoken3))
4886 token3 >> token_value;
4888 uiuc_warnings_errors(1, *command_line);
4890 kCl_da = token_value;
4895 if (check_float(linetoken3))
4896 token3 >> token_value;
4898 uiuc_warnings_errors(1, *command_line);
4900 kCl_dr = token_value;
4905 if (check_float(linetoken3))
4906 token3 >> token_value;
4908 uiuc_warnings_errors(1, *command_line);
4910 kCl_daa = token_value;
4915 if (check_float(linetoken3))
4916 token3 >> token_value;
4918 uiuc_warnings_errors(1, *command_line);
4925 if (check_float(linetoken3))
4926 token3 >> token_value;
4928 uiuc_warnings_errors(1, *command_line);
4930 kCn_beta = token_value;
4935 if (check_float(linetoken3))
4936 token3 >> token_value;
4938 uiuc_warnings_errors(1, *command_line);
4940 kCn_p = token_value;
4945 if (check_float(linetoken3))
4946 token3 >> token_value;
4948 uiuc_warnings_errors(1, *command_line);
4950 kCn_r = token_value;
4955 if (check_float(linetoken3))
4956 token3 >> token_value;
4958 uiuc_warnings_errors(1, *command_line);
4960 kCn_da = token_value;
4965 if (check_float(linetoken3))
4966 token3 >> token_value;
4968 uiuc_warnings_errors(1, *command_line);
4970 kCn_dr = token_value;
4975 if (check_float(linetoken3))
4976 token3 >> token_value;
4978 uiuc_warnings_errors(1, *command_line);
4980 kCn_q = token_value;
4985 if (check_float(linetoken3))
4986 token3 >> token_value;
4988 uiuc_warnings_errors(1, *command_line);
4990 kCn_b3 = token_value;
4996 if (check_float(linetoken4))
4997 token4 >> token_value;
4999 uiuc_warnings_errors(1, *command_line);
5001 if (index < 0 || index >= 20)
5002 uiuc_warnings_errors(1, *command_line);
5003 bootTime[index] = token_value;
5004 bootTrue[index] = true;
5007 case eta_wing_left_input_flag:
5009 eta_from_file = true;
5010 eta_wing_left_input = true;
5011 eta_wing_left_input_file = aircraft_directory + linetoken3;
5012 token4 >> token_value_convert1;
5013 token5 >> token_value_convert2;
5014 convert_y = uiuc_convert(token_value_convert1);
5015 convert_x = uiuc_convert(token_value_convert2);
5016 uiuc_1DdataFileReader(eta_wing_left_input_file,
5017 eta_wing_left_input_timeArray,
5018 eta_wing_left_input_daArray,
5019 eta_wing_left_input_ntime);
5020 token6 >> token_value;
5021 eta_wing_left_input_startTime = token_value;
5024 case eta_wing_right_input_flag:
5026 eta_from_file = true;
5027 eta_wing_right_input = true;
5028 eta_wing_right_input_file = aircraft_directory + linetoken3;
5029 token4 >> token_value_convert1;
5030 token5 >> token_value_convert2;
5031 convert_y = uiuc_convert(token_value_convert1);
5032 convert_x = uiuc_convert(token_value_convert2);
5033 uiuc_1DdataFileReader(eta_wing_right_input_file,
5034 eta_wing_right_input_timeArray,
5035 eta_wing_right_input_daArray,
5036 eta_wing_right_input_ntime);
5037 token6 >> token_value;
5038 eta_wing_right_input_startTime = token_value;
5041 case eta_tail_input_flag:
5043 eta_from_file = true;
5044 eta_tail_input = true;
5045 eta_tail_input_file = aircraft_directory + linetoken3;
5046 token4 >> token_value_convert1;
5047 token5 >> token_value_convert2;
5048 convert_y = uiuc_convert(token_value_convert1);
5049 convert_x = uiuc_convert(token_value_convert2);
5050 uiuc_1DdataFileReader(eta_tail_input_file,
5051 eta_tail_input_timeArray,
5052 eta_tail_input_daArray,
5053 eta_tail_input_ntime);
5054 token6 >> token_value;
5055 eta_tail_input_startTime = token_value;
5058 case nonlin_ice_case_flag:
5060 token3 >> nonlin_ice_case;
5065 if (check_float(linetoken3))
5066 token3 >> token_value;
5068 uiuc_warnings_errors(1, *command_line);
5070 eta_tail = token_value;
5073 case eta_wing_left_flag:
5075 if (check_float(linetoken3))
5076 token3 >> token_value;
5078 uiuc_warnings_errors(1, *command_line);
5080 eta_wing_left = token_value;
5083 case eta_wing_right_flag:
5085 if (check_float(linetoken3))
5086 token3 >> token_value;
5088 uiuc_warnings_errors(1, *command_line);
5090 eta_wing_right = token_value;
5093 case demo_eps_alpha_max_flag:
5095 demo_eps_alpha_max = true;
5096 demo_eps_alpha_max_file = aircraft_directory + linetoken3;
5097 token4 >> token_value_convert1;
5098 token5 >> token_value_convert2;
5099 convert_y = uiuc_convert(token_value_convert1);
5100 convert_x = uiuc_convert(token_value_convert2);
5101 uiuc_1DdataFileReader(demo_eps_alpha_max_file,
5102 demo_eps_alpha_max_timeArray,
5103 demo_eps_alpha_max_daArray,
5104 demo_eps_alpha_max_ntime);
5105 token6 >> token_value;
5106 demo_eps_alpha_max_startTime = token_value;
5109 case demo_eps_pitch_max_flag:
5111 demo_eps_pitch_max = true;
5112 demo_eps_pitch_max_file = aircraft_directory + linetoken3;
5113 token4 >> token_value_convert1;
5114 token5 >> token_value_convert2;
5115 convert_y = uiuc_convert(token_value_convert1);
5116 convert_x = uiuc_convert(token_value_convert2);
5117 uiuc_1DdataFileReader(demo_eps_pitch_max_file,
5118 demo_eps_pitch_max_timeArray,
5119 demo_eps_pitch_max_daArray,
5120 demo_eps_pitch_max_ntime);
5121 token6 >> token_value;
5122 demo_eps_pitch_max_startTime = token_value;
5125 case demo_eps_pitch_min_flag:
5127 demo_eps_pitch_min = true;
5128 demo_eps_pitch_min_file = aircraft_directory + linetoken3;
5129 token4 >> token_value_convert1;
5130 token5 >> token_value_convert2;
5131 convert_y = uiuc_convert(token_value_convert1);
5132 convert_x = uiuc_convert(token_value_convert2);
5133 uiuc_1DdataFileReader(demo_eps_pitch_min_file,
5134 demo_eps_pitch_min_timeArray,
5135 demo_eps_pitch_min_daArray,
5136 demo_eps_pitch_min_ntime);
5137 token6 >> token_value;
5138 demo_eps_pitch_min_startTime = token_value;
5141 case demo_eps_roll_max_flag:
5143 demo_eps_roll_max = true;
5144 demo_eps_roll_max_file = aircraft_directory + linetoken3;
5145 token4 >> token_value_convert1;
5146 token5 >> token_value_convert2;
5147 convert_y = uiuc_convert(token_value_convert1);
5148 convert_x = uiuc_convert(token_value_convert2);
5149 uiuc_1DdataFileReader(demo_eps_roll_max_file,
5150 demo_eps_roll_max_timeArray,
5151 demo_eps_roll_max_daArray,
5152 demo_eps_roll_max_ntime);
5153 token6 >> token_value;
5154 demo_eps_roll_max_startTime = token_value;
5157 case demo_eps_thrust_min_flag:
5159 demo_eps_thrust_min = true;
5160 demo_eps_thrust_min_file = aircraft_directory + linetoken3;
5161 token4 >> token_value_convert1;
5162 token5 >> token_value_convert2;
5163 convert_y = uiuc_convert(token_value_convert1);
5164 convert_x = uiuc_convert(token_value_convert2);
5165 uiuc_1DdataFileReader(demo_eps_thrust_min_file,
5166 demo_eps_thrust_min_timeArray,
5167 demo_eps_thrust_min_daArray,
5168 demo_eps_thrust_min_ntime);
5169 token6 >> token_value;
5170 demo_eps_thrust_min_startTime = token_value;
5173 case demo_eps_airspeed_max_flag:
5175 demo_eps_airspeed_max = true;
5176 demo_eps_airspeed_max_file = aircraft_directory + linetoken3;
5177 token4 >> token_value_convert1;
5178 token5 >> token_value_convert2;
5179 convert_y = uiuc_convert(token_value_convert1);
5180 convert_x = uiuc_convert(token_value_convert2);
5181 uiuc_1DdataFileReader(demo_eps_airspeed_max_file,
5182 demo_eps_airspeed_max_timeArray,
5183 demo_eps_airspeed_max_daArray,
5184 demo_eps_airspeed_max_ntime);
5185 token6 >> token_value;
5186 demo_eps_airspeed_max_startTime = token_value;
5189 case demo_eps_airspeed_min_flag:
5191 demo_eps_airspeed_min = true;
5192 demo_eps_airspeed_min_file = aircraft_directory + linetoken3;
5193 token4 >> token_value_convert1;
5194 token5 >> token_value_convert2;
5195 convert_y = uiuc_convert(token_value_convert1);
5196 convert_x = uiuc_convert(token_value_convert2);
5197 uiuc_1DdataFileReader(demo_eps_airspeed_min_file,
5198 demo_eps_airspeed_min_timeArray,
5199 demo_eps_airspeed_min_daArray,
5200 demo_eps_airspeed_min_ntime);
5201 token6 >> token_value;
5202 demo_eps_airspeed_min_startTime = token_value;
5205 case demo_eps_flap_max_flag:
5207 demo_eps_flap_max = true;
5208 demo_eps_flap_max_file = aircraft_directory + linetoken3;
5209 token4 >> token_value_convert1;
5210 token5 >> token_value_convert2;
5211 convert_y = uiuc_convert(token_value_convert1);
5212 convert_x = uiuc_convert(token_value_convert2);
5213 uiuc_1DdataFileReader(demo_eps_flap_max_file,
5214 demo_eps_flap_max_timeArray,
5215 demo_eps_flap_max_daArray,
5216 demo_eps_flap_max_ntime);
5217 token6 >> token_value;
5218 demo_eps_flap_max_startTime = token_value;
5221 case demo_boot_cycle_tail_flag:
5223 demo_boot_cycle_tail = true;
5224 demo_boot_cycle_tail_file = aircraft_directory + linetoken3;
5225 token4 >> token_value_convert1;
5226 token5 >> token_value_convert2;
5227 convert_y = uiuc_convert(token_value_convert1);
5228 convert_x = uiuc_convert(token_value_convert2);
5229 uiuc_1DdataFileReader(demo_boot_cycle_tail_file,
5230 demo_boot_cycle_tail_timeArray,
5231 demo_boot_cycle_tail_daArray,
5232 demo_boot_cycle_tail_ntime);
5233 token6 >> token_value;
5234 demo_boot_cycle_tail_startTime = token_value;
5237 case demo_boot_cycle_wing_left_flag:
5239 demo_boot_cycle_wing_left = true;
5240 demo_boot_cycle_wing_left_file = aircraft_directory + linetoken3;
5241 token4 >> token_value_convert1;
5242 token5 >> token_value_convert2;
5243 convert_y = uiuc_convert(token_value_convert1);
5244 convert_x = uiuc_convert(token_value_convert2);
5245 uiuc_1DdataFileReader(demo_boot_cycle_wing_left_file,
5246 demo_boot_cycle_wing_left_timeArray,
5247 demo_boot_cycle_wing_left_daArray,
5248 demo_boot_cycle_wing_left_ntime);
5249 token6 >> token_value;
5250 demo_boot_cycle_wing_left_startTime = token_value;
5253 case demo_boot_cycle_wing_right_flag:
5255 demo_boot_cycle_wing_right = true;
5256 demo_boot_cycle_wing_right_file = aircraft_directory + linetoken3;
5257 token4 >> token_value_convert1;
5258 token5 >> token_value_convert2;
5259 convert_y = uiuc_convert(token_value_convert1);
5260 convert_x = uiuc_convert(token_value_convert2);
5261 uiuc_1DdataFileReader(demo_boot_cycle_wing_right_file,
5262 demo_boot_cycle_wing_right_timeArray,
5263 demo_boot_cycle_wing_right_daArray,
5264 demo_boot_cycle_wing_right_ntime);
5265 token6 >> token_value;
5266 demo_boot_cycle_wing_right_startTime = token_value;
5269 case demo_eps_pitch_input_flag:
5271 demo_eps_pitch_input = true;
5272 demo_eps_pitch_input_file = aircraft_directory + linetoken3;
5273 token4 >> token_value_convert1;
5274 token5 >> token_value_convert2;
5275 convert_y = uiuc_convert(token_value_convert1);
5276 convert_x = uiuc_convert(token_value_convert2);
5277 uiuc_1DdataFileReader(demo_eps_pitch_input_file,
5278 demo_eps_pitch_input_timeArray,
5279 demo_eps_pitch_input_daArray,
5280 demo_eps_pitch_input_ntime);
5281 token6 >> token_value;
5282 demo_eps_pitch_input_startTime = token_value;
5285 case demo_ap_Theta_ref_deg_flag:
5287 demo_ap_Theta_ref_deg = true;
5288 demo_ap_Theta_ref_deg_file = aircraft_directory + linetoken3;
5289 token4 >> token_value_convert1;
5290 token5 >> token_value_convert2;
5291 convert_y = uiuc_convert(token_value_convert1);
5292 convert_x = uiuc_convert(token_value_convert2);
5293 uiuc_1DdataFileReader(demo_ap_Theta_ref_deg_file,
5294 demo_ap_Theta_ref_deg_timeArray,
5295 demo_ap_Theta_ref_deg_daArray,
5296 demo_ap_Theta_ref_deg_ntime);
5297 token6 >> token_value;
5298 demo_ap_Theta_ref_deg_startTime = token_value;
5301 case demo_ap_pah_on_flag:
5303 demo_ap_pah_on = true;
5304 demo_ap_pah_on_file = aircraft_directory + linetoken3;
5305 token4 >> token_value_convert1;
5306 token5 >> token_value_convert2;
5307 convert_y = uiuc_convert(token_value_convert1);
5308 convert_x = uiuc_convert(token_value_convert2);
5309 uiuc_1DdataFileReader(demo_ap_pah_on_file,
5310 demo_ap_pah_on_timeArray,
5311 demo_ap_pah_on_daArray,
5312 demo_ap_pah_on_ntime);
5313 token6 >> token_value;
5314 demo_ap_pah_on_startTime = token_value;
5317 case tactilefadef_flag:
5319 int tactilefadef_index, i;
5320 string tactilefadef_file;
5322 tactilefadef = true;
5323 tactilefadef_file = aircraft_directory + linetoken3;
5324 token4 >> tactilefadef_index;
5325 if (tactilefadef_index < 0 || tactilefadef_index >= 30)
5326 uiuc_warnings_errors(1, *command_line);
5327 if (tactilefadef_index > tactilefadef_nf)
5328 tactilefadef_nf = tactilefadef_index;
5329 token5 >> flap_value;
5330 tactilefadef_fArray[tactilefadef_index] = flap_value;
5331 token6 >> token_value_convert1;
5332 token7 >> token_value_convert2;
5333 token8 >> token_value_convert3;
5334 token9 >> tactilefadef_nice;
5335 convert_z = uiuc_convert(token_value_convert1);
5336 convert_x = uiuc_convert(token_value_convert2);
5337 convert_y = uiuc_convert(token_value_convert3);
5338 /* call 2D File Reader with file name (tactilefadef_file) and
5339 conversion factors; function returns array of
5340 elevator deflections (deArray) and corresponding
5341 alpha (aArray) and delta CZ (CZArray) values and
5342 max number of terms in alpha arrays (nAlphaArray)
5343 and delfection array (nde) */
5344 uiuc_2DdataFileReader(tactilefadef_file,
5350 d_2_to_3(datafile_xArray, tactilefadef_aArray, tactilefadef_index);
5351 d_1_to_2(datafile_yArray, tactilefadef_deArray, tactilefadef_index);
5352 d_2_to_3(datafile_zArray, tactilefadef_tactileArray, tactilefadef_index);
5353 i_1_to_2(datafile_nxArray, tactilefadef_nAlphaArray, tactilefadef_index);
5354 tactilefadef_nde[tactilefadef_index] = datafile_ny;
5355 if (tactilefadef_first==true)
5357 if (tactilefadef_nice == 1)
5359 tactilefadef_na_nice = datafile_nxArray[1];
5360 tactilefadef_nde_nice = datafile_ny;
5361 d_1_to_1(datafile_yArray, tactilefadef_deArray_nice);
5362 for (i=1; i<=tactilefadef_na_nice; i++)
5363 tactilefadef_aArray_nice[i] = datafile_xArray[1][i];
5365 tactilefadef_first=false;
5369 case tactile_pitch_flag:
5374 case demo_tactile_flag:
5376 demo_tactile = true;
5377 demo_tactile_file = aircraft_directory + linetoken3;
5378 token4 >> token_value_convert1;
5379 token5 >> token_value_convert2;
5380 convert_y = uiuc_convert(token_value_convert1);
5381 convert_x = uiuc_convert(token_value_convert2);
5382 uiuc_1DdataFileReader(demo_tactile_file,
5383 demo_tactile_timeArray,
5384 demo_tactile_daArray,
5385 demo_tactile_ntime);
5386 token6 >> token_value;
5387 demo_tactile_startTime = token_value;
5390 case demo_ice_tail_flag:
5392 demo_ice_tail = true;
5393 demo_ice_tail_file = aircraft_directory + linetoken3;
5394 token4 >> token_value_convert1;
5395 token5 >> token_value_convert2;
5396 convert_y = uiuc_convert(token_value_convert1);
5397 convert_x = uiuc_convert(token_value_convert2);
5398 uiuc_1DdataFileReader(demo_ice_tail_file,
5399 demo_ice_tail_timeArray,
5400 demo_ice_tail_daArray,
5401 demo_ice_tail_ntime);
5402 token6 >> token_value;
5403 demo_ice_tail_startTime = token_value;
5406 case demo_ice_left_flag:
5408 demo_ice_left = true;
5409 demo_ice_left_file = aircraft_directory + linetoken3;
5410 token4 >> token_value_convert1;
5411 token5 >> token_value_convert2;
5412 convert_y = uiuc_convert(token_value_convert1);
5413 convert_x = uiuc_convert(token_value_convert2);
5414 uiuc_1DdataFileReader(demo_ice_left_file,
5415 demo_ice_left_timeArray,
5416 demo_ice_left_daArray,
5417 demo_ice_left_ntime);
5418 token6 >> token_value;
5419 demo_ice_left_startTime = token_value;
5422 case demo_ice_right_flag:
5424 demo_ice_right = true;
5425 demo_ice_right_file = aircraft_directory + linetoken3;
5426 token4 >> token_value_convert1;
5427 token5 >> token_value_convert2;
5428 convert_y = uiuc_convert(token_value_convert1);
5429 convert_x = uiuc_convert(token_value_convert2);
5430 uiuc_1DdataFileReader(demo_ice_right_file,
5431 demo_ice_right_timeArray,
5432 demo_ice_right_daArray,
5433 demo_ice_right_ntime);
5434 token6 >> token_value;
5435 demo_ice_right_startTime = token_value;
5441 uiuc_warnings_errors(2, *command_line);
5448 void parse_fog( const string& linetoken2, const string& linetoken3,
5449 const string& linetoken4, LIST command_line ) {
5451 int token_value_convert1;
5452 istrstream token3(linetoken3.c_str());
5453 istrstream token4(linetoken4.c_str());
5455 switch(fog_map[linetoken2])
5457 case fog_segments_flag:
5459 if (check_float(linetoken3))
5460 token3 >> token_value_convert1;
5462 uiuc_warnings_errors(1, *command_line);
5464 if (token_value_convert1 < 1 || token_value_convert1 > 100)
5465 uiuc_warnings_errors(1, *command_line);
5468 fog_point_index = 0;
5471 fog_segments = token_value_convert1;
5472 fog_time = new double[fog_segments+1];
5474 fog_value = new int[fog_segments+1];
5479 case fog_point_flag:
5481 if (check_float(linetoken3))
5482 token3 >> token_value;
5484 uiuc_warnings_errors(1, *command_line);
5486 if (token_value < 0.1)
5487 uiuc_warnings_errors(1, *command_line);
5489 if (check_float(linetoken4))
5490 token4 >> token_value_convert1;
5492 uiuc_warnings_errors(1, *command_line);
5494 if (token_value_convert1 < -1000 || token_value_convert1 > 1000)
5495 uiuc_warnings_errors(1, *command_line);
5497 if (fog_point_index == fog_segments || fog_point_index == -1)
5498 uiuc_warnings_errors(1, *command_line);
5501 fog_time[fog_point_index] = token_value;
5502 fog_value[fog_point_index] = token_value_convert1;
5509 uiuc_warnings_errors(2, *command_line);
5516 void parse_record( const string& linetoken2, LIST command_line ) {
5518 switch(record_map[linetoken2])
5520 /************************* Time ************************/
5521 case Simtime_record:
5523 recordParts -> storeCommands (*command_line);
5528 recordParts -> storeCommands (*command_line);
5532 /************************* Mass ************************/
5535 recordParts -> storeCommands (*command_line);
5540 recordParts -> storeCommands (*command_line);
5545 recordParts -> storeCommands (*command_line);
5550 recordParts -> storeCommands (*command_line);
5555 recordParts -> storeCommands (*command_line);
5560 recordParts -> storeCommands (*command_line);
5564 /*********************** Geometry **********************/
5565 case Dx_pilot_record:
5567 recordParts -> storeCommands (*command_line);
5570 case Dy_pilot_record:
5572 recordParts -> storeCommands (*command_line);
5575 case Dz_pilot_record:
5577 recordParts -> storeCommands (*command_line);
5582 recordParts -> storeCommands (*command_line);
5587 recordParts -> storeCommands (*command_line);
5592 recordParts -> storeCommands (*command_line);
5596 /********************** Positions **********************/
5597 case Lat_geocentric_record:
5599 recordParts -> storeCommands (*command_line);
5602 case Lon_geocentric_record:
5604 recordParts -> storeCommands (*command_line);
5607 case Radius_to_vehicle_record:
5609 recordParts -> storeCommands (*command_line);
5612 case Latitude_record:
5614 recordParts -> storeCommands (*command_line);
5617 case Longitude_record:
5619 recordParts -> storeCommands (*command_line);
5622 case Altitude_record:
5624 recordParts -> storeCommands (*command_line);
5629 recordParts -> storeCommands (*command_line);
5634 recordParts -> storeCommands (*command_line);
5639 recordParts -> storeCommands (*command_line);
5643 /******************** Accelerations ********************/
5644 case V_dot_north_record:
5646 recordParts -> storeCommands (*command_line);
5649 case V_dot_east_record:
5651 recordParts -> storeCommands (*command_line);
5654 case V_dot_down_record:
5656 recordParts -> storeCommands (*command_line);
5659 case U_dot_body_record:
5661 recordParts -> storeCommands (*command_line);
5664 case V_dot_body_record:
5666 recordParts -> storeCommands (*command_line);
5669 case W_dot_body_record:
5671 recordParts -> storeCommands (*command_line);
5674 case A_X_pilot_record:
5676 recordParts -> storeCommands (*command_line);
5679 case A_Y_pilot_record:
5681 recordParts -> storeCommands (*command_line);
5684 case A_Z_pilot_record:
5686 recordParts -> storeCommands (*command_line);
5691 recordParts -> storeCommands (*command_line);
5696 recordParts -> storeCommands (*command_line);
5701 recordParts -> storeCommands (*command_line);
5704 case N_X_pilot_record:
5706 recordParts -> storeCommands (*command_line);
5709 case N_Y_pilot_record:
5711 recordParts -> storeCommands (*command_line);
5714 case N_Z_pilot_record:
5716 recordParts -> storeCommands (*command_line);
5721 recordParts -> storeCommands (*command_line);
5726 recordParts -> storeCommands (*command_line);
5731 recordParts -> storeCommands (*command_line);
5734 case P_dot_body_record:
5736 recordParts -> storeCommands (*command_line);
5739 case Q_dot_body_record:
5741 recordParts -> storeCommands (*command_line);
5744 case R_dot_body_record:
5746 recordParts -> storeCommands (*command_line);
5750 /********************** Velocities *********************/
5751 case V_north_record:
5753 recordParts -> storeCommands (*command_line);
5758 recordParts -> storeCommands (*command_line);
5763 recordParts -> storeCommands (*command_line);
5766 case V_north_rel_ground_record:
5768 recordParts -> storeCommands (*command_line);
5771 case V_east_rel_ground_record:
5773 recordParts -> storeCommands (*command_line);
5776 case V_down_rel_ground_record:
5778 recordParts -> storeCommands (*command_line);
5781 case V_north_airmass_record:
5783 recordParts -> storeCommands (*command_line);
5786 case V_east_airmass_record:
5788 recordParts -> storeCommands (*command_line);
5791 case V_down_airmass_record:
5793 recordParts -> storeCommands (*command_line);
5796 case V_north_rel_airmass_record:
5798 recordParts -> storeCommands (*command_line);
5801 case V_east_rel_airmass_record:
5803 recordParts -> storeCommands (*command_line);
5806 case V_down_rel_airmass_record:
5808 recordParts -> storeCommands (*command_line);
5813 recordParts -> storeCommands (*command_line);
5818 recordParts -> storeCommands (*command_line);
5823 recordParts -> storeCommands (*command_line);
5828 recordParts -> storeCommands (*command_line);
5833 recordParts -> storeCommands (*command_line);
5838 recordParts -> storeCommands (*command_line);
5841 case V_rel_wind_record:
5843 recordParts -> storeCommands (*command_line);
5846 case V_true_kts_record:
5848 recordParts -> storeCommands (*command_line);
5851 case V_rel_ground_record:
5853 recordParts -> storeCommands (*command_line);
5856 case V_inertial_record:
5858 recordParts -> storeCommands (*command_line);
5861 case V_ground_speed_record:
5863 recordParts -> storeCommands (*command_line);
5866 case V_equiv_record:
5868 recordParts -> storeCommands (*command_line);
5871 case V_equiv_kts_record:
5873 recordParts -> storeCommands (*command_line);
5876 case V_calibrated_record:
5878 recordParts -> storeCommands (*command_line);
5881 case V_calibrated_kts_record:
5883 recordParts -> storeCommands (*command_line);
5886 case P_local_record:
5888 recordParts -> storeCommands (*command_line);
5891 case Q_local_record:
5893 recordParts -> storeCommands (*command_line);
5896 case R_local_record:
5898 recordParts -> storeCommands (*command_line);
5903 recordParts -> storeCommands (*command_line);
5908 recordParts -> storeCommands (*command_line);
5913 recordParts -> storeCommands (*command_line);
5916 case P_total_record:
5918 recordParts -> storeCommands (*command_line);
5921 case Q_total_record:
5923 recordParts -> storeCommands (*command_line);
5926 case R_total_record:
5928 recordParts -> storeCommands (*command_line);
5931 case Phi_dot_record:
5933 recordParts -> storeCommands (*command_line);
5936 case Theta_dot_record:
5938 recordParts -> storeCommands (*command_line);
5941 case Psi_dot_record:
5943 recordParts -> storeCommands (*command_line);
5946 case Latitude_dot_record:
5948 recordParts -> storeCommands (*command_line);
5951 case Longitude_dot_record:
5953 recordParts -> storeCommands (*command_line);
5956 case Radius_dot_record:
5958 recordParts -> storeCommands (*command_line);
5962 /************************ Angles ***********************/
5965 recordParts -> storeCommands (*command_line);
5968 case Alpha_deg_record:
5970 recordParts -> storeCommands (*command_line);
5973 case Alpha_dot_record:
5975 recordParts -> storeCommands (*command_line);
5978 case Alpha_dot_deg_record:
5980 recordParts -> storeCommands (*command_line);
5985 recordParts -> storeCommands (*command_line);
5988 case Beta_deg_record:
5990 recordParts -> storeCommands (*command_line);
5993 case Beta_dot_record:
5995 recordParts -> storeCommands (*command_line);
5998 case Beta_dot_deg_record:
6000 recordParts -> storeCommands (*command_line);
6003 case Gamma_vert_record:
6005 recordParts -> storeCommands (*command_line);
6008 case Gamma_vert_deg_record:
6010 recordParts -> storeCommands (*command_line);
6013 case Gamma_horiz_record:
6015 recordParts -> storeCommands (*command_line);
6018 case Gamma_horiz_deg_record:
6020 recordParts -> storeCommands (*command_line);
6024 /**************** Atmospheric Properties ***************/
6025 case Density_record:
6027 recordParts -> storeCommands (*command_line);
6030 case V_sound_record:
6032 recordParts -> storeCommands (*command_line);
6035 case Mach_number_record:
6037 recordParts -> storeCommands (*command_line);
6040 case Static_pressure_record:
6042 recordParts -> storeCommands (*command_line);
6045 case Total_pressure_record:
6047 recordParts -> storeCommands (*command_line);
6050 case Impact_pressure_record:
6052 recordParts -> storeCommands (*command_line);
6055 case Dynamic_pressure_record:
6057 recordParts -> storeCommands (*command_line);
6060 case Static_temperature_record:
6062 recordParts -> storeCommands (*command_line);
6065 case Total_temperature_record:
6067 recordParts -> storeCommands (*command_line);
6071 /******************** Earth Properties *****************/
6072 case Gravity_record:
6074 recordParts -> storeCommands (*command_line);
6077 case Sea_level_radius_record:
6079 recordParts -> storeCommands (*command_line);
6082 case Earth_position_angle_record:
6084 recordParts -> storeCommands (*command_line);
6087 case Runway_altitude_record:
6089 recordParts -> storeCommands (*command_line);
6092 case Runway_latitude_record:
6094 recordParts -> storeCommands (*command_line);
6097 case Runway_longitude_record:
6099 recordParts -> storeCommands (*command_line);
6102 case Runway_heading_record:
6104 recordParts -> storeCommands (*command_line);
6107 case Radius_to_rwy_record:
6109 recordParts -> storeCommands (*command_line);
6112 case D_pilot_north_of_rwy_record:
6114 recordParts -> storeCommands (*command_line);
6117 case D_pilot_east_of_rwy_record:
6119 recordParts -> storeCommands (*command_line);
6122 case D_pilot_above_rwy_record:
6124 recordParts -> storeCommands (*command_line);
6127 case X_pilot_rwy_record:
6129 recordParts -> storeCommands (*command_line);
6132 case Y_pilot_rwy_record:
6134 recordParts -> storeCommands (*command_line);
6137 case H_pilot_rwy_record:
6139 recordParts -> storeCommands (*command_line);
6142 case D_cg_north_of_rwy_record:
6144 recordParts -> storeCommands (*command_line);
6147 case D_cg_east_of_rwy_record:
6149 recordParts -> storeCommands (*command_line);
6152 case D_cg_above_rwy_record:
6154 recordParts -> storeCommands (*command_line);
6157 case X_cg_rwy_record:
6159 recordParts -> storeCommands (*command_line);
6162 case Y_cg_rwy_record:
6164 recordParts -> storeCommands (*command_line);
6167 case H_cg_rwy_record:
6169 recordParts -> storeCommands (*command_line);
6173 /********************* Engine Inputs *******************/
6174 case Throttle_pct_record:
6176 recordParts -> storeCommands (*command_line);
6179 case Throttle_3_record:
6181 recordParts -> storeCommands (*command_line);
6185 /******************** Control Inputs *******************/
6186 case Long_control_record:
6188 recordParts -> storeCommands (*command_line);
6191 case Long_trim_record:
6193 recordParts -> storeCommands (*command_line);
6196 case Long_trim_deg_record:
6198 recordParts -> storeCommands (*command_line);
6201 case elevator_record:
6203 recordParts -> storeCommands (*command_line);
6206 case elevator_deg_record:
6208 recordParts -> storeCommands (*command_line);
6211 case Lat_control_record:
6213 recordParts -> storeCommands (*command_line);
6216 case aileron_record:
6218 recordParts -> storeCommands (*command_line);
6221 case aileron_deg_record:
6223 recordParts -> storeCommands (*command_line);
6226 case Rudder_pedal_record:
6228 recordParts -> storeCommands (*command_line);
6233 recordParts -> storeCommands (*command_line);
6236 case rudder_deg_record:
6238 recordParts -> storeCommands (*command_line);
6241 case Flap_handle_record:
6243 recordParts -> storeCommands (*command_line);
6248 recordParts -> storeCommands (*command_line);
6251 case flap_deg_record:
6253 recordParts -> storeCommands (*command_line);
6256 case flap_goal_record:
6258 recordParts -> storeCommands (*command_line);
6261 case flap_pos_record:
6263 recordParts -> storeCommands (*command_line);
6267 /****************** Aero Coefficients ******************/
6270 recordParts -> storeCommands (*command_line);
6275 recordParts -> storeCommands (*command_line);
6278 case CDfadeI_record:
6280 recordParts -> storeCommands (*command_line);
6285 recordParts -> storeCommands (*command_line);
6288 case CDfadfI_record:
6290 recordParts -> storeCommands (*command_line);
6295 recordParts -> storeCommands (*command_line);
6298 case CXfabetafI_record:
6300 recordParts -> storeCommands (*command_line);
6303 case CXfadefI_record:
6305 recordParts -> storeCommands (*command_line);
6308 case CXfaqfI_record:
6310 recordParts -> storeCommands (*command_line);
6313 case CDo_save_record:
6315 recordParts -> storeCommands (*command_line);
6318 case CDK_save_record:
6320 recordParts -> storeCommands (*command_line);
6323 case CD_a_save_record:
6325 recordParts -> storeCommands (*command_line);
6328 case CD_adot_save_record:
6330 recordParts -> storeCommands (*command_line);
6333 case CD_q_save_record:
6335 recordParts -> storeCommands (*command_line);
6338 case CD_ih_save_record:
6340 recordParts -> storeCommands (*command_line);
6343 case CD_de_save_record:
6345 recordParts -> storeCommands (*command_line);
6348 case CXo_save_record:
6350 recordParts -> storeCommands (*command_line);
6353 case CXK_save_record:
6355 recordParts -> storeCommands (*command_line);
6358 case CX_a_save_record:
6360 recordParts -> storeCommands (*command_line);
6363 case CX_a2_save_record:
6365 recordParts -> storeCommands (*command_line);
6368 case CX_a3_save_record:
6370 recordParts -> storeCommands (*command_line);
6373 case CX_adot_save_record:
6375 recordParts -> storeCommands (*command_line);
6378 case CX_q_save_record:
6380 recordParts -> storeCommands (*command_line);
6383 case CX_de_save_record:
6385 recordParts -> storeCommands (*command_line);
6388 case CX_dr_save_record:
6390 recordParts -> storeCommands (*command_line);
6393 case CX_df_save_record:
6395 recordParts -> storeCommands (*command_line);
6398 case CX_adf_save_record:
6400 recordParts -> storeCommands (*command_line);
6405 recordParts -> storeCommands (*command_line);
6410 recordParts -> storeCommands (*command_line);
6413 case CLfadeI_record:
6415 recordParts -> storeCommands (*command_line);
6420 recordParts -> storeCommands (*command_line);
6423 case CLfadfI_record:
6425 recordParts -> storeCommands (*command_line);
6430 recordParts -> storeCommands (*command_line);
6435 recordParts -> storeCommands (*command_line);
6438 case CZfabetafI_record:
6440 recordParts -> storeCommands (*command_line);
6443 case CZfadefI_record:
6445 recordParts -> storeCommands (*command_line);
6448 case CZfaqfI_record:
6450 recordParts -> storeCommands (*command_line);
6453 case CLo_save_record:
6455 recordParts -> storeCommands (*command_line);
6458 case CL_a_save_record:
6460 recordParts -> storeCommands (*command_line);
6463 case CL_adot_save_record:
6465 recordParts -> storeCommands (*command_line);
6468 case CL_q_save_record:
6470 recordParts -> storeCommands (*command_line);
6473 case CL_ih_save_record:
6475 recordParts -> storeCommands (*command_line);
6478 case CL_de_save_record:
6480 recordParts -> storeCommands (*command_line);
6483 case CZo_save_record:
6485 recordParts -> storeCommands (*command_line);
6488 case CZ_a_save_record:
6490 recordParts -> storeCommands (*command_line);
6493 case CZ_a2_save_record:
6495 recordParts -> storeCommands (*command_line);
6498 case CZ_a3_save_record:
6500 recordParts -> storeCommands (*command_line);
6503 case CZ_adot_save_record:
6505 recordParts -> storeCommands (*command_line);
6508 case CZ_q_save_record:
6510 recordParts -> storeCommands (*command_line);
6513 case CZ_de_save_record:
6515 recordParts -> storeCommands (*command_line);
6518 case CZ_deb2_save_record:
6520 recordParts -> storeCommands (*command_line);
6523 case CZ_df_save_record:
6525 recordParts -> storeCommands (*command_line);
6528 case CZ_adf_save_record:
6530 recordParts -> storeCommands (*command_line);
6535 recordParts -> storeCommands (*command_line);
6540 recordParts -> storeCommands (*command_line);
6543 case CmfadeI_record:
6545 recordParts -> storeCommands (*command_line);
6550 recordParts -> storeCommands (*command_line);
6553 case CmfadfI_record:
6555 recordParts -> storeCommands (*command_line);
6558 case CmfabetafI_record:
6560 recordParts -> storeCommands (*command_line);
6563 case CmfadefI_record:
6565 recordParts -> storeCommands (*command_line);
6568 case CmfaqfI_record:
6570 recordParts -> storeCommands (*command_line);
6573 case Cmo_save_record:
6575 recordParts -> storeCommands (*command_line);
6578 case Cm_a_save_record:
6580 recordParts -> storeCommands (*command_line);
6583 case Cm_a2_save_record:
6585 recordParts -> storeCommands (*command_line);
6588 case Cm_adot_save_record:
6590 recordParts -> storeCommands (*command_line);
6593 case Cm_q_save_record:
6595 recordParts -> storeCommands (*command_line);
6598 case Cm_ih_save_record:
6600 recordParts -> storeCommands (*command_line);
6603 case Cm_de_save_record:
6605 recordParts -> storeCommands (*command_line);
6608 case Cm_b2_save_record:
6610 recordParts -> storeCommands (*command_line);
6613 case Cm_r_save_record:
6615 recordParts -> storeCommands (*command_line);
6618 case Cm_df_save_record:
6620 recordParts -> storeCommands (*command_line);
6625 recordParts -> storeCommands (*command_line);
6628 case CYfadaI_record:
6630 recordParts -> storeCommands (*command_line);
6633 case CYfbetadrI_record:
6635 recordParts -> storeCommands (*command_line);
6638 case CYfabetafI_record:
6640 recordParts -> storeCommands (*command_line);
6643 case CYfadafI_record:
6645 recordParts -> storeCommands (*command_line);
6648 case CYfadrfI_record:
6650 recordParts -> storeCommands (*command_line);
6653 case CYfapfI_record:
6655 recordParts -> storeCommands (*command_line);
6658 case CYfarfI_record:
6660 recordParts -> storeCommands (*command_line);
6663 case CYo_save_record:
6665 recordParts -> storeCommands (*command_line);
6668 case CY_beta_save_record:
6670 recordParts -> storeCommands (*command_line);
6673 case CY_p_save_record:
6675 recordParts -> storeCommands (*command_line);
6678 case CY_r_save_record:
6680 recordParts -> storeCommands (*command_line);
6683 case CY_da_save_record:
6685 recordParts -> storeCommands (*command_line);
6688 case CY_dr_save_record:
6690 recordParts -> storeCommands (*command_line);
6693 case CY_dra_save_record:
6695 recordParts -> storeCommands (*command_line);
6698 case CY_bdot_save_record:
6700 recordParts -> storeCommands (*command_line);
6705 recordParts -> storeCommands (*command_line);
6708 case ClfadaI_record:
6710 recordParts -> storeCommands (*command_line);
6713 case ClfbetadrI_record:
6715 recordParts -> storeCommands (*command_line);
6718 case ClfabetafI_record:
6720 recordParts -> storeCommands (*command_line);
6723 case ClfadafI_record:
6725 recordParts -> storeCommands (*command_line);
6728 case ClfadrfI_record:
6730 recordParts -> storeCommands (*command_line);
6733 case ClfapfI_record:
6735 recordParts -> storeCommands (*command_line);
6738 case ClfarfI_record:
6740 recordParts -> storeCommands (*command_line);
6743 case Clo_save_record:
6745 recordParts -> storeCommands (*command_line);
6748 case Cl_beta_save_record:
6750 recordParts -> storeCommands (*command_line);
6753 case Cl_p_save_record:
6755 recordParts -> storeCommands (*command_line);
6758 case Cl_r_save_record:
6760 recordParts -> storeCommands (*command_line);
6763 case Cl_da_save_record:
6765 recordParts -> storeCommands (*command_line);
6768 case Cl_dr_save_record:
6770 recordParts -> storeCommands (*command_line);
6773 case Cl_daa_save_record:
6775 recordParts -> storeCommands (*command_line);
6780 recordParts -> storeCommands (*command_line);
6783 case CnfadaI_record:
6785 recordParts -> storeCommands (*command_line);
6788 case CnfbetadrI_record:
6790 recordParts -> storeCommands (*command_line);
6793 case CnfabetafI_record:
6795 recordParts -> storeCommands (*command_line);
6798 case CnfadafI_record:
6800 recordParts -> storeCommands (*command_line);
6803 case CnfadrfI_record:
6805 recordParts -> storeCommands (*command_line);
6808 case CnfapfI_record:
6810 recordParts -> storeCommands (*command_line);
6813 case CnfarfI_record:
6815 recordParts -> storeCommands (*command_line);
6818 case Cno_save_record:
6820 recordParts -> storeCommands (*command_line);
6823 case Cn_beta_save_record:
6825 recordParts -> storeCommands (*command_line);
6828 case Cn_p_save_record:
6830 recordParts -> storeCommands (*command_line);
6833 case Cn_r_save_record:
6835 recordParts -> storeCommands (*command_line);
6838 case Cn_da_save_record:
6840 recordParts -> storeCommands (*command_line);
6843 case Cn_dr_save_record:
6845 recordParts -> storeCommands (*command_line);
6848 case Cn_q_save_record:
6850 recordParts -> storeCommands (*command_line);
6853 case Cn_b3_save_record:
6855 recordParts -> storeCommands (*command_line);
6859 /******************** Ice Detection ********************/
6860 case CL_clean_record:
6862 recordParts -> storeCommands (*command_line);
6865 case CL_iced_record:
6867 recordParts -> storeCommands (*command_line);
6870 case CD_clean_record:
6872 recordParts -> storeCommands (*command_line);
6875 case CD_iced_record:
6877 recordParts -> storeCommands (*command_line);
6880 case Cm_clean_record:
6882 recordParts -> storeCommands (*command_line);
6885 case Cm_iced_record:
6887 recordParts -> storeCommands (*command_line);
6890 case Ch_clean_record:
6892 recordParts -> storeCommands (*command_line);
6895 case Ch_iced_record:
6897 recordParts -> storeCommands (*command_line);
6900 case Cl_clean_record:
6902 recordParts -> storeCommands (*command_line);
6905 case Cl_iced_record:
6907 recordParts -> storeCommands (*command_line);
6910 case CLclean_wing_record:
6912 recordParts -> storeCommands (*command_line);
6915 case CLiced_wing_record:
6917 recordParts -> storeCommands (*command_line);
6920 case CLclean_tail_record:
6922 recordParts -> storeCommands (*command_line);
6925 case CLiced_tail_record:
6927 recordParts -> storeCommands (*command_line);
6930 case Lift_clean_wing_record:
6932 recordParts -> storeCommands (*command_line);
6935 case Lift_iced_wing_record:
6937 recordParts -> storeCommands (*command_line);
6940 case Lift_clean_tail_record:
6942 recordParts -> storeCommands (*command_line);
6945 case Lift_iced_tail_record:
6947 recordParts -> storeCommands (*command_line);
6950 case Gamma_clean_wing_record:
6952 recordParts -> storeCommands (*command_line);
6955 case Gamma_iced_wing_record:
6957 recordParts -> storeCommands (*command_line);
6960 case Gamma_clean_tail_record:
6962 recordParts -> storeCommands (*command_line);
6965 case Gamma_iced_tail_record:
6967 recordParts -> storeCommands (*command_line);
6970 case w_clean_wing_record:
6972 recordParts -> storeCommands (*command_line);
6975 case w_iced_wing_record:
6977 recordParts -> storeCommands (*command_line);
6980 case w_clean_tail_record:
6982 recordParts -> storeCommands (*command_line);
6985 case w_iced_tail_record:
6987 recordParts -> storeCommands (*command_line);
6990 case V_total_clean_wing_record:
6992 recordParts -> storeCommands (*command_line);
6995 case V_total_iced_wing_record:
6997 recordParts -> storeCommands (*command_line);
7000 case V_total_clean_tail_record:
7002 recordParts -> storeCommands (*command_line);
7005 case V_total_iced_tail_record:
7007 recordParts -> storeCommands (*command_line);
7010 case beta_flow_clean_wing_record:
7012 recordParts -> storeCommands (*command_line);
7015 case beta_flow_clean_wing_deg_record:
7017 recordParts -> storeCommands (*command_line);
7020 case beta_flow_iced_wing_record:
7022 recordParts -> storeCommands (*command_line);
7025 case beta_flow_iced_wing_deg_record:
7027 recordParts -> storeCommands (*command_line);
7030 case beta_flow_clean_tail_record:
7032 recordParts -> storeCommands (*command_line);
7035 case beta_flow_clean_tail_deg_record:
7037 recordParts -> storeCommands (*command_line);
7040 case beta_flow_iced_tail_record:
7042 recordParts -> storeCommands (*command_line);
7045 case beta_flow_iced_tail_deg_record:
7047 recordParts -> storeCommands (*command_line);
7050 case Dbeta_flow_wing_record:
7052 recordParts -> storeCommands (*command_line);
7055 case Dbeta_flow_wing_deg_record:
7057 recordParts -> storeCommands (*command_line);
7060 case Dbeta_flow_tail_record:
7062 recordParts -> storeCommands (*command_line);
7065 case Dbeta_flow_tail_deg_record:
7067 recordParts -> storeCommands (*command_line);
7070 case pct_beta_flow_wing_record:
7072 recordParts -> storeCommands (*command_line);
7075 case pct_beta_flow_tail_record:
7077 recordParts -> storeCommands (*command_line);
7080 case eta_ice_record:
7082 recordParts -> storeCommands (*command_line);
7085 case eta_wing_left_record:
7087 recordParts -> storeCommands (*command_line);
7090 case eta_wing_right_record:
7092 recordParts -> storeCommands (*command_line);
7095 case eta_tail_record:
7097 recordParts -> storeCommands (*command_line);
7100 case delta_CL_record:
7102 recordParts -> storeCommands (*command_line);
7105 case delta_CD_record:
7107 recordParts -> storeCommands (*command_line);
7110 case delta_Cm_record:
7112 recordParts -> storeCommands (*command_line);
7115 case delta_Cl_record:
7117 recordParts -> storeCommands (*command_line);
7120 case boot_cycle_tail_record:
7122 recordParts -> storeCommands (*command_line);
7125 case boot_cycle_wing_left_record:
7127 recordParts -> storeCommands (*command_line);
7130 case boot_cycle_wing_right_record:
7132 recordParts -> storeCommands (*command_line);
7135 case autoIPS_tail_record:
7137 recordParts -> storeCommands (*command_line);
7140 case autoIPS_wing_left_record:
7142 recordParts -> storeCommands (*command_line);
7145 case autoIPS_wing_right_record:
7147 recordParts -> storeCommands (*command_line);
7150 case eps_pitch_input_record:
7152 recordParts -> storeCommands (*command_line);
7155 case eps_alpha_max_record:
7157 recordParts -> storeCommands (*command_line);
7160 case eps_pitch_max_record:
7162 recordParts -> storeCommands (*command_line);
7165 case eps_pitch_min_record:
7167 recordParts -> storeCommands (*command_line);
7170 case eps_roll_max_record:
7172 recordParts -> storeCommands (*command_line);
7175 case eps_thrust_min_record:
7177 recordParts -> storeCommands (*command_line);
7180 case eps_flap_max_record:
7182 recordParts -> storeCommands (*command_line);
7185 case eps_airspeed_max_record:
7187 recordParts -> storeCommands (*command_line);
7190 case eps_airspeed_min_record:
7192 recordParts -> storeCommands (*command_line);
7196 /*********************Auto Pilot************************/
7197 case ap_Theta_ref_deg_record:
7199 recordParts -> storeCommands (*command_line);
7202 case ap_pah_on_record:
7204 recordParts -> storeCommands (*command_line);
7208 /************************ Forces ***********************/
7209 case F_X_wind_record:
7211 recordParts -> storeCommands (*command_line);
7214 case F_Y_wind_record:
7216 recordParts -> storeCommands (*command_line);
7219 case F_Z_wind_record:
7221 recordParts -> storeCommands (*command_line);
7224 case F_X_aero_record:
7226 recordParts -> storeCommands (*command_line);
7229 case F_Y_aero_record:
7231 recordParts -> storeCommands (*command_line);
7234 case F_Z_aero_record:
7236 recordParts -> storeCommands (*command_line);
7239 case F_X_engine_record:
7241 recordParts -> storeCommands (*command_line);
7244 case F_Y_engine_record:
7246 recordParts -> storeCommands (*command_line);
7249 case F_Z_engine_record:
7251 recordParts -> storeCommands (*command_line);
7254 case F_X_gear_record:
7256 recordParts -> storeCommands (*command_line);
7259 case F_Y_gear_record:
7261 recordParts -> storeCommands (*command_line);
7264 case F_Z_gear_record:
7266 recordParts -> storeCommands (*command_line);
7271 recordParts -> storeCommands (*command_line);
7276 recordParts -> storeCommands (*command_line);
7281 recordParts -> storeCommands (*command_line);
7284 case F_north_record:
7286 recordParts -> storeCommands (*command_line);
7291 recordParts -> storeCommands (*command_line);
7296 recordParts -> storeCommands (*command_line);
7300 /*********************** Moments ***********************/
7301 case M_l_aero_record:
7303 recordParts -> storeCommands (*command_line);
7306 case M_m_aero_record:
7308 recordParts -> storeCommands (*command_line);
7311 case M_n_aero_record:
7313 recordParts -> storeCommands (*command_line);
7316 case M_l_engine_record:
7318 recordParts -> storeCommands (*command_line);
7321 case M_m_engine_record:
7323 recordParts -> storeCommands (*command_line);
7326 case M_n_engine_record:
7328 recordParts -> storeCommands (*command_line);
7331 case M_l_gear_record:
7333 recordParts -> storeCommands (*command_line);
7336 case M_m_gear_record:
7338 recordParts -> storeCommands (*command_line);
7341 case M_n_gear_record:
7343 recordParts -> storeCommands (*command_line);
7348 recordParts -> storeCommands (*command_line);
7353 recordParts -> storeCommands (*command_line);
7358 recordParts -> storeCommands (*command_line);
7361 /****************** Flapper Data ***********************/
7362 case flapper_freq_record:
7364 recordParts -> storeCommands (*command_line);
7367 case flapper_phi_record:
7369 recordParts -> storeCommands (*command_line);
7372 case flapper_phi_deg_record:
7374 recordParts -> storeCommands (*command_line);
7377 case flapper_Lift_record:
7379 recordParts -> storeCommands (*command_line);
7382 case flapper_Thrust_record:
7384 recordParts -> storeCommands (*command_line);
7387 case flapper_Inertia_record:
7389 recordParts -> storeCommands (*command_line);
7392 case flapper_Moment_record:
7394 recordParts -> storeCommands (*command_line);
7397 /****************** Flapper Data ***********************/
7400 recordParts -> storeCommands (*command_line);
7405 recordParts -> storeCommands (*command_line);
7410 recordParts -> storeCommands (*command_line);
7413 case tactilefadefI_record:
7415 recordParts -> storeCommands (*command_line);
7421 uiuc_warnings_errors(2, *command_line);
7428 void parse_misc( const string& linetoken2, const string& linetoken3,
7429 const string& aircraft_directory, LIST command_line ) {
7431 istrstream token3(linetoken3.c_str());
7433 switch(misc_map[linetoken2])
7435 case simpleHingeMomentCoef_flag:
7437 if (check_float(linetoken3))
7438 token3 >> token_value;
7440 uiuc_warnings_errors(1, *command_line);
7442 simpleHingeMomentCoef = token_value;
7445 case dfTimefdf_flag:
7447 dfTimefdf = linetoken3;
7448 /* call 1D File Reader with file name (dfTimefdf);
7449 function returns array of dfs (dfArray) and
7450 corresponding time values (TimeArray) and max
7451 number of terms in arrays (ndf) */
7452 uiuc_1DdataFileReader(dfTimefdf,
7454 dfTimefdf_TimeArray,
7458 //case flapper_flag:
7462 //flap_file = aircraft_directory + "flap.dat";
7463 //flapper_model = true;
7464 //flapper_data = new FlapData(flap_file.c_str());
7467 //case flapper_phi_init_flag:
7469 //if (check_float(linetoken3))
7470 // token3 >> token_value;
7472 // uiuc_warnings_errors(1, *command_line);
7474 //flapper_phi_init = token_value*DEG_TO_RAD;
7480 uiuc_warnings_errors(2, *command_line);
7487 void uiuc_menu( string aircraft_name )
7489 string aircraft_directory;
7492 int token_value_recordRate;
7493 int token_value_convert1, token_value_convert2, token_value_convert3;
7505 double datafile_xArray[100][100], datafile_yArray[100];
7506 double datafile_zArray[100][100];
7507 int datafile_nxArray[100], datafile_ny;
7509 bool CXfabetaf_first = true;
7510 bool CXfadef_first = true;
7511 bool CXfaqf_first = true;
7512 bool CZfabetaf_first = true;
7513 bool CZfadef_first = true;
7514 bool CZfaqf_first = true;
7515 bool Cmfabetaf_first = true;
7516 bool Cmfadef_first = true;
7517 bool Cmfaqf_first = true;
7518 bool CYfabetaf_first = true;
7519 bool CYfadaf_first = true;
7520 bool CYfadrf_first = true;
7521 bool CYfapf_first = true;
7522 bool CYfarf_first = true;
7523 bool Clfabetaf_first = true;
7524 bool Clfadaf_first = true;
7525 bool Clfadrf_first = true;
7526 bool Clfapf_first = true;
7527 bool Clfarf_first = true;
7528 bool Cnfabetaf_first = true;
7529 bool Cnfadaf_first = true;
7530 bool Cnfadrf_first = true;
7531 bool Cnfapf_first = true;
7532 bool Cnfarf_first = true;
7534 bool tactilefadef_first = true;
7536 /* the following default setting should eventually be moved to a default or uiuc_init routine */
7538 recordRate = 1; /* record every time step, default */
7539 recordStartTime = 0; /* record from beginning of simulation */
7541 /* set speed at which dynamic pressure terms will be accounted for,
7542 since if velocity is too small, coefficients will go to infinity */
7543 dyn_on_speed = 33; /* 20 kts (33 ft/sec), default */
7544 dyn_on_speed_zero = 0.5 * dyn_on_speed; /* only used if use_dyn_on_speed_curve1 is used */
7545 bootindex = 0; // the index for the bootTime
7549 /* Read the file and get the list of commands */
7550 airplane = new ParseFile(aircraft_name); /* struct that includes all lines of the input file */
7551 command_list = airplane -> getCommands();
7552 /* structs to include all parts included in the input file for specific keyword groups */
7553 initParts = new ParseFile();
7554 geometryParts = new ParseFile();
7555 massParts = new ParseFile();
7556 engineParts = new ParseFile();
7557 aeroDragParts = new ParseFile();
7558 aeroLiftParts = new ParseFile();
7559 aeroPitchParts = new ParseFile();
7560 aeroSideforceParts = new ParseFile();
7561 aeroRollParts = new ParseFile();
7562 aeroYawParts = new ParseFile();
7563 gearParts = new ParseFile();
7564 recordParts = new ParseFile();
7566 if (command_list.begin() == command_list.end())
7568 cerr << "UIUC ERROR: File " << aircraft_name <<" does not exist" << endl;
7572 //construct aircraft-directory
7573 aircraft_directory = aircraft_name;
7574 int index_aircraft_dat = aircraft_directory.find("aircraft.dat");
7575 aircraft_directory.erase(index_aircraft_dat,12);
7577 for (LIST command_line = command_list.begin(); command_line!=command_list.end(); ++command_line)
7579 cout << *command_line << endl;
7581 linetoken1 = airplane -> getToken (*command_line, 1);
7582 linetoken2 = airplane -> getToken (*command_line, 2);
7583 linetoken3 = airplane -> getToken (*command_line, 3);
7584 linetoken4 = airplane -> getToken (*command_line, 4);
7585 linetoken5 = airplane -> getToken (*command_line, 5);
7586 linetoken6 = airplane -> getToken (*command_line, 6);
7587 linetoken7 = airplane -> getToken (*command_line, 7);
7588 linetoken8 = airplane -> getToken (*command_line, 8);
7589 linetoken9 = airplane -> getToken (*command_line, 9);
7591 istrstream token3(linetoken3.c_str());
7592 istrstream token4(linetoken4.c_str());
7593 istrstream token5(linetoken5.c_str());
7594 istrstream token6(linetoken6.c_str());
7595 istrstream token7(linetoken7.c_str());
7596 istrstream token8(linetoken8.c_str());
7597 istrstream token9(linetoken9.c_str());
7599 switch (Keyword_map[linetoken1])
7603 parse_init( linetoken2, linetoken3, linetoken4, command_line );
7610 parse_geometry( linetoken2, linetoken3, command_line );
7612 } // end geometry map
7615 case controlSurface_flag:
7617 parse_controlSurface( linetoken2, linetoken3, linetoken4,
7618 linetoken5, linetoken6, aircraft_directory,
7621 } // end controlSurface map
7626 parse_mass( linetoken2, linetoken3, command_line );
7633 parse_engine( linetoken2, linetoken3, linetoken4,
7634 linetoken5, linetoken6, aircraft_directory,
7642 parse_CD( linetoken2, linetoken3, linetoken4,
7643 linetoken5, linetoken6, linetoken7,
7644 linetoken8, linetoken9, aircraft_directory,
7645 CXfabetaf_first, CXfadef_first,
7646 CXfaqf_first, command_line );
7653 parse_CL( linetoken2, linetoken3, linetoken4,
7654 linetoken5, linetoken6, linetoken7,
7655 linetoken8, linetoken9, aircraft_directory,
7656 CZfabetaf_first, CZfadef_first,
7657 CZfaqf_first, command_line );
7664 parse_Cm( linetoken2, linetoken3, linetoken4,
7665 linetoken5, linetoken6, linetoken7,
7666 linetoken8, linetoken9, aircraft_directory,
7667 Cmfabetaf_first, Cmfadef_first,
7668 Cmfaqf_first, command_line );
7675 parse_CY( linetoken2, linetoken3, linetoken4,
7676 linetoken5, linetoken6, linetoken7,
7677 linetoken8, linetoken9, aircraft_directory,
7678 CYfabetaf_first, CYfadaf_first,
7679 CYfadrf_first, CYfapf_first, CYfarf_first,
7687 parse_Cl( linetoken2, linetoken3, linetoken4,
7688 linetoken5, linetoken6, linetoken7,
7689 linetoken8, linetoken9, aircraft_directory,
7690 Clfabetaf_first, Clfadaf_first,
7691 Clfadrf_first, Clfapf_first, Clfarf_first,
7699 parse_Cn( linetoken2, linetoken3, linetoken4,
7700 linetoken5, linetoken6, linetoken7,
7701 linetoken8, linetoken9, aircraft_directory,
7702 Cnfabetaf_first, Cnfadaf_first,
7703 Cnfadrf_first, Cnfapf_first, Cnfarf_first,
7713 if (index < 0 || index >= 16)
7714 uiuc_warnings_errors(1, *command_line);
7715 parse_gear( linetoken2, linetoken3, linetoken4,
7716 index, command_line );
7723 parse_ice( linetoken2, linetoken3, linetoken4,
7724 linetoken5, linetoken6, linetoken7,
7725 linetoken8, linetoken9, aircraft_directory,
7726 tactilefadef_first, command_line );
7733 parse_fog( linetoken2, linetoken3, linetoken4,
7741 static int fout_flag=0;
7745 fout.open("uiuc_record.dat");
7747 parse_record( linetoken2, command_line );
7754 parse_misc( linetoken2, linetoken3, aircraft_directory,
7762 if (linetoken1=="*")
7765 uiuc_warnings_errors(2, *command_line);
7769 } // end keyword map