]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_menu_ice.cpp
Make sure sign is preserved for turbulence direction.
[flightgear.git] / src / FDM / UIUCModel / uiuc_menu_ice.cpp
1 /**********************************************************************
2                                                                        
3  FILENAME:     uiuc_menu_ice.cpp
4
5 ----------------------------------------------------------------------
6
7  DESCRIPTION:  reads input data for specified aircraft and creates 
8                approporiate data storage space
9
10 ----------------------------------------------------------------------
11
12  STATUS:       alpha version
13
14 ----------------------------------------------------------------------
15
16  REFERENCES:   based on "menu reader" format of Michael Selig
17
18 ----------------------------------------------------------------------
19
20  HISTORY:      04/04/2003   initial release
21
22 ----------------------------------------------------------------------
23
24  AUTHOR(S):    Robert Deters      <rdeters@uiuc.edu>
25                Michael Selig      <m-selig@uiuc.edu>
26
27 ----------------------------------------------------------------------
28
29  VARIABLES:
30
31 ----------------------------------------------------------------------
32
33  INPUTS:       n/a
34
35 ----------------------------------------------------------------------
36
37  OUTPUTS:      n/a
38
39 ----------------------------------------------------------------------
40
41  CALLED BY:    uiuc_menu()
42
43 ----------------------------------------------------------------------
44
45  CALLS TO:     check_float() if needed
46                d_2_to_3() if needed
47                d_1_to_2() if needed
48                i_1_to_2() if needed
49                d_1_to_1() if needed
50
51  ----------------------------------------------------------------------
52
53  COPYRIGHT:    (C) 2003 by Michael Selig
54
55  This program is free software; you can redistribute it and/or
56  modify it under the terms of the GNU General Public License
57  as published by the Free Software Foundation.
58
59  This program is distributed in the hope that it will be useful,
60  but WITHOUT ANY WARRANTY; without even the implied warranty of
61  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62  GNU General Public License for more details.
63
64  You should have received a copy of the GNU General Public License
65  along with this program; if not, write to the Free Software
66  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
67  USA or view http://www.gnu.org/copyleft/gpl.html.
68
69 **********************************************************************/
70
71 #include <simgear/compiler.h>
72
73 #if defined( __MWERKS__ )
74 // -dw- optimizer chokes (big-time) trying to optimize humongous
75 // loop/switch statements
76 #pragma optimization_level 0
77 #endif
78
79 #include <cstdlib>
80 #include <string>
81 #include STL_IOSTREAM
82
83 #include "uiuc_menu_ice.h"
84
85 SG_USING_STD(cerr);
86 SG_USING_STD(cout);
87 SG_USING_STD(endl);
88
89 #ifndef _MSC_VER
90 SG_USING_STD(exit);
91 #endif
92
93 void parse_ice( const string& linetoken2, const string& linetoken3,
94                 const string& linetoken4, const string& linetoken5,
95                 const string& linetoken6, const string& linetoken7, 
96                 const string& linetoken8, const string& linetoken9,
97                 const string& linetoken10, const string& aircraft_directory,
98                 LIST command_line ) {
99     double token_value;
100     int token_value_convert1, token_value_convert2, token_value_convert3;
101     double datafile_xArray[100][100], datafile_yArray[100];
102     double datafile_zArray[100][100];
103     int datafile_nxArray[100], datafile_ny;
104     istrstream token3(linetoken3.c_str());
105     istrstream token4(linetoken4.c_str());
106     istrstream token5(linetoken5.c_str());
107     istrstream token6(linetoken6.c_str());
108     istrstream token7(linetoken7.c_str());
109     istrstream token8(linetoken8.c_str());
110     istrstream token9(linetoken9.c_str());
111     istrstream token10(linetoken10.c_str());
112
113     static bool tactilefadef_first = true;
114
115     switch(ice_map[linetoken2])
116       {
117       case iceTime_flag:
118         {
119           if (check_float(linetoken3))
120             token3 >> token_value;
121           
122           else
123             uiuc_warnings_errors(1, *command_line);
124           
125           ice_model = true;
126           iceTime = token_value;
127           break;
128         }
129       case transientTime_flag:
130         {
131           if (check_float(linetoken3))
132             token3 >> token_value;
133           else
134             uiuc_warnings_errors(1, *command_line);
135           
136           transientTime = token_value;
137           break;
138         }
139       case eta_ice_final_flag:
140         {
141           if (check_float(linetoken3))
142             token3 >> token_value;
143           else
144             uiuc_warnings_errors(1, *command_line);
145           
146           eta_ice_final = token_value;
147           break;
148         }
149       case beta_probe_wing_flag:
150         {
151           if (check_float(linetoken3))
152             token3 >> token_value;
153           else
154             uiuc_warnings_errors(1, *command_line);
155           
156           beta_model = true;
157           x_probe_wing = token_value;
158           break;
159         }
160       case beta_probe_tail_flag:
161         {
162           if (check_float(linetoken3))
163             token3 >> token_value;
164           else
165             uiuc_warnings_errors(1, *command_line);
166           
167           beta_model = true;
168           x_probe_tail = token_value;
169           break;
170         }
171       case kCDo_flag:
172         {
173           if (check_float(linetoken3))
174             token3 >> token_value;
175           else
176             uiuc_warnings_errors(1, *command_line);
177           
178           kCDo = token_value;
179           break;
180         }
181       case kCDK_flag:
182         {
183           if (check_float(linetoken3))
184             token3 >> token_value;
185           else
186             uiuc_warnings_errors(1, *command_line);
187           
188           kCDK = token_value;
189           break;
190         }
191       case kCD_a_flag:
192         {
193           if (check_float(linetoken3))
194             token3 >> token_value;
195           else
196             uiuc_warnings_errors(1, *command_line);
197           
198           kCD_a = token_value;
199           break;
200         }
201       case kCD_adot_flag:
202         {
203           if (check_float(linetoken3))
204             token3 >> token_value;
205           else
206             uiuc_warnings_errors(1, *command_line);
207           
208           kCD_adot = token_value;
209           break;
210         }
211       case kCD_q_flag:
212         {
213           if (check_float(linetoken3))
214             token3 >> token_value;
215           else
216             uiuc_warnings_errors(1, *command_line);
217           
218           kCD_q = token_value;
219           break;
220         }
221       case kCD_de_flag:
222         {
223           if (check_float(linetoken3))
224             token3 >> token_value;
225           else
226             uiuc_warnings_errors(1, *command_line);
227           
228           kCD_de = token_value;
229           break;
230         }
231       case kCXo_flag:
232         {
233           if (check_float(linetoken3))
234             token3 >> token_value;
235           else
236             uiuc_warnings_errors(1, *command_line);
237           
238           kCXo = token_value;
239           break;
240         }
241       case kCXK_flag:
242         {
243           if (check_float(linetoken3))
244             token3 >> token_value;
245           else
246             uiuc_warnings_errors(1, *command_line);
247           
248           kCXK = token_value;
249           break;
250         }
251       case kCX_a_flag:
252         {
253           if (check_float(linetoken3))
254             token3 >> token_value;
255           else
256             uiuc_warnings_errors(1, *command_line);
257           
258           kCX_a = token_value;
259           break;
260         }
261       case kCX_a2_flag:
262         {
263           if (check_float(linetoken3))
264             token3 >> token_value;
265           else
266             uiuc_warnings_errors(1, *command_line);
267           
268           kCX_a2 = token_value;
269           break;
270         }
271       case kCX_a3_flag:
272         {
273           if (check_float(linetoken3))
274             token3 >> token_value;
275           else
276             uiuc_warnings_errors(1, *command_line);
277           
278           kCX_a3 = token_value;
279           break;
280         }
281       case kCX_adot_flag:
282         {
283           if (check_float(linetoken3))
284             token3 >> token_value;
285           else
286             uiuc_warnings_errors(1, *command_line);
287           
288           kCX_adot = token_value;
289           break;
290         }
291       case kCX_q_flag:
292         {
293           if (check_float(linetoken3))
294             token3 >> token_value;
295           else
296             uiuc_warnings_errors(1, *command_line);
297           
298           kCX_q = token_value;
299           break;
300         }
301       case kCX_de_flag:
302         {
303           if (check_float(linetoken3))
304             token3 >> token_value;
305           else
306             uiuc_warnings_errors(1, *command_line);
307           
308           kCX_de = token_value;
309           break;
310         }
311       case kCX_dr_flag:
312         {
313           if (check_float(linetoken3))
314             token3 >> token_value;
315           else
316             uiuc_warnings_errors(1, *command_line);
317           
318           kCX_dr = token_value;
319           break;
320         }
321       case kCX_df_flag:
322         {
323           if (check_float(linetoken3))
324             token3 >> token_value;
325           else
326             uiuc_warnings_errors(1, *command_line);
327           
328           kCX_df = token_value;
329           break;
330         }
331       case kCX_adf_flag:
332         {
333           if (check_float(linetoken3))
334             token3 >> token_value;
335           else
336             uiuc_warnings_errors(1, *command_line);
337           
338           kCX_adf = token_value;
339           break;
340         }
341       case kCLo_flag:
342         {
343           if (check_float(linetoken3))
344             token3 >> token_value;
345           else
346             uiuc_warnings_errors(1, *command_line);
347           
348           kCLo = token_value;
349           break;
350         }
351       case kCL_a_flag:
352         {
353           if (check_float(linetoken3))
354             token3 >> token_value;
355           else
356             uiuc_warnings_errors(1, *command_line);
357           
358           kCL_a = token_value;
359           break;
360         }
361       case kCL_adot_flag:
362         {
363           if (check_float(linetoken3))
364             token3 >> token_value;
365           else
366             uiuc_warnings_errors(1, *command_line);
367           
368           kCL_adot = token_value;
369           break;
370         }
371       case kCL_q_flag:
372         {
373           if (check_float(linetoken3))
374             token3 >> token_value;
375           else
376             uiuc_warnings_errors(1, *command_line);
377           
378           kCL_q = token_value;
379           break;
380         }
381       case kCL_de_flag:
382         {
383           if (check_float(linetoken3))
384             token3 >> token_value;
385           else
386             uiuc_warnings_errors(1, *command_line);
387           
388           kCL_de = token_value;
389           break;
390         }
391       case kCZo_flag:
392         {
393           if (check_float(linetoken3))
394             token3 >> token_value;
395           else
396             uiuc_warnings_errors(1, *command_line);
397           
398           kCZo = token_value;
399           break;
400         }
401       case kCZ_a_flag:
402         {
403           if (check_float(linetoken3))
404             token3 >> token_value;
405           else
406             uiuc_warnings_errors(1, *command_line);
407           
408           kCZ_a = token_value;
409           break;
410         }
411       case kCZ_a2_flag:
412         {
413           if (check_float(linetoken3))
414             token3 >> token_value;
415           else
416             uiuc_warnings_errors(1, *command_line);
417           
418           kCZ_a2 = token_value;
419           break;
420         }
421       case kCZ_a3_flag:
422         {
423           if (check_float(linetoken3))
424             token3 >> token_value;
425           else
426             uiuc_warnings_errors(1, *command_line);
427           
428           kCZ_a3 = token_value;
429           break;
430         }
431       case kCZ_adot_flag:
432         {
433           if (check_float(linetoken3))
434             token3 >> token_value;
435           else
436             uiuc_warnings_errors(1, *command_line);
437           
438           kCZ_adot = token_value;
439           break;
440         }
441       case kCZ_q_flag:
442         {
443           if (check_float(linetoken3))
444             token3 >> token_value;
445           else
446             uiuc_warnings_errors(1, *command_line);
447           
448           kCZ_q = token_value;
449           break;
450         }
451       case kCZ_de_flag:
452         {
453           if (check_float(linetoken3))
454             token3 >> token_value;
455           else
456             uiuc_warnings_errors(1, *command_line);
457           
458           kCZ_de = token_value;
459           break;
460         }
461       case kCZ_deb2_flag:
462         {
463           if (check_float(linetoken3))
464             token3 >> token_value;
465           else
466             uiuc_warnings_errors(1, *command_line);
467           
468           kCZ_deb2 = token_value;
469           break;
470         }
471       case kCZ_df_flag:
472         {
473           if (check_float(linetoken3))
474             token3 >> token_value;
475           else
476             uiuc_warnings_errors(1, *command_line);
477           
478           kCZ_df = token_value;
479           break;
480         }
481       case kCZ_adf_flag:
482         {
483           if (check_float(linetoken3))
484             token3 >> token_value;
485           else
486             uiuc_warnings_errors(1, *command_line);
487           
488           kCZ_adf = token_value;
489           break;
490         }
491       case kCmo_flag:
492         {
493           if (check_float(linetoken3))
494             token3 >> token_value;
495           else
496             uiuc_warnings_errors(1, *command_line);
497           
498           kCmo = token_value;
499           break;
500         }
501       case kCm_a_flag:
502         {
503           if (check_float(linetoken3))
504             token3 >> token_value;
505           else
506             uiuc_warnings_errors(1, *command_line);
507           
508           kCm_a = token_value;
509           break;
510         }
511       case kCm_a2_flag:
512         {
513           if (check_float(linetoken3))
514             token3 >> token_value;
515           else
516             uiuc_warnings_errors(1, *command_line);
517           
518           kCm_a2 = token_value;
519           break;
520         }
521       case kCm_adot_flag:
522         {
523           if (check_float(linetoken3))
524             token3 >> token_value;
525           else
526             uiuc_warnings_errors(1, *command_line);
527           
528           kCm_adot = token_value;
529           break;
530         }
531       case kCm_q_flag:
532         {
533           if (check_float(linetoken3))
534             token3 >> token_value;
535           else
536             uiuc_warnings_errors(1, *command_line);
537           
538           kCm_q = token_value;
539           break;
540         }
541       case kCm_de_flag:
542         {
543           if (check_float(linetoken3))
544             token3 >> token_value;
545           else
546             uiuc_warnings_errors(1, *command_line);
547           
548           kCm_de = token_value;
549           break;
550         }
551       case kCm_b2_flag:
552         {
553           if (check_float(linetoken3))
554             token3 >> token_value;
555           else
556             uiuc_warnings_errors(1, *command_line);
557           
558           kCm_b2 = token_value;
559           break;
560         }
561       case kCm_r_flag:
562         {
563           if (check_float(linetoken3))
564             token3 >> token_value;
565           else
566             uiuc_warnings_errors(1, *command_line);
567           
568           kCm_r = token_value;
569           break;
570         }
571       case kCm_df_flag:
572         {
573           if (check_float(linetoken3))
574             token3 >> token_value;
575           else
576             uiuc_warnings_errors(1, *command_line);
577           
578           kCm_df = token_value;
579           break;
580         }
581       case kCYo_flag:
582         {
583           if (check_float(linetoken3))
584             token3 >> token_value;
585           else
586             uiuc_warnings_errors(1, *command_line);
587           
588           kCYo = token_value;
589           break;
590         }
591       case kCY_beta_flag:
592         {
593           if (check_float(linetoken3))
594             token3 >> token_value;
595           else
596             uiuc_warnings_errors(1, *command_line);
597           
598           kCY_beta = token_value;
599           break;
600         }
601       case kCY_p_flag:
602         {
603           if (check_float(linetoken3))
604             token3 >> token_value;
605           else
606             uiuc_warnings_errors(1, *command_line);
607           
608           kCY_p = token_value;
609           break;
610         }
611       case kCY_r_flag:
612         {
613           if (check_float(linetoken3))
614             token3 >> token_value;
615           else
616             uiuc_warnings_errors(1, *command_line);
617           
618           kCY_r = token_value;
619           break;
620         }
621       case kCY_da_flag:
622         {
623           if (check_float(linetoken3))
624             token3 >> token_value;
625           else
626             uiuc_warnings_errors(1, *command_line);
627           
628           kCY_da = token_value;
629           break;
630         }
631       case kCY_dr_flag:
632         {
633           if (check_float(linetoken3))
634             token3 >> token_value;
635           else
636             uiuc_warnings_errors(1, *command_line);
637           
638           kCY_dr = token_value;
639           break;
640         }
641       case kCY_dra_flag:
642         {
643           if (check_float(linetoken3))
644             token3 >> token_value;
645           else
646             uiuc_warnings_errors(1, *command_line);
647           
648           kCY_dra = token_value;
649           break;
650         }
651       case kCY_bdot_flag:
652         {
653           if (check_float(linetoken3))
654             token3 >> token_value;
655           else
656             uiuc_warnings_errors(1, *command_line);
657           
658           kCY_bdot = token_value;
659           break;
660         }
661       case kClo_flag:
662         {
663           if (check_float(linetoken3))
664             token3 >> token_value;
665           else
666             uiuc_warnings_errors(1, *command_line);
667           
668           kClo = token_value;
669           break;
670         }
671       case kCl_beta_flag:
672         {
673           if (check_float(linetoken3))
674             token3 >> token_value;
675           else
676             uiuc_warnings_errors(1, *command_line);
677           
678           kCl_beta = token_value;
679           break;
680         }
681       case kCl_p_flag:
682         {
683           if (check_float(linetoken3))
684             token3 >> token_value;
685           else
686             uiuc_warnings_errors(1, *command_line);
687           
688           kCl_p = token_value;
689           break;
690         }
691       case kCl_r_flag:
692         {
693           if (check_float(linetoken3))
694             token3 >> token_value;
695           else
696             uiuc_warnings_errors(1, *command_line);
697           
698           kCl_r = token_value;
699           break;
700         }
701       case kCl_da_flag:
702         {
703           if (check_float(linetoken3))
704             token3 >> token_value;
705           else
706             uiuc_warnings_errors(1, *command_line);
707           
708           kCl_da = token_value;
709           break;
710         }
711       case kCl_dr_flag:
712         {
713           if (check_float(linetoken3))
714             token3 >> token_value;
715           else
716             uiuc_warnings_errors(1, *command_line);
717           
718           kCl_dr = token_value;
719           break;
720         }
721       case kCl_daa_flag:
722         {
723           if (check_float(linetoken3))
724             token3 >> token_value;
725           else
726             uiuc_warnings_errors(1, *command_line);
727           
728           kCl_daa = token_value;
729           break;
730         }
731       case kCno_flag:
732         {
733           if (check_float(linetoken3))
734             token3 >> token_value;
735           else
736             uiuc_warnings_errors(1, *command_line);
737           
738           kCno = token_value;
739           break;
740         }
741       case kCn_beta_flag:
742         {
743           if (check_float(linetoken3))
744             token3 >> token_value;
745           else
746             uiuc_warnings_errors(1, *command_line);
747           
748           kCn_beta = token_value;
749           break;
750         }
751       case kCn_p_flag:
752         {
753           if (check_float(linetoken3))
754             token3 >> token_value;
755           else
756             uiuc_warnings_errors(1, *command_line);
757           
758           kCn_p = token_value;
759           break;
760         }
761       case kCn_r_flag:
762         {
763           if (check_float(linetoken3))
764             token3 >> token_value;
765           else
766             uiuc_warnings_errors(1, *command_line);
767           
768           kCn_r = token_value;
769           break;
770         }
771       case kCn_da_flag:
772         {
773           if (check_float(linetoken3))
774             token3 >> token_value;
775           else
776             uiuc_warnings_errors(1, *command_line);
777           
778           kCn_da = token_value;
779           break;
780         }
781       case kCn_dr_flag:
782         {
783           if (check_float(linetoken3))
784             token3 >> token_value;
785           else
786             uiuc_warnings_errors(1, *command_line);
787           
788           kCn_dr = token_value;
789           break;
790         }
791       case kCn_q_flag:
792         {
793           if (check_float(linetoken3))
794             token3 >> token_value;
795           else
796             uiuc_warnings_errors(1, *command_line);
797           
798           kCn_q = token_value;
799           break;
800         }
801       case kCn_b3_flag:
802         {
803           if (check_float(linetoken3))
804             token3 >> token_value;
805           else
806             uiuc_warnings_errors(1, *command_line);
807           
808           kCn_b3 = token_value;
809           break;
810         }
811       case bootTime_flag:
812         {
813           int index;
814           if (check_float(linetoken4))
815             token4 >> token_value;
816           else
817             uiuc_warnings_errors(1, *command_line);
818           token3 >> index;
819           if (index < 0 || index >= 20)
820             uiuc_warnings_errors(1, *command_line);
821           bootTime[index] = token_value;
822           bootTrue[index] = true;
823           break;
824         }  
825       case eta_wing_left_input_flag:
826         {
827           eta_from_file = true;
828           eta_wing_left_input = true;
829           eta_wing_left_input_file = aircraft_directory + linetoken3;
830           token4 >> token_value_convert1;
831           token5 >> token_value_convert2;
832           convert_y = uiuc_convert(token_value_convert1);
833           convert_x = uiuc_convert(token_value_convert2);
834           uiuc_1DdataFileReader(eta_wing_left_input_file,
835                                 eta_wing_left_input_timeArray,
836                                 eta_wing_left_input_daArray,
837                                 eta_wing_left_input_ntime);
838           token6 >> token_value;
839           eta_wing_left_input_startTime = token_value;
840           break;
841         }
842       case eta_wing_right_input_flag:
843         {
844           eta_from_file = true;
845           eta_wing_right_input = true;
846           eta_wing_right_input_file = aircraft_directory + linetoken3;
847           token4 >> token_value_convert1;
848           token5 >> token_value_convert2;
849           convert_y = uiuc_convert(token_value_convert1);
850           convert_x = uiuc_convert(token_value_convert2);
851           uiuc_1DdataFileReader(eta_wing_right_input_file,
852                                 eta_wing_right_input_timeArray,
853                                 eta_wing_right_input_daArray,
854                                 eta_wing_right_input_ntime);
855           token6 >> token_value;
856           eta_wing_right_input_startTime = token_value;
857           break;
858         }
859       case eta_tail_input_flag:
860         {
861           eta_from_file = true;
862           eta_tail_input = true;
863           eta_tail_input_file = aircraft_directory + linetoken3;
864           token4 >> token_value_convert1;
865           token5 >> token_value_convert2;
866           convert_y = uiuc_convert(token_value_convert1);
867           convert_x = uiuc_convert(token_value_convert2);
868           uiuc_1DdataFileReader(eta_tail_input_file,
869                                 eta_tail_input_timeArray,
870                                 eta_tail_input_daArray,
871                                 eta_tail_input_ntime);
872           token6 >> token_value;
873           eta_tail_input_startTime = token_value;
874           break;
875         }
876       case nonlin_ice_case_flag:
877         {
878           token3 >> nonlin_ice_case;
879           break;
880         }
881       case eta_tail_flag:
882         {
883           if (check_float(linetoken3))
884             token3 >> token_value;
885           else
886             uiuc_warnings_errors(1, *command_line);
887
888           eta_tail = token_value;
889           break;
890         }
891       case eta_wing_left_flag:
892         {
893           if (check_float(linetoken3))
894             token3 >> token_value;
895           else
896             uiuc_warnings_errors(1, *command_line);
897
898           eta_wing_left = token_value;
899           break;
900         }
901       case eta_wing_right_flag:
902         {
903           if (check_float(linetoken3))
904             token3 >> token_value;
905           else
906             uiuc_warnings_errors(1, *command_line);
907
908           eta_wing_right = token_value;
909           break;
910         }
911       case demo_eps_alpha_max_flag:
912         {
913           demo_eps_alpha_max = true;
914           demo_eps_alpha_max_file = aircraft_directory + linetoken3;
915           token4 >> token_value_convert1;
916           token5 >> token_value_convert2;
917           convert_y = uiuc_convert(token_value_convert1);
918           convert_x = uiuc_convert(token_value_convert2);
919           uiuc_1DdataFileReader(demo_eps_alpha_max_file,
920                                 demo_eps_alpha_max_timeArray,
921                                 demo_eps_alpha_max_daArray,
922                                 demo_eps_alpha_max_ntime);
923           token6 >> token_value;
924           demo_eps_alpha_max_startTime = token_value;
925           break;
926         }
927       case demo_eps_pitch_max_flag:
928         {
929           demo_eps_pitch_max = true;
930           demo_eps_pitch_max_file = aircraft_directory + linetoken3;
931           token4 >> token_value_convert1;
932           token5 >> token_value_convert2;
933           convert_y = uiuc_convert(token_value_convert1);
934           convert_x = uiuc_convert(token_value_convert2);
935           uiuc_1DdataFileReader(demo_eps_pitch_max_file,
936                                 demo_eps_pitch_max_timeArray,
937                                 demo_eps_pitch_max_daArray,
938                                 demo_eps_pitch_max_ntime);
939           token6 >> token_value;
940           demo_eps_pitch_max_startTime = token_value;
941           break;
942         }
943       case demo_eps_pitch_min_flag:
944         {
945           demo_eps_pitch_min = true;
946           demo_eps_pitch_min_file = aircraft_directory + linetoken3;
947           token4 >> token_value_convert1;
948           token5 >> token_value_convert2;
949           convert_y = uiuc_convert(token_value_convert1);
950           convert_x = uiuc_convert(token_value_convert2);
951           uiuc_1DdataFileReader(demo_eps_pitch_min_file,
952                                 demo_eps_pitch_min_timeArray,
953                                 demo_eps_pitch_min_daArray,
954                                 demo_eps_pitch_min_ntime);
955           token6 >> token_value;
956           demo_eps_pitch_min_startTime = token_value;
957           break;
958         }
959       case demo_eps_roll_max_flag:
960         {
961           demo_eps_roll_max = true;
962           demo_eps_roll_max_file = aircraft_directory + linetoken3;
963           token4 >> token_value_convert1;
964           token5 >> token_value_convert2;
965           convert_y = uiuc_convert(token_value_convert1);
966           convert_x = uiuc_convert(token_value_convert2);
967           uiuc_1DdataFileReader(demo_eps_roll_max_file,
968                                 demo_eps_roll_max_timeArray,
969                                 demo_eps_roll_max_daArray,
970                                 demo_eps_roll_max_ntime);
971           token6 >> token_value;
972           demo_eps_roll_max_startTime = token_value;
973           break;
974         }
975       case demo_eps_thrust_min_flag:
976         {
977           demo_eps_thrust_min = true;
978           demo_eps_thrust_min_file = aircraft_directory + linetoken3;
979           token4 >> token_value_convert1;
980           token5 >> token_value_convert2;
981           convert_y = uiuc_convert(token_value_convert1);
982           convert_x = uiuc_convert(token_value_convert2);
983           uiuc_1DdataFileReader(demo_eps_thrust_min_file,
984                                 demo_eps_thrust_min_timeArray,
985                                 demo_eps_thrust_min_daArray,
986                                 demo_eps_thrust_min_ntime);
987           token6 >> token_value;
988           demo_eps_thrust_min_startTime = token_value;
989           break;
990         }
991       case demo_eps_airspeed_max_flag:
992         {
993           demo_eps_airspeed_max = true;
994           demo_eps_airspeed_max_file = aircraft_directory + linetoken3;
995           token4 >> token_value_convert1;
996           token5 >> token_value_convert2;
997           convert_y = uiuc_convert(token_value_convert1);
998           convert_x = uiuc_convert(token_value_convert2);
999           uiuc_1DdataFileReader(demo_eps_airspeed_max_file,
1000                                 demo_eps_airspeed_max_timeArray,
1001                                 demo_eps_airspeed_max_daArray,
1002                                 demo_eps_airspeed_max_ntime);
1003           token6 >> token_value;
1004           demo_eps_airspeed_max_startTime = token_value;
1005           break;
1006         }
1007       case demo_eps_airspeed_min_flag:
1008         {
1009           demo_eps_airspeed_min = true;
1010           demo_eps_airspeed_min_file = aircraft_directory + linetoken3;
1011           token4 >> token_value_convert1;
1012           token5 >> token_value_convert2;
1013           convert_y = uiuc_convert(token_value_convert1);
1014           convert_x = uiuc_convert(token_value_convert2);
1015           uiuc_1DdataFileReader(demo_eps_airspeed_min_file,
1016                                 demo_eps_airspeed_min_timeArray,
1017                                 demo_eps_airspeed_min_daArray,
1018                                 demo_eps_airspeed_min_ntime);
1019           token6 >> token_value;
1020           demo_eps_airspeed_min_startTime = token_value;
1021           break;
1022         }
1023       case demo_eps_flap_max_flag:
1024         {
1025           demo_eps_flap_max = true;
1026           demo_eps_flap_max_file = aircraft_directory + linetoken3;
1027           token4 >> token_value_convert1;
1028           token5 >> token_value_convert2;
1029           convert_y = uiuc_convert(token_value_convert1);
1030           convert_x = uiuc_convert(token_value_convert2);
1031           uiuc_1DdataFileReader(demo_eps_flap_max_file,
1032                                 demo_eps_flap_max_timeArray,
1033                                 demo_eps_flap_max_daArray,
1034                                 demo_eps_flap_max_ntime);
1035           token6 >> token_value;
1036           demo_eps_flap_max_startTime = token_value;
1037           break;
1038         }
1039       case demo_boot_cycle_tail_flag:
1040         {
1041           demo_boot_cycle_tail = true;
1042           demo_boot_cycle_tail_file = aircraft_directory + linetoken3;
1043           token4 >> token_value_convert1;
1044           token5 >> token_value_convert2;
1045           convert_y = uiuc_convert(token_value_convert1);
1046           convert_x = uiuc_convert(token_value_convert2);
1047           uiuc_1DdataFileReader(demo_boot_cycle_tail_file,
1048                                 demo_boot_cycle_tail_timeArray,
1049                                 demo_boot_cycle_tail_daArray,
1050                                 demo_boot_cycle_tail_ntime);
1051           token6 >> token_value;
1052           demo_boot_cycle_tail_startTime = token_value;
1053           break;
1054         }
1055       case demo_boot_cycle_wing_left_flag:
1056         {
1057           demo_boot_cycle_wing_left = true;
1058           demo_boot_cycle_wing_left_file = aircraft_directory + linetoken3;
1059           token4 >> token_value_convert1;
1060           token5 >> token_value_convert2;
1061           convert_y = uiuc_convert(token_value_convert1);
1062           convert_x = uiuc_convert(token_value_convert2);
1063           uiuc_1DdataFileReader(demo_boot_cycle_wing_left_file,
1064                                 demo_boot_cycle_wing_left_timeArray,
1065                                 demo_boot_cycle_wing_left_daArray,
1066                                 demo_boot_cycle_wing_left_ntime);
1067           token6 >> token_value;
1068           demo_boot_cycle_wing_left_startTime = token_value;
1069           break;
1070         }
1071       case demo_boot_cycle_wing_right_flag:
1072         {
1073           demo_boot_cycle_wing_right = true;
1074           demo_boot_cycle_wing_right_file = aircraft_directory + linetoken3;
1075           token4 >> token_value_convert1;
1076           token5 >> token_value_convert2;
1077           convert_y = uiuc_convert(token_value_convert1);
1078           convert_x = uiuc_convert(token_value_convert2);
1079           uiuc_1DdataFileReader(demo_boot_cycle_wing_right_file,
1080                                 demo_boot_cycle_wing_right_timeArray,
1081                                 demo_boot_cycle_wing_right_daArray,
1082                                 demo_boot_cycle_wing_right_ntime);
1083           token6 >> token_value;
1084           demo_boot_cycle_wing_right_startTime = token_value;
1085           break;
1086         }
1087       case demo_eps_pitch_input_flag:
1088         {
1089           demo_eps_pitch_input = true;
1090           demo_eps_pitch_input_file = aircraft_directory + linetoken3;
1091           token4 >> token_value_convert1;
1092           token5 >> token_value_convert2;
1093           convert_y = uiuc_convert(token_value_convert1);
1094           convert_x = uiuc_convert(token_value_convert2);
1095           uiuc_1DdataFileReader(demo_eps_pitch_input_file,
1096                                 demo_eps_pitch_input_timeArray,
1097                                 demo_eps_pitch_input_daArray,
1098                                 demo_eps_pitch_input_ntime);
1099           token6 >> token_value;
1100           demo_eps_pitch_input_startTime = token_value;
1101           break;
1102         }
1103       case demo_ap_Theta_ref_deg_flag:
1104         {
1105           demo_ap_Theta_ref_deg = true;
1106           demo_ap_Theta_ref_deg_file = aircraft_directory + linetoken3;
1107           token4 >> token_value_convert1;
1108           token5 >> token_value_convert2;
1109           convert_y = uiuc_convert(token_value_convert1);
1110           convert_x = uiuc_convert(token_value_convert2);
1111           uiuc_1DdataFileReader(demo_ap_Theta_ref_deg_file,
1112                                 demo_ap_Theta_ref_deg_timeArray,
1113                                 demo_ap_Theta_ref_deg_daArray,
1114                                 demo_ap_Theta_ref_deg_ntime);
1115           token6 >> token_value;
1116           demo_ap_Theta_ref_deg_startTime = token_value;
1117           break;
1118         }
1119       case demo_ap_pah_on_flag:
1120         {
1121           demo_ap_pah_on = true;
1122           demo_ap_pah_on_file = aircraft_directory + linetoken3;
1123           token4 >> token_value_convert1;
1124           token5 >> token_value_convert2;
1125           convert_y = uiuc_convert(token_value_convert1);
1126           convert_x = uiuc_convert(token_value_convert2);
1127           uiuc_1DdataFileReader(demo_ap_pah_on_file,
1128                                 demo_ap_pah_on_timeArray,
1129                                 demo_ap_pah_on_daArray,
1130                                 demo_ap_pah_on_ntime);
1131           token6 >> token_value;
1132           demo_ap_pah_on_startTime = token_value;
1133           break;
1134         }
1135       case tactilefadef_flag:
1136         {
1137           int tactilefadef_index, i;
1138           string tactilefadef_file;
1139           double flap_value;
1140           tactilefadef = true;
1141           tactilefadef_file = aircraft_directory + linetoken3;
1142           token4 >> tactilefadef_index;
1143           if (tactilefadef_index < 0 || tactilefadef_index >= 30)
1144             uiuc_warnings_errors(1, *command_line);
1145           if (tactilefadef_index > tactilefadef_nf)
1146             tactilefadef_nf = tactilefadef_index;
1147           token5 >> flap_value;
1148           tactilefadef_fArray[tactilefadef_index] = flap_value;
1149           token6 >> token_value_convert1;
1150           token7 >> token_value_convert2;
1151           token8 >> token_value_convert3;
1152           token9 >> tactilefadef_nice;
1153           convert_z = uiuc_convert(token_value_convert1);
1154           convert_x = uiuc_convert(token_value_convert2);
1155           convert_y = uiuc_convert(token_value_convert3);
1156           /* call 2D File Reader with file name (tactilefadef_file) and 
1157              conversion factors; function returns array of 
1158              elevator deflections (deArray) and corresponding 
1159              alpha (aArray) and delta CZ (CZArray) values and 
1160              max number of terms in alpha arrays (nAlphaArray) 
1161              and delfection array (nde) */
1162           uiuc_2DdataFileReader(tactilefadef_file,
1163                                 datafile_xArray,
1164                                 datafile_yArray,
1165                                 datafile_zArray,
1166                                 datafile_nxArray,
1167                                 datafile_ny);
1168           d_2_to_3(datafile_xArray, tactilefadef_aArray, tactilefadef_index);
1169           d_1_to_2(datafile_yArray, tactilefadef_deArray, tactilefadef_index);
1170           d_2_to_3(datafile_zArray, tactilefadef_tactileArray, tactilefadef_index);
1171           i_1_to_2(datafile_nxArray, tactilefadef_nAlphaArray, tactilefadef_index);
1172           tactilefadef_nde[tactilefadef_index] = datafile_ny;
1173           if (tactilefadef_first==true)
1174             {
1175               if (tactilefadef_nice == 1)
1176                 {
1177                   tactilefadef_na_nice = datafile_nxArray[1];
1178                   tactilefadef_nde_nice = datafile_ny;
1179                   d_1_to_1(datafile_yArray, tactilefadef_deArray_nice);
1180                   for (i=1; i<=tactilefadef_na_nice; i++)
1181                     tactilefadef_aArray_nice[i] = datafile_xArray[1][i];
1182                 }
1183               tactilefadef_first=false;
1184             }
1185           break;
1186         }
1187       case tactile_pitch_flag:
1188         {
1189           tactile_pitch = 1;
1190           break;
1191         }
1192       case demo_tactile_flag:
1193         {
1194           demo_tactile = true;
1195           demo_tactile_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(demo_tactile_file,
1201                                 demo_tactile_timeArray,
1202                                 demo_tactile_daArray,
1203                                 demo_tactile_ntime);
1204           token6 >> token_value;
1205           demo_tactile_startTime = token_value;
1206           break;
1207         }
1208       case demo_ice_tail_flag:
1209         {
1210           demo_ice_tail = true;
1211           demo_ice_tail_file = aircraft_directory + linetoken3;
1212           token4 >> token_value_convert1;
1213           token5 >> token_value_convert2;
1214           convert_y = uiuc_convert(token_value_convert1);
1215           convert_x = uiuc_convert(token_value_convert2);
1216           uiuc_1DdataFileReader(demo_ice_tail_file,
1217                                 demo_ice_tail_timeArray,
1218                                 demo_ice_tail_daArray,
1219                                 demo_ice_tail_ntime);
1220           token6 >> token_value;
1221           demo_ice_tail_startTime = token_value;
1222           break;
1223         }
1224       case demo_ice_left_flag:
1225         {
1226           demo_ice_left = true;
1227           demo_ice_left_file = aircraft_directory + linetoken3;
1228           token4 >> token_value_convert1;
1229           token5 >> token_value_convert2;
1230           convert_y = uiuc_convert(token_value_convert1);
1231           convert_x = uiuc_convert(token_value_convert2);
1232           uiuc_1DdataFileReader(demo_ice_left_file,
1233                                 demo_ice_left_timeArray,
1234                                 demo_ice_left_daArray,
1235                                 demo_ice_left_ntime);
1236           token6 >> token_value;
1237           demo_ice_left_startTime = token_value;
1238           break;
1239         }
1240       case demo_ice_right_flag:
1241         {
1242           demo_ice_right = true;
1243           demo_ice_right_file = aircraft_directory + linetoken3;
1244           token4 >> token_value_convert1;
1245           token5 >> token_value_convert2;
1246           convert_y = uiuc_convert(token_value_convert1);
1247           convert_x = uiuc_convert(token_value_convert2);
1248           uiuc_1DdataFileReader(demo_ice_right_file,
1249                                 demo_ice_right_timeArray,
1250                                 demo_ice_right_daArray,
1251                                 demo_ice_right_ntime);
1252           token6 >> token_value;
1253           demo_ice_right_startTime = token_value;
1254           break;
1255         }
1256       default:
1257         {
1258           if (ignore_unknown_keywords) {
1259             // do nothing
1260           } else {
1261             // print error message
1262             uiuc_warnings_errors(2, *command_line);
1263           }
1264           break;
1265         }
1266       };
1267 }