]> git.mxchange.org Git - flightgear.git/commitdiff
UIUC FDM - detabbing of all files.
authorEdward d'Auvergne <edward@nmr-relax.com>
Thu, 10 Dec 2015 09:04:45 +0000 (10:04 +0100)
committerEdward d'Auvergne <edward@nmr-relax.com>
Thu, 10 Dec 2015 09:04:45 +0000 (10:04 +0100)
All '\t' have been replaced with 8 spaces, as most of the code is indented with spaces.

90 files changed:
src/FDM/UIUCModel/Documentation/README-uiucDoc.txt
src/FDM/UIUCModel/uiuc_1DdataFileReader.h
src/FDM/UIUCModel/uiuc_1Dinterpolation.cpp
src/FDM/UIUCModel/uiuc_1Dinterpolation.h
src/FDM/UIUCModel/uiuc_2DdataFileReader.cpp
src/FDM/UIUCModel/uiuc_3Dinterpolation.cpp
src/FDM/UIUCModel/uiuc_3Dinterpolation.h
src/FDM/UIUCModel/uiuc_aerodeflections.cpp
src/FDM/UIUCModel/uiuc_aircraft.h
src/FDM/UIUCModel/uiuc_alh_ap.cpp
src/FDM/UIUCModel/uiuc_alh_ap.h
src/FDM/UIUCModel/uiuc_auto_pilot.cpp
src/FDM/UIUCModel/uiuc_betaprobe.cpp
src/FDM/UIUCModel/uiuc_coef_drag.cpp
src/FDM/UIUCModel/uiuc_coef_lift.cpp
src/FDM/UIUCModel/uiuc_coef_pitch.cpp
src/FDM/UIUCModel/uiuc_coef_roll.cpp
src/FDM/UIUCModel/uiuc_coef_sideforce.cpp
src/FDM/UIUCModel/uiuc_coef_yaw.cpp
src/FDM/UIUCModel/uiuc_coefficients.cpp
src/FDM/UIUCModel/uiuc_controlInput.cpp
src/FDM/UIUCModel/uiuc_convert.cpp
src/FDM/UIUCModel/uiuc_engine.cpp
src/FDM/UIUCModel/uiuc_find_position.cpp
src/FDM/UIUCModel/uiuc_find_position.h
src/FDM/UIUCModel/uiuc_flapdata.cpp
src/FDM/UIUCModel/uiuc_fog.cpp
src/FDM/UIUCModel/uiuc_gear.cpp
src/FDM/UIUCModel/uiuc_get_flapper.cpp
src/FDM/UIUCModel/uiuc_getwind.cpp
src/FDM/UIUCModel/uiuc_hh_ap.cpp
src/FDM/UIUCModel/uiuc_hh_ap.h
src/FDM/UIUCModel/uiuc_ice.cpp
src/FDM/UIUCModel/uiuc_iceboot.cpp
src/FDM/UIUCModel/uiuc_iced_nonlin.cpp
src/FDM/UIUCModel/uiuc_icing_demo.cpp
src/FDM/UIUCModel/uiuc_map_CD.cpp
src/FDM/UIUCModel/uiuc_map_CL.cpp
src/FDM/UIUCModel/uiuc_map_CY.cpp
src/FDM/UIUCModel/uiuc_map_Cm.cpp
src/FDM/UIUCModel/uiuc_map_Cn.cpp
src/FDM/UIUCModel/uiuc_map_Croll.cpp
src/FDM/UIUCModel/uiuc_map_controlSurface.cpp
src/FDM/UIUCModel/uiuc_map_engine.cpp
src/FDM/UIUCModel/uiuc_map_fog.cpp
src/FDM/UIUCModel/uiuc_map_init.cpp
src/FDM/UIUCModel/uiuc_map_keyword.cpp
src/FDM/UIUCModel/uiuc_map_record3.cpp
src/FDM/UIUCModel/uiuc_map_record4.cpp
src/FDM/UIUCModel/uiuc_menu.cpp
src/FDM/UIUCModel/uiuc_menu_CD.cpp
src/FDM/UIUCModel/uiuc_menu_CD.h
src/FDM/UIUCModel/uiuc_menu_CL.cpp
src/FDM/UIUCModel/uiuc_menu_CL.h
src/FDM/UIUCModel/uiuc_menu_CY.cpp
src/FDM/UIUCModel/uiuc_menu_CY.h
src/FDM/UIUCModel/uiuc_menu_Cm.cpp
src/FDM/UIUCModel/uiuc_menu_Cm.h
src/FDM/UIUCModel/uiuc_menu_Cn.cpp
src/FDM/UIUCModel/uiuc_menu_Cn.h
src/FDM/UIUCModel/uiuc_menu_Croll.cpp
src/FDM/UIUCModel/uiuc_menu_Croll.h
src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp
src/FDM/UIUCModel/uiuc_menu_controlSurface.h
src/FDM/UIUCModel/uiuc_menu_engine.cpp
src/FDM/UIUCModel/uiuc_menu_engine.h
src/FDM/UIUCModel/uiuc_menu_fog.cpp
src/FDM/UIUCModel/uiuc_menu_fog.h
src/FDM/UIUCModel/uiuc_menu_functions.cpp
src/FDM/UIUCModel/uiuc_menu_gear.cpp
src/FDM/UIUCModel/uiuc_menu_gear.h
src/FDM/UIUCModel/uiuc_menu_geometry.cpp
src/FDM/UIUCModel/uiuc_menu_geometry.h
src/FDM/UIUCModel/uiuc_menu_ice.cpp
src/FDM/UIUCModel/uiuc_menu_ice.h
src/FDM/UIUCModel/uiuc_menu_init.cpp
src/FDM/UIUCModel/uiuc_menu_init.h
src/FDM/UIUCModel/uiuc_menu_mass.cpp
src/FDM/UIUCModel/uiuc_menu_mass.h
src/FDM/UIUCModel/uiuc_menu_misc.cpp
src/FDM/UIUCModel/uiuc_menu_misc.h
src/FDM/UIUCModel/uiuc_menu_record.cpp
src/FDM/UIUCModel/uiuc_menu_record.h
src/FDM/UIUCModel/uiuc_pah_ap.cpp
src/FDM/UIUCModel/uiuc_pah_ap.h
src/FDM/UIUCModel/uiuc_parsefile.cpp
src/FDM/UIUCModel/uiuc_rah_ap.cpp
src/FDM/UIUCModel/uiuc_rah_ap.h
src/FDM/UIUCModel/uiuc_recorder.cpp
src/FDM/UIUCModel/uiuc_wrapper.cpp

index 9c532bd1138aa01e28c82b4438b754394a222457..bb58a00bf81042c8d1e5581a179d8176bdc87011 100644 (file)
@@ -457,9 +457,9 @@ conventions in later versions.
 # Key  Variable  Data      Units      Description                       Where Defined
 #------------------------------------------------------------------------------------
 
-init recordRate <recordRate> # [/s]   record data n times per second   uiuc_aircraft.h
+init recordRate <recordRate> # [/s]   record data n times per second    uiuc_aircraft.h
 
-# [s]   time to start recording output data                            uiuc_aircraft.h
+# [s]   time to start recording output data                             uiuc_aircraft.h
 init recordStartTime <recordStartTime>
 
 # []    use V_rel_wind to compute control rates (instead of U_body)     uiuc_aircraft.h
@@ -540,10 +540,10 @@ controlSurface elevator_doublet <elevator_doublet_angle> ->
         <elevator_doublet_startTime> <elevator_doublet_duration>
 
 # tabulated elevator input (as function of time) with conversion
-# factor codes and starting time [s]                                   uiuc_aircraft.h
+# factor codes and starting time [s]                                    uiuc_aircraft.h
 controlSurface elevator_input <elevator_input_file> ->
         <token_value_convert1> <token_value_convert2> ->
-       <elevator_input_startTime>
+        <elevator_input_startTime>
 
 
 |controlsMixer nomix <?> # []         no controls mixing                uiuc_aircraft.h
@@ -721,10 +721,10 @@ convert1/2/3  Action
 
 ice iceTime <iceTime>   # [s]         time when icing begins            uiuc_aircraft.h
 
-# [s]   period for eta_ice to reach eta_final                          uiuc_aircraft.h
+# [s]   period for eta_ice to reach eta_final                           uiuc_aircraft.h
 ice transientTime <transientTime>
 
-# []    icing severity factor                                          uiuc_aircraft.h
+# []    icing severity factor                                           uiuc_aircraft.h
 ice eta_ice_final <eta_ice_final>
 
 ice kCDo <kCDo>         # []          icing constant for CDo            uiuc_aircraft.h
index 7021554e7165405909e134d150a4c3364b9a0a98..90ec18a4e2a1ed7e29de52057f9a06e5b4d38410 100644 (file)
@@ -17,8 +17,8 @@ int uiuc_1DdataFileReader( string file_name,
                             double y[], 
                             int &xmax );
 int uiuc_1DdataFileReader( string file_name, 
-                          double x[], 
-                          int y[], 
-                          int &xmax );
+                           double x[], 
+                           int y[], 
+                           int &xmax );
 
 #endif // _1D_DATA_FILE_READER_H_
index 328081cda1a0a8e5680505fa33ba6040759602e5..04b5cda22e9f6b03a30821cc9cbdb23c36d06327 100644 (file)
@@ -154,11 +154,11 @@ int uiuc_1Dinterpolation( double xData[], int yData[], int xmax, double x )
 
       xdiff = x2 - x1;
       if (y1 == y2)
-       yfx = y1;
+        yfx = y1;
       else if (x < x1+xdiff/2)
-       yfx = y1;
+        yfx = y1;
       else
-       yfx = y2;
+        yfx = y2;
     }
   return yfx;
 }
index 4dccccb53fae75d2482ac1f522c3fda7ff7b8ae6..70d9c5a0e0250dec8837a5e5238cbf904144a0f7 100644 (file)
@@ -6,8 +6,8 @@ double uiuc_1Dinterpolation( double xData[100],
                              int xmax, 
                              double x );
 int uiuc_1Dinterpolation( double xData[], 
-                         int yData[], 
-                         int xmax, 
-                         double x );
+                          int yData[], 
+                          int xmax, 
+                          double x );
 
 #endif // _1D_INTERPOLATION_H_
index 6faabfdce635566be33ad99cc066a0b9bc021673..58eae4e54683ad0f6b51e3267f926833c69e0650 100644 (file)
@@ -19,7 +19,7 @@
 
  HISTORY:      02/29/2000   initial release
                10/25/2001   (RD) Modified so that it recognizes a
-                           blank line
+                            blank line
                06/30/2003   (RD) replaced istrstream with istringstream
                             to get rid of the annoying warning about
                             using the strstream header
index 34991d2c2ceac597fa0942fd0be22d42359d3fdf..837a7440da9cb0223f8dd54f9b0f6654137288f8 100644 (file)
@@ -6,8 +6,8 @@
 
  DESCRIPTION:  A 3D interpolator.  Does a linear interpolation between
                two values that were found from using the 2D
-              interpolator (3Dinterpolation()), or uses 3Dinterp_quick()
-              to perform a 3D linear interpolation on "nice" data
+               interpolator (3Dinterpolation()), or uses 3Dinterp_quick()
+               to perform a 3D linear interpolation on "nice" data
 
 ----------------------------------------------------------------------
 
 
  HISTORY:      11/07/2001   initial release
                02/18/2002   (RD) Created uiuc_3Dinterp_quick() to take
-                           advantage of the "nice" format of the
-                           nonlinear Twin Otter data.  Performs a
-                           quicker 3D interpolation.  Modified
-                           uiuc_3Dinterpolation() to handle new input
-                           form of the data.
+                            advantage of the "nice" format of the
+                            nonlinear Twin Otter data.  Performs a
+                            quicker 3D interpolation.  Modified
+                            uiuc_3Dinterpolation() to handle new input
+                            form of the data.
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Robert Deters      <rdeters@uiuc.edu>
 
  CALLED BY:    uiuc_coef_drag
                uiuc_coef_lift
-              uiuc_coef_pitch
-              uiuc_coef_roll
-              uiuc_coef_sideforce
-              uiuc_coef_yaw
+               uiuc_coef_pitch
+               uiuc_coef_roll
+               uiuc_coef_sideforce
+               uiuc_coef_yaw
 
 ----------------------------------------------------------------------
 
 #include "uiuc_3Dinterpolation.h"
 
 void uiuc_1DtoSingle( int temp1Darray[30], 
-                     int filenumber,
-                     int &single_value)
+                      int filenumber,
+                      int &single_value)
 {
   single_value = temp1Darray[filenumber];
 }
 
 void uiuc_2Dto1D( double temp2Darray[30][100], 
-                 int filenumber,
-                 double array1D[100])
+                  int filenumber,
+                  double array1D[100])
 {
   int count1;
   
@@ -97,8 +97,8 @@ void uiuc_2Dto1D( double temp2Darray[30][100],
 }
 
 void uiuc_2Dto1D_int( int temp2Darray[30][100], 
-                     int filenumber,
-                     int array1D[100])
+                      int filenumber,
+                      int array1D[100])
 {
   int count1;
   
@@ -109,30 +109,30 @@ void uiuc_2Dto1D_int( int temp2Darray[30][100],
 }
 
 void uiuc_3Dto2D( double temp3Darray[30][100][100],
-                 int filenumber,
-                 double array2D[100][100])
+                  int filenumber,
+                  double array2D[100][100])
 {
   int count1, count2;
   
   for (count1=0; count1<=99; count1++)
     {
       for (count2=0; count2<=99; count2++)
-       {
-         array2D[count1][count2] = temp3Darray[filenumber][count1][count2];
-       }
+        {
+          array2D[count1][count2] = temp3Darray[filenumber][count1][count2];
+        }
     }
 }
 
 double uiuc_3Dinterpolation( double third_Array[30],
-                            double full_xArray[30][100][100],
-                            double full_yArray[30][100],
-                            double full_zArray[30][100][100],
-                            int full_nxArray[30][100],
-                            int full_ny[30],
-                            int third_max,
-                            double third_bet,
-                            double x_value,
-                            double y_value)
+                             double full_xArray[30][100][100],
+                             double full_yArray[30][100],
+                             double full_zArray[30][100][100],
+                             int full_nxArray[30][100],
+                             int full_ny[30],
+                             int third_max,
+                             double third_bet,
+                             double x_value,
+                             double y_value)
 {
   double reduced_xArray[100][100], reduced_yArray[100];
   double reduced_zArray[100][100];
@@ -157,9 +157,9 @@ double uiuc_3Dinterpolation( double third_Array[30],
   else
     {
       while (third_Array[k] <= third_bet)
-       {
-         k++;
-       }
+        {
+          k++;
+        }
       third_max = k;
       third_min = k-1;
     }
@@ -173,12 +173,12 @@ double uiuc_3Dinterpolation( double third_Array[30],
       uiuc_1DtoSingle(full_ny, third_min, reduced_ny);
 
       interpI = uiuc_2Dinterpolation(reduced_xArray,
-                                    reduced_yArray,
-                                    reduced_zArray,
-                                    reduced_nxArray,
-                                    reduced_ny,
-                                    x_value,
-                                    y_value);
+                                     reduced_yArray,
+                                     reduced_zArray,
+                                     reduced_nxArray,
+                                     reduced_ny,
+                                     x_value,
+                                     y_value);
     }
   else
     {
@@ -189,12 +189,12 @@ double uiuc_3Dinterpolation( double third_Array[30],
       uiuc_1DtoSingle(full_ny, third_min, reduced_ny);
 
       interpmin = uiuc_2Dinterpolation(reduced_xArray,
-                                    reduced_yArray,
-                                    reduced_zArray,
-                                    reduced_nxArray,
-                                    reduced_ny,
-                                    x_value,
-                                    y_value);
+                                     reduced_yArray,
+                                     reduced_zArray,
+                                     reduced_nxArray,
+                                     reduced_ny,
+                                     x_value,
+                                     y_value);
 
       uiuc_3Dto2D(full_xArray, third_max, reduced_xArray);
       uiuc_2Dto1D(full_yArray, third_max, reduced_yArray);
@@ -203,12 +203,12 @@ double uiuc_3Dinterpolation( double third_Array[30],
       uiuc_1DtoSingle(full_ny, third_max, reduced_ny);
 
       interpmax = uiuc_2Dinterpolation(reduced_xArray,
-                                    reduced_yArray,
-                                    reduced_zArray,
-                                    reduced_nxArray,
-                                    reduced_ny,
-                                    x_value,
-                                    y_value);
+                                     reduced_yArray,
+                                     reduced_zArray,
+                                     reduced_nxArray,
+                                     reduced_ny,
+                                     x_value,
+                                     y_value);
 
       third_u = third_Array[third_max];
       third_l = third_Array[third_min];
@@ -222,15 +222,15 @@ double uiuc_3Dinterpolation( double third_Array[30],
 
 
 double uiuc_3Dinterp_quick( double z[30],
-                           double x[100],
-                           double y[100],
-                           double fxyz[30][100][100],
-                           int xmax,
-                           int ymax,
-                           int zmax,
-                           double zp,
-                           double xp,
-                           double yp)
+                            double x[100],
+                            double y[100],
+                            double fxyz[30][100][100],
+                            int xmax,
+                            int ymax,
+                            int zmax,
+                            double zp,
+                            double xp,
+                            double yp)
 {
 
   int xnuml, xnumu, ynuml, ynumu, znuml, znumu;
@@ -264,7 +264,7 @@ double uiuc_3Dinterp_quick( double z[30],
   else
     {
       while (z[k] <= zp)
-       k++;
+        k++;
       zu=z[k];
       zl=z[k-1];
       znumu=k;
@@ -285,7 +285,7 @@ double uiuc_3Dinterp_quick( double z[30],
   else
     {
       while (y[j] <= yp)
-       j++;
+        j++;
       yu=y[j];
       yl=y[j-1];
       ynumu=j;
@@ -307,7 +307,7 @@ double uiuc_3Dinterp_quick( double z[30],
   else
     {
       while (x[i] <= xp)
-       i++;
+        i++;
       xu=x[i];
       xl=x[i-1];
       xnumu=i;
@@ -317,78 +317,78 @@ double uiuc_3Dinterp_quick( double z[30],
   if (zsame)
     {
       if (ysame && xsame)
-       {
-         data_point = fxyz[znuml][ynuml][xnuml];
-       }
+        {
+          data_point = fxyz[znuml][ynuml][xnuml];
+        }
       else if (ysame)
-       {
-         ptxl = fxyz[znuml][ynuml][xnuml];
-         ptxu = fxyz[znuml][ynuml][xnumu];
-         data_point = ptxu - (xu-xp)*(ptxu-ptxl)/(xu-xl);
-       }
+        {
+          ptxl = fxyz[znuml][ynuml][xnuml];
+          ptxu = fxyz[znuml][ynuml][xnumu];
+          data_point = ptxu - (xu-xp)*(ptxu-ptxl)/(xu-xl);
+        }
       else if (xsame)
-       {
-         ptyl = fxyz[znuml][ynuml][xnuml];
-         ptyu = fxyz[znuml][ynumu][xnuml];
-         data_point = ptyu - (yu-yp)*(ptyu-ptyl)/(yu-yl);
-       }
+        {
+          ptyl = fxyz[znuml][ynuml][xnuml];
+          ptyu = fxyz[znuml][ynumu][xnuml];
+          data_point = ptyu - (yu-yp)*(ptyu-ptyl)/(yu-yl);
+        }
       else
-       {
-         ptylxl = fxyz[znuml][ynuml][xnuml];
-         ptylxu = fxyz[znuml][ynuml][xnumu];
-         ptyuxl = fxyz[znuml][ynumu][xnuml];
-         ptyuxu = fxyz[znuml][ynumu][xnumu];
-         ptyl = ptylxu - (xu-xp)*(ptylxu-ptylxl)/(xu-xl);
-         ptyu = ptyuxu - (xu-xp)*(ptyuxu-ptyuxl)/(xu-xl);
-         data_point = ptyu - (yu-yp)*(ptyu-ptyl)/(yu-yl);
-       }
+        {
+          ptylxl = fxyz[znuml][ynuml][xnuml];
+          ptylxu = fxyz[znuml][ynuml][xnumu];
+          ptyuxl = fxyz[znuml][ynumu][xnuml];
+          ptyuxu = fxyz[znuml][ynumu][xnumu];
+          ptyl = ptylxu - (xu-xp)*(ptylxu-ptylxl)/(xu-xl);
+          ptyu = ptyuxu - (xu-xp)*(ptyuxu-ptyuxl)/(xu-xl);
+          data_point = ptyu - (yu-yp)*(ptyu-ptyl)/(yu-yl);
+        }
     }
   else
     {
       if (ysame && xsame)
-       {
-         ptzl = fxyz[znuml][ynuml][xnuml];
-         ptzu = fxyz[znumu][ynuml][xnuml];
-         data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
-       }
+        {
+          ptzl = fxyz[znuml][ynuml][xnuml];
+          ptzu = fxyz[znumu][ynuml][xnuml];
+          data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
+        }
       else if (ysame)
-       {
-         ptzlxl = fxyz[znuml][ynuml][xnuml];
-         ptzlxu = fxyz[znuml][ynuml][xnumu];
-         ptzuxl = fxyz[znumu][ynuml][xnuml];
-         ptzuxu = fxyz[znumu][ynuml][xnumu];
-         ptzl = ptzlxu - (xu-xp)*(ptzlxu-ptzlxl)/(xu-xl);
-         ptzu = ptzuxu - (xu-xp)*(ptzuxu-ptzuxl)/(xu-xl);
-         data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
-       }
+        {
+          ptzlxl = fxyz[znuml][ynuml][xnuml];
+          ptzlxu = fxyz[znuml][ynuml][xnumu];
+          ptzuxl = fxyz[znumu][ynuml][xnuml];
+          ptzuxu = fxyz[znumu][ynuml][xnumu];
+          ptzl = ptzlxu - (xu-xp)*(ptzlxu-ptzlxl)/(xu-xl);
+          ptzu = ptzuxu - (xu-xp)*(ptzuxu-ptzuxl)/(xu-xl);
+          data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
+        }
       else if (xsame)
-       {
-         ptzlyl = fxyz[znuml][ynuml][xnuml];
-         ptzlyu = fxyz[znuml][ynumu][xnuml];
-         ptzuyl = fxyz[znumu][ynuml][xnuml];
-         ptzuyu = fxyz[znumu][ynumu][xnuml];
-         ptzl = ptzlyu - (yu-yp)*(ptzlyu-ptzlyl)/(yu-yl);
-         ptzu = ptzuyu - (yu-yp)*(ptzuyu-ptzuyl)/(yu-yl);
-         data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
-       }
+        {
+          ptzlyl = fxyz[znuml][ynuml][xnuml];
+          ptzlyu = fxyz[znuml][ynumu][xnuml];
+          ptzuyl = fxyz[znumu][ynuml][xnuml];
+          ptzuyu = fxyz[znumu][ynumu][xnuml];
+          ptzl = ptzlyu - (yu-yp)*(ptzlyu-ptzlyl)/(yu-yl);
+          ptzu = ptzuyu - (yu-yp)*(ptzuyu-ptzuyl)/(yu-yl);
+          data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
+        }
       else
-       {
-         ptzlylxl = fxyz[znuml][ynuml][xnuml];
-         ptzlylxu = fxyz[znuml][ynuml][xnumu];
-         ptzlyuxl = fxyz[znuml][ynumu][xnuml];
-         ptzlyuxu = fxyz[znuml][ynumu][xnumu];
-         ptzuylxl = fxyz[znumu][ynuml][xnuml];
-         ptzuylxu = fxyz[znumu][ynuml][xnumu];
-         ptzuyuxl = fxyz[znumu][ynumu][xnuml];
-         ptzuyuxu = fxyz[znumu][ynumu][xnumu];
-         ptzlyl = ptzlylxu - (xu-xp)*(ptzlylxu-ptzlylxl)/(xu-xl);
-         ptzlyu = ptzlyuxu - (xu-xp)*(ptzlyuxu-ptzlyuxl)/(xu-xl);
-         ptzuyl = ptzuylxu - (xu-xp)*(ptzuylxu-ptzuylxl)/(xu-xl);
-         ptzuyu = ptzuyuxu - (xu-xp)*(ptzuyuxu-ptzuyuxl)/(xu-xl);
-         ptzl = ptzlyu - (yu-yp)*(ptzlyu-ptzlyl)/(yu-yl);
-         ptzu = ptzuyu - (yu-yp)*(ptzuyu-ptzuyl)/(yu-yl);
-         data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
-       }
+        {
+          ptzlylxl = fxyz[znuml][ynuml][xnuml];
+          ptzlylxu = fxyz[znuml][ynuml][xnumu];
+          ptzlyuxl = fxyz[znuml][ynumu][xnuml];
+          ptzlyuxu = fxyz[znuml][ynumu][xnumu];
+          ptzuylxl = fxyz[znumu][ynuml][xnuml];
+          ptzuylxu = fxyz[znumu][ynuml][xnumu];
+          ptzuyuxl = fxyz[znumu][ynumu][xnuml];
+          ptzuyuxu = fxyz[znumu][ynumu][xnumu];
+          ptzlyl = ptzlylxu - (xu-xp)*(ptzlylxu-ptzlylxl)/(xu-xl);
+          ptzlyu = ptzlyuxu - (xu-xp)*(ptzlyuxu-ptzlyuxl)/(xu-xl);
+          ptzuyl = ptzuylxu - (xu-xp)*(ptzuylxu-ptzuylxl)/(xu-xl);
+          ptzuyu = ptzuyuxu - (xu-xp)*(ptzuyuxu-ptzuyuxl)/(xu-xl);
+          ptzl = ptzlyu - (yu-yp)*(ptzlyu-ptzlyl)/(yu-yl);
+          ptzu = ptzuyu - (yu-yp)*(ptzuyu-ptzuyl)/(yu-yl);
+          data_point = ptzu - (zu-zp)*(ptzu-ptzl)/(zu-zl);
+        }
 
     }
 
index 3ae2187dc41d3e0f49d44583d6bfe2fbbc2dd2db..814979e652d762bc03ee44c3d265f49311f797c3 100644 (file)
@@ -8,24 +8,24 @@
 
 
 double uiuc_3Dinterpolation( double third_Array[30],
-                            double full_xArray[30][100][100],
-                            double full_yArray[30][100],
-                            double full_zArray[30][100][100],
-                            int full_nxArray[30][100],
-                            int full_ny[30],
-                            int third_max,
-                            double third_bet,
-                            double x_value,
-                            double y_value);
+                             double full_xArray[30][100][100],
+                             double full_yArray[30][100],
+                             double full_zArray[30][100][100],
+                             int full_nxArray[30][100],
+                             int full_ny[30],
+                             int third_max,
+                             double third_bet,
+                             double x_value,
+                             double y_value);
 double uiuc_3Dinterp_quick( double z[30],
-                           double x[100],
-                           double y[100],
-                           double fxyz[30][100][100],
-                           int xmax,
-                           int ymax,
-                           int zmax,
-                           double zp,
-                           double xp,
-                           double yp);
+                            double x[100],
+                            double y[100],
+                            double fxyz[30][100][100],
+                            int xmax,
+                            int ymax,
+                            int zmax,
+                            double zp,
+                            double xp,
+                            double yp);
 
 #endif // _COEF_FLAP_H_
index 8d192b52f2d850822d7cad4dc6a9b17cbb40056b..984a24f5c0b5a35fa2a4ba056bf5ace8a583afee 100644 (file)
 
  HISTORY:      01/30/2000   initial release
                04/05/2000   (JS) added zero_Long_trim command
-              07/05/2001   (RD) removed elevator_tab addition to
-                           elevator calculation
-              11/12/2001   (RD) added new flap routine.  Needed for
-                           Twin Otter non-linear model
+               07/05/2001   (RD) removed elevator_tab addition to
+                            elevator calculation
+               11/12/2001   (RD) added new flap routine.  Needed for
+                            Twin Otter non-linear model
                12/28/2002   (MSS) added simple SAS capability
                03/03/2003   (RD) changed flap code to call
                             uiuc_find_position to determine
@@ -91,20 +91,20 @@ void uiuc_aerodeflections( double dt )
 
   if (use_uiuc_network) {
       if (pitch_trim_up)
-       elev_trim += 0.001;
+        elev_trim += 0.001;
       if (pitch_trim_down)
-       elev_trim -= 0.001;
+        elev_trim -= 0.001;
       if (elev_trim > 1.0)
-       elev_trim = 1;
+        elev_trim = 1;
       if (elev_trim < -1.0)
-       elev_trim = -1;
+        elev_trim = -1;
       Flap_handle = flap_percent * flap_max;
       if (outside_control) {
-       pilot_elev_no = true;
-       pilot_ail_no = true;
-       pilot_rud_no = true;
-       pilot_throttle_no = true;
-       Long_trim = elev_trim;
+        pilot_elev_no = true;
+        pilot_ail_no = true;
+        pilot_rud_no = true;
+        pilot_throttle_no = true;
+        Long_trim = elev_trim;
       }
   }
   
@@ -124,17 +124,17 @@ void uiuc_aerodeflections( double dt )
       demax_remain = demax + Long_trim * demax;
       demin_remain = -Long_trim * demax + demin;
       if (Long_control <= 0)
-       elevator += Long_control * demax_remain * DEG_TO_RAD;
+        elevator += Long_control * demax_remain * DEG_TO_RAD;
       else
-       elevator += Long_control * demin_remain * DEG_TO_RAD;
+        elevator += Long_control * demin_remain * DEG_TO_RAD;
     } else {
       elevator = Long_trim * demin * DEG_TO_RAD;
       demin_remain = demin - Long_trim * demin;
       demax_remain = Long_trim * demin + demax;
       if (Long_control >=0)
-       elevator += Long_control * demin_remain * DEG_TO_RAD;
+        elevator += Long_control * demin_remain * DEG_TO_RAD;
       else
-       elevator += Long_control * demax_remain * DEG_TO_RAD;
+        elevator += Long_control * demax_remain * DEG_TO_RAD;
     }
   } else {
     if ((Long_control+Long_trim) <= 0)
@@ -180,20 +180,20 @@ void uiuc_aerodeflections( double dt )
     aileron_sas = aileron_sas_KP * P_body;
     if (use_aileron_sas_max && (fabs(aileron_sas) > (aileron_sas_max * DEG_TO_RAD)))
       if (aileron_sas >= 0) {
-       aileron +=  aileron_sas_max * DEG_TO_RAD;
-       //aileron_sas = aileron_sas_max;
+        aileron +=  aileron_sas_max * DEG_TO_RAD;
+        //aileron_sas = aileron_sas_max;
       } else {
-       aileron += -aileron_sas_max * DEG_TO_RAD;
-       //aileron_sas = -aileron_sas;
+        aileron += -aileron_sas_max * DEG_TO_RAD;
+        //aileron_sas = -aileron_sas;
       }
     else
       aileron += aileron_sas;
     // don't exceed aileron deflection limits
     if (fabs(aileron) > (damax * DEG_TO_RAD)) {
       if (aileron > 0)
-       aileron =  damax * DEG_TO_RAD;
+        aileron =  damax * DEG_TO_RAD;
       else
-       aileron = -damax * DEG_TO_RAD;
+        aileron = -damax * DEG_TO_RAD;
     }
   }
   
@@ -204,11 +204,11 @@ void uiuc_aerodeflections( double dt )
     rudder_sas = rudder_sas_KR * R_body;
     if (use_rudder_sas_max && (fabs(rudder_sas) > (rudder_sas_max*DEG_TO_RAD)))
       if (rudder_sas >= 0) {
-       rudder +=  rudder_sas_max * DEG_TO_RAD;
-       //rudder_sas = rudder_sas_max;
+        rudder +=  rudder_sas_max * DEG_TO_RAD;
+        //rudder_sas = rudder_sas_max;
       } else {
-       rudder += -rudder_sas_max * DEG_TO_RAD;
-       //rudder_sas = rudder_sas_max;
+        rudder += -rudder_sas_max * DEG_TO_RAD;
+        //rudder_sas = rudder_sas_max;
       }
     else
       rudder += rudder_sas;
@@ -216,9 +216,9 @@ void uiuc_aerodeflections( double dt )
     // i.e. equal rudder throws left and right
     if (fabs(rudder) > drmax) {
       if (rudder > 0)
-       rudder =  drmax * DEG_TO_RAD;
+        rudder =  drmax * DEG_TO_RAD;
       else
-       rudder = -drmax * DEG_TO_RAD;
+        rudder = -drmax * DEG_TO_RAD;
     }
   }
   
@@ -243,28 +243,28 @@ void uiuc_aerodeflections( double dt )
     } else {
       // otherwise in between
       if(Flap_handle != prevFlapHandle) 
-       flaps_in_transit = true;
+        flaps_in_transit = true;
       if(flaps_in_transit) {
-       int iflap = 0;
-       while (dfArray[iflap] < Flap_handle)
-         iflap++;
-       if (flap < Flap_handle) {
-         if (TimeArray[iflap] > 0)
-           flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / TimeArray[iflap+1];
-         else
-           flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / 5;
-       } else {
-         if (TimeArray[iflap+1] > 0)
-           flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / TimeArray[iflap+1];
-         else
-           flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / 5;
-       }
-       if(fabs (flap - Flap_handle) > dt * flap_transit_rate)
-         flap += flap_transit_rate * dt;
-       else {
-         flaps_in_transit = false;
-         flap = Flap_handle;
-       }
+        int iflap = 0;
+        while (dfArray[iflap] < Flap_handle)
+          iflap++;
+        if (flap < Flap_handle) {
+          if (TimeArray[iflap] > 0)
+            flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / TimeArray[iflap+1];
+          else
+            flap_transit_rate = (dfArray[iflap] - dfArray[iflap-1]) / 5;
+        } else {
+          if (TimeArray[iflap+1] > 0)
+            flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / TimeArray[iflap+1];
+          else
+            flap_transit_rate = (dfArray[iflap] - dfArray[iflap+1]) / 5;
+        }
+        if(fabs (flap - Flap_handle) > dt * flap_transit_rate)
+          flap += flap_transit_rate * dt;
+        else {
+          flaps_in_transit = false;
+          flap = Flap_handle;
+        }
       }
     }
     prevFlapHandle = Flap_handle;
@@ -274,9 +274,9 @@ void uiuc_aerodeflections( double dt )
     if (!outside_control) {
       flap_percent     = Flap_handle / 30.0;    // percent of flaps desired
       if (flap_percent>=0.31 && flap_percent<=0.35)
-       flap_percent = 1.0 / 3.0;
+        flap_percent = 1.0 / 3.0;
       if (flap_percent>=0.65 && flap_percent<=0.69)
-       flap_percent = 2.0 / 3.0;
+        flap_percent = 2.0 / 3.0;
     }
     flap_cmd_deg        = flap_percent * flap_max;  // angle of flaps desired
     flap_moving_rate = flap_rate * dt;           // amount flaps move per time step
@@ -285,11 +285,11 @@ void uiuc_aerodeflections( double dt )
     if (flap_pos < flap_cmd_deg) {
       flap_pos += flap_moving_rate;
       if (flap_pos > flap_cmd_deg)
-       flap_pos = flap_cmd_deg;
+        flap_pos = flap_cmd_deg;
     } else if (flap_pos > flap_cmd_deg) {
       flap_pos -= flap_moving_rate;
       if (flap_pos < flap_cmd_deg)
-       flap_pos = flap_cmd_deg;
+        flap_pos = flap_cmd_deg;
     } 
   }
 
index 1ade41da2b0fcf7938b63b19c8bcc468591eb02b..88c178654e06f001827497e75148ab658cd6081f 100644 (file)
                             alpha and delta_e; of CY and Cn as function 
                             of alpha and delta_r; and of Cl and Cn as 
                             functions of alpha and delta_a
-              03/02/2000   (JS) added record features for 1D and 2D 
-                           interpolations
+               03/02/2000   (JS) added record features for 1D and 2D 
+                            interpolations
                03/29/2000   (JS) added Cmfa interpolation functions 
-                           and Weight; added misc map
+                            and Weight; added misc map
                04/01/2000   (JS) added throttle, longitudinal, lateral, 
-                           and rudder inputs to record map
+                            and rudder inputs to record map
                03/09/2001   (DPM) added support for gear
-              06/18/2001   (RD) added variables needed for aileron,
-                           rudder, and throttle_pct input files.  
-                           Added Alpha, Beta, U_body, V_body, and 
+               06/18/2001   (RD) added variables needed for aileron,
+                            rudder, and throttle_pct input files.  
+                            Added Alpha, Beta, U_body, V_body, and 
                             W_body to init map.  Added variables 
-                           needed to ignore elevator, aileron, and 
-                           rudder pilot inputs.  Added CZ as a function
-                           of alpha, CZfa.  Added twinotter to engine
-                           group.
-              07/05/2001   (RD) added pilot_elev_no_check, pilot_ail_no
-                           _check, and pilot_rud_no_check variables.
-                           This allows pilot to fly aircraft after the
-                           input files have been used.
-              08/27/2001   (RD) Added xxx_init_true and xxx_init for
-                           P_body, Q_body, R_body, Phi, Theta, Psi,
-                           U_body, V_body, and W_body to help in
-                           starting the A/C at an initial condition.
-              10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cxfxxf0).
-              11/12/2001   (RD) Added variables needed for Twin Otter
-                           non-linear model with flaps (Cxfxxf). 
-                           Zero flap variables removed.
+                            needed to ignore elevator, aileron, and 
+                            rudder pilot inputs.  Added CZ as a function
+                            of alpha, CZfa.  Added twinotter to engine
+                            group.
+               07/05/2001   (RD) added pilot_elev_no_check, pilot_ail_no
+                            _check, and pilot_rud_no_check variables.
+                            This allows pilot to fly aircraft after the
+                            input files have been used.
+               08/27/2001   (RD) Added xxx_init_true and xxx_init for
+                            P_body, Q_body, R_body, Phi, Theta, Psi,
+                            U_body, V_body, and W_body to help in
+                            starting the A/C at an initial condition.
+               10/25/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model at zero flaps
+                            (Cxfxxf0).
+               11/12/2001   (RD) Added variables needed for Twin Otter
+                            non-linear model with flaps (Cxfxxf). 
+                            Zero flap variables removed.
                01/11/2002   (AP) Added keywords for bootTime
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added variables necessary to use the
-                           uiuc_3Dinterp_quick() function.  Takes
-                           advantage of data in a "nice" form (data
-                           that are in a rectangular matrix).
-              04/21/2002   (MSS) Added new variables for apparent mass effects
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added variables necessary to use the
+                            uiuc_3Dinterp_quick() function.  Takes
+                            advantage of data in a "nice" form (data
+                            that are in a rectangular matrix).
+               04/21/2002   (MSS) Added new variables for apparent mass effects
                             and options for computing *_2U coefficient
                             scale factors.
                08/29/2002   (MSS) Added simpleSingleModel
-              09/18/2002   (MSS) Added downwash options
+               09/18/2002   (MSS) Added downwash options
                03/03/2003   (RD) Changed flap_cmd_deg to flap_cmd (rad)
                03/16/2003   (RD) Added trigger variables
                08/20/2003   (RD) Removed old_flap_routine.  Changed spoiler
@@ -85,9 +85,9 @@
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
                David Megginson    <david@megginson.com>
-              Ann Peedikayil     <peedikay@uiuc.edu>
+               Ann Peedikayil          <peedikay@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -2789,7 +2789,7 @@ struct AIRCRAFT
   /* fog =========== Fog field quantities ======================== */
 
   std::map <string,int> fog_map;
-#define fog_map        aircraft_->fog_map
+#define fog_map         aircraft_->fog_map
 
   bool fog_field;
   int fog_segments;
@@ -2801,13 +2801,13 @@ struct AIRCRAFT
  
   int Fog;
   
-#define fog_field      aircraft_->fog_field
-#define fog_segments   aircraft_->fog_segments
-#define fog_point_index        aircraft_->fog_point_index
-#define fog_time       aircraft_->fog_time
-#define fog_value      aircraft_->fog_value
-#define fog_next_time  aircraft_->fog_next_time
-#define fog_current_segment    aircraft_->fog_current_segment
+#define fog_field        aircraft_->fog_field
+#define fog_segments        aircraft_->fog_segments
+#define fog_point_index        aircraft_->fog_point_index
+#define fog_time        aircraft_->fog_time
+#define fog_value        aircraft_->fog_value
+#define fog_next_time        aircraft_->fog_next_time
+#define fog_current_segment        aircraft_->fog_current_segment
 
 #define Fog             aircraft_->Fog
 
index c7e5a82532484c210f1b6786c8f427040b4a5251..384e9346aed38a345d9004b07885fabbeb5303c5 100644 (file)
@@ -40,7 +40,7 @@
 #include "uiuc_alh_ap.h"  
 
 double alh_ap(double pitch, double pitchrate, double H_ref, double H, 
-             double V, double sample_time, int init)
+              double V, double sample_time, int init)
 {
   // changes by RD so function keeps previous values
   static double u2prev;
@@ -58,36 +58,36 @@ double alh_ap(double pitch, double pitchrate, double H_ref, double H,
       ubarprev = 0;
     }
 
-       double Ki;
-       double Ktheta;
-       double Kq;
-       double deltae;
-       double Kh,Kd;
-       double x1, x2, x3;
-       Ktheta = -0.0004*V*V + 0.0479*V - 2.409;
-       Kq = -0.0005*V*V + 0.054*V - 1.5931;
-       Ki = 0.5;
-       Kh = -0.25*LS_PI/180 + (((-0.15 + 0.25)*LS_PI/180)/(20))*(V-60); 
-       Kd = -0.0025*V + 0.2875;
-       double u1,u2,u3,ubar;
-       ubar = (1-Kd*sample_time)*ubarprev + Ktheta*pitchrate*sample_time;
-       u1 = Kh*(H_ref-H) - ubar;
-       u2 = u2prev + Ki*(Kh*(H_ref-H)-ubar)*sample_time;
-       u3 = Kq*pitchrate;
-       double totalU;
-       totalU = u1 + u2 - u3;
-       u2prev = u2;
-       ubarprev = ubar;
+        double Ki;
+        double Ktheta;
+        double Kq;
+        double deltae;
+        double Kh,Kd;
+        double x1, x2, x3;
+        Ktheta = -0.0004*V*V + 0.0479*V - 2.409;
+        Kq = -0.0005*V*V + 0.054*V - 1.5931;
+        Ki = 0.5;
+        Kh = -0.25*LS_PI/180 + (((-0.15 + 0.25)*LS_PI/180)/(20))*(V-60); 
+        Kd = -0.0025*V + 0.2875;
+        double u1,u2,u3,ubar;
+        ubar = (1-Kd*sample_time)*ubarprev + Ktheta*pitchrate*sample_time;
+        u1 = Kh*(H_ref-H) - ubar;
+        u2 = u2prev + Ki*(Kh*(H_ref-H)-ubar)*sample_time;
+        u3 = Kq*pitchrate;
+        double totalU;
+        totalU = u1 + u2 - u3;
+        u2prev = u2;
+        ubarprev = ubar;
 // the following is using the actuator dynamics given in Beaver.
 // the actuator dynamics for Twin Otter are still unavailable.
-       x1 = x1prev +(-10.951*x1prev + 7.2721*x2prev + 20.7985*x3prev +
+        x1 = x1prev +(-10.951*x1prev + 7.2721*x2prev + 20.7985*x3prev +
 25.1568*totalU)*sample_time;
-       x2 = x2prev + x3prev*sample_time;
-       x3 = x3prev + (7.3446*x1prev - 668.6713*x2prev - 16.8697*x3prev +
+        x2 = x2prev + x3prev*sample_time;
+        x3 = x3prev + (7.3446*x1prev - 668.6713*x2prev - 16.8697*x3prev +
 5.8694*totalU)*sample_time;
-       deltae = 57.2958*x2;
-       x1prev = x1;
-       x2prev = x2;
-       x3prev = x3;
+        deltae = 57.2958*x2;
+        x1prev = x1;
+        x2prev = x2;
+        x3prev = x3;
 return deltae;
 } 
index 98916dcddb6334cfe4b3ee9b35176eb3aa7a2b9d..ba8d8d4058586789debbe00a71dbb222a72a8de4 100644 (file)
@@ -5,6 +5,6 @@
 #include <FDM/LaRCsim/ls_constants.h>
 
 double alh_ap(double pitch, double pitchrate, double H_ref, double H, 
-             double V, double sample_t, int init);
+              double V, double sample_t, int init);
 
 #endif //_ALH_AP_H_
index 4a769923f89465023942262f98271daf915deb07..b4f4b24289faabab51f1c45223f95db19e5534b6 100644 (file)
@@ -19,7 +19,7 @@
  HISTORY:      09/04/2003   initial release (with PAH)
                10/31/2003   added ALH autopilot
                11/04/2003   added RAH and HH autopilots
-              
+               
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Robert Deters      <rdeters@uiuc.edu>
@@ -33,7 +33,7 @@
  INPUTS:       -V_rel_wind (or U_body)
                -dyn_on_speed
                -ice on/off
-              -phugoid on/off
+               -phugoid on/off
 
 ----------------------------------------------------------------------
 
@@ -98,11 +98,11 @@ void uiuc_auto_pilot(double dt)
       //ap_pah_on_prev = true;
       //}
       elevator = pah_ap(Theta, Theta_dot, ap_Theta_ref_rad, V_rel_wind_ms, dt, 
-                       ap_pah_init);
+                        ap_pah_init);
       if (elevator*RAD_TO_DEG <= -1*demax)
-       elevator = -1*demax * DEG_TO_RAD;
+        elevator = -1*demax * DEG_TO_RAD;
       if (elevator*RAD_TO_DEG >= demin)
-       elevator = demin * DEG_TO_RAD;
+        elevator = demin * DEG_TO_RAD;
       pilot_elev_no=true;
       ap_pah_init=1;
       //printf("elv1=%f\n",elevator);
@@ -114,11 +114,11 @@ void uiuc_auto_pilot(double dt)
       //if (ap_alh_on_prev == false)
       //ap_alh_init = 0;
       elevator = alh_ap(Theta, Theta_dot, ap_alt_ref_m, Altitude_m, 
-                       V_rel_wind_ms, dt, ap_alh_init);
+                        V_rel_wind_ms, dt, ap_alh_init);
       if (elevator*RAD_TO_DEG <= -1*demax)
-       elevator = -1*demax * DEG_TO_RAD;
+        elevator = -1*demax * DEG_TO_RAD;
       if (elevator*RAD_TO_DEG >= demin)
-       elevator = demin * DEG_TO_RAD;
+        elevator = demin * DEG_TO_RAD;
       pilot_elev_no=true;
       ap_alh_init = 1;
     }
@@ -127,17 +127,17 @@ void uiuc_auto_pilot(double dt)
     {
       bw_m = bw * 0.3048;
       rah_ap(Phi, Phi_dot, ap_Phi_ref_rad, V_rel_wind_ms, dt,
-            bw_m, Psi_dot, ail_rud, ap_rah_init);
+             bw_m, Psi_dot, ail_rud, ap_rah_init);
       aileron = ail_rud[0];
       rudder = ail_rud[1];
       if (aileron*RAD_TO_DEG <= -1*damax)
-       aileron = -1*damax * DEG_TO_RAD;
+        aileron = -1*damax * DEG_TO_RAD;
       if (aileron*RAD_TO_DEG >= damin)
-       aileron = damin * DEG_TO_RAD;
+        aileron = damin * DEG_TO_RAD;
       if (rudder*RAD_TO_DEG <= -1*drmax)
-       rudder = -1*drmax * DEG_TO_RAD;
+        rudder = -1*drmax * DEG_TO_RAD;
       if (rudder*RAD_TO_DEG >= drmin)
-       rudder = drmin * DEG_TO_RAD;
+        rudder = drmin * DEG_TO_RAD;
       pilot_ail_no=true;
       pilot_rud_no=true;
       ap_rah_init = 1;
@@ -147,17 +147,17 @@ void uiuc_auto_pilot(double dt)
     {
       bw_m = bw * 0.3048;
       hh_ap(Phi, Psi, Phi_dot, ap_Psi_ref_rad, V_rel_wind_ms, dt,
-           bw_m, Psi_dot, ail_rud, ap_hh_init);
+            bw_m, Psi_dot, ail_rud, ap_hh_init);
       aileron = ail_rud[0];
       rudder = ail_rud[1];
       if (aileron*RAD_TO_DEG <= -1*damax)
-       aileron = -1*damax * DEG_TO_RAD;
+        aileron = -1*damax * DEG_TO_RAD;
       if (aileron*RAD_TO_DEG >= damin)
-       aileron = damin * DEG_TO_RAD;
+        aileron = damin * DEG_TO_RAD;
       if (rudder*RAD_TO_DEG <= -1*drmax)
-       rudder = -1*drmax * DEG_TO_RAD;
+        rudder = -1*drmax * DEG_TO_RAD;
       if (rudder*RAD_TO_DEG >= drmin)
-       rudder = drmin * DEG_TO_RAD;
+        rudder = drmin * DEG_TO_RAD;
       pilot_ail_no=true;
       pilot_rud_no=true;
       ap_hh_init = 1;
index bbfed3ed42753977a08c626f65e2db459fc58003..ae3d0e72eb9d78ffeabf70cbb6e94c64daf0ee95 100644 (file)
@@ -96,30 +96,30 @@ void uiuc_betaprobe()
   w_iced_tail = Gamma_iced_tail / (2 * LS_PI * x_probe_tail);
 
   V_total_clean_wing = sqrt(w_clean_wing*w_clean_wing + 
-                           V_rel_wind*V_rel_wind - 
-                           2*w_clean_wing*V_rel_wind * 
-                           cos(LS_PI/2 + Std_Alpha));
+                            V_rel_wind*V_rel_wind - 
+                            2*w_clean_wing*V_rel_wind * 
+                            cos(LS_PI/2 + Std_Alpha));
   V_total_iced_wing = sqrt(w_iced_wing*w_iced_wing + 
-                          V_rel_wind*V_rel_wind - 
-                          2*w_iced_wing*V_rel_wind * 
-                          cos(LS_PI/2 + Std_Alpha));
+                           V_rel_wind*V_rel_wind - 
+                           2*w_iced_wing*V_rel_wind * 
+                           cos(LS_PI/2 + Std_Alpha));
   V_total_clean_tail = sqrt(w_clean_tail*w_clean_tail + 
-                           V_rel_wind*V_rel_wind - 
-                           2*w_clean_tail*V_rel_wind * 
-                           cos(LS_PI/2 + Std_Alpha));
+                            V_rel_wind*V_rel_wind - 
+                            2*w_clean_tail*V_rel_wind * 
+                            cos(LS_PI/2 + Std_Alpha));
   V_total_iced_tail = sqrt(w_iced_tail*w_iced_tail + 
-                          V_rel_wind*V_rel_wind - 
-                          2*w_iced_tail*V_rel_wind * 
-                          cos(LS_PI/2 + Std_Alpha));
+                           V_rel_wind*V_rel_wind - 
+                           2*w_iced_tail*V_rel_wind * 
+                           cos(LS_PI/2 + Std_Alpha));
 
   beta_flow_clean_wing = asin((w_clean_wing / V_total_clean_wing) * 
-                             sin (LS_PI/2 + Std_Alpha));
+                              sin (LS_PI/2 + Std_Alpha));
   beta_flow_iced_wing = asin((w_iced_wing / V_total_iced_wing) * 
-                            sin (LS_PI/2 + Std_Alpha));
+                             sin (LS_PI/2 + Std_Alpha));
   beta_flow_clean_tail = asin((w_clean_tail / V_total_clean_tail) * 
-                             sin (LS_PI/2 + Std_Alpha));
+                              sin (LS_PI/2 + Std_Alpha));
   beta_flow_iced_tail = asin((w_iced_tail / V_total_iced_tail) * 
-                            sin (LS_PI/2 + Std_Alpha));
+                             sin (LS_PI/2 + Std_Alpha));
 
   Dbeta_flow_wing = fabs(beta_flow_clean_wing - beta_flow_iced_wing);
   Dbeta_flow_tail = fabs(beta_flow_clean_tail - beta_flow_iced_tail);
index 38cfb3192b8b0740a9a99176ba105e1a7699e741..2ef4d5aab2647b1fb4302a15c419bd47acf58c41 100644 (file)
 
  HISTORY:      04/15/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CXfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CXfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (CXfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CXfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         http://www.jeffscott.net/
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -61,8 +61,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -109,7 +109,7 @@ void uiuc_coef_drag()
               {
                 CDo = uiuc_ice_filter(CDo_clean,kCDo);
               }
-           CDo_save = CDo;
+            CDo_save = CDo;
             CD += CDo_save;
             break;
           }
@@ -119,14 +119,14 @@ void uiuc_coef_drag()
               {
                 CDK = uiuc_ice_filter(CDK_clean,kCDK);
               }
-           if (b_CLK)
-             {
-               CDK_save = CDK * (CL - CLK) * (CL - CLK);
-             }
-           else
-             {
-               CDK_save = CDK * CL * CL;
-             }
+            if (b_CLK)
+              {
+                CDK_save = CDK * (CL - CLK) * (CL - CLK);
+              }
+            else
+              {
+                CDK_save = CDK * CL * CL;
+              }
             CD += CDK_save;
             break;
           }
@@ -136,7 +136,7 @@ void uiuc_coef_drag()
               {
                 CD_a = uiuc_ice_filter(CD_a_clean,kCD_a);
               }
-           CD_a_save = CD_a * Std_Alpha;
+            CD_a_save = CD_a * Std_Alpha;
             CD += CD_a_save;
             break;
           }
@@ -148,7 +148,7 @@ void uiuc_coef_drag()
               }
             /* CD_adot must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CD_adot_save = CD_adot * Std_Alpha_dot * cbar_2U;
+            CD_adot_save = CD_adot * Std_Alpha_dot * cbar_2U;
             CD += CD_adot_save;
             break;
           }
@@ -162,13 +162,13 @@ void uiuc_coef_drag()
                (see Roskam Control book, Part 1, pg. 147) */
             /* why multiply by Theta_dot instead of Q_body? 
                see note in coef_lift.cpp */
-           CD_q_save = CD_q * Theta_dot * cbar_2U;
+            CD_q_save = CD_q * Theta_dot * cbar_2U;
             CD += CD_q_save;
             break;
           }
         case CD_ih_flag:
           {
-           CD_ih_save = fabs(CD_ih * ih);
+            CD_ih_save = fabs(CD_ih * ih);
             CD += CD_ih_save;
             break;
           }
@@ -178,43 +178,43 @@ void uiuc_coef_drag()
               {
                 CD_de = uiuc_ice_filter(CD_de_clean,kCD_de);
               }
-           CD_de_save = fabs(CD_de * elevator);
+            CD_de_save = fabs(CD_de * elevator);
             CD += CD_de_save;
             break;
           }
         case CD_dr_flag:
           {
-           CD_dr_save = fabs(CD_dr * rudder);
-           CD += CD_dr_save;
+            CD_dr_save = fabs(CD_dr * rudder);
+            CD += CD_dr_save;
             break;
           }
         case CD_da_flag:
           {
-           CD_da_save = fabs(CD_da * aileron);
+            CD_da_save = fabs(CD_da * aileron);
             CD += CD_da_save;
             break;
           }
         case CD_beta_flag:
           {
-           CD_beta_save = fabs(CD_beta * Std_Beta);
+            CD_beta_save = fabs(CD_beta * Std_Beta);
             CD += CD_beta_save;
             break;
           }
         case CD_df_flag:
           {
-           CD_df_save = fabs(CD_df * flap_pos);
+            CD_df_save = fabs(CD_df * flap_pos);
             CD += CD_df_save;
             break;
           }
         case CD_ds_flag:
           {
-           CD_ds_save = fabs(CD_ds * spoiler_pos);
+            CD_ds_save = fabs(CD_ds * spoiler_pos);
             CD += CD_ds_save;
             break;
           }
         case CD_dg_flag:
           {
-           CD_dg_save = fabs(CD_dg * gear_pos_norm);
+            CD_dg_save = fabs(CD_dg * gear_pos_norm);
             CD += CD_dg_save;
             break;
           }
@@ -282,7 +282,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CXo;
                   }
               }
-           CXo_save = CXo;
+            CXo_save = CXo;
             CX += CXo_save;
             break;
           }
@@ -299,7 +299,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CXK * CLiced_tail * CLiced_tail;
                   }
               }
-           CXK_save = CXK * CZ * CZ;
+            CXK_save = CXK * CZ * CZ;
             CX += CXK_save;
             break;
           }
@@ -316,7 +316,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_a * Std_Alpha;
                   }
               }
-           CX_a_save = CX_a * Std_Alpha;
+            CX_a_save = CX_a * Std_Alpha;
             CX += CX_a_save;
             break;
           }
@@ -333,7 +333,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_a2 * Std_Alpha * Std_Alpha;
                   }
               }
-           CX_a2_save = CX_a2 * Std_Alpha * Std_Alpha;
+            CX_a2_save = CX_a2 * Std_Alpha * Std_Alpha;
             CX += CX_a2_save;
             break;
           }
@@ -350,7 +350,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
                   }
               }
-           CX_a3_save = CX_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
+            CX_a3_save = CX_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
             CX += CX_a3_save;
             break;
           }
@@ -369,7 +369,7 @@ void uiuc_coef_drag()
               }
             /* CX_adot must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CX_adot_save = CX_adot * Std_Alpha_dot * cbar_2U;
+            CX_adot_save = CX_adot * Std_Alpha_dot * cbar_2U;
             CX += CX_adot_save;
             break;
           }
@@ -388,7 +388,7 @@ void uiuc_coef_drag()
               }
             /* CX_q must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CX_q_save = CX_q * Q_body * cbar_2U;
+            CX_q_save = CX_q * Q_body * cbar_2U;
             CX += CX_q_save;
             break;
           }
@@ -405,7 +405,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_de * elevator;
                   }
               }
-           CX_de_save = CX_de * elevator;
+            CX_de_save = CX_de * elevator;
             CX += CX_de_save;
             break;
           }
@@ -422,7 +422,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_dr * rudder;
                   }
               }
-           CX_dr_save = CX_dr * rudder;
+            CX_dr_save = CX_dr * rudder;
             CX += CX_dr_save;
             break;
           }
@@ -439,7 +439,7 @@ void uiuc_coef_drag()
                     CXiced_tail += CX * flap_pos;
                   }
               }
-           CX_df_save = CX_df * flap_pos;
+            CX_df_save = CX_df * flap_pos;
             CX += CX_df_save;
             break;
           }
@@ -456,113 +456,113 @@ void uiuc_coef_drag()
                     CXiced_tail += CX_adf * Std_Alpha * flap_pos;
                   }
               }
-           CX_adf_save = CX_adf * Std_Alpha * flap_pos;
+            CX_adf_save = CX_adf * Std_Alpha * flap_pos;
             CX += CX_adf_save;
             break;
           }
         case CXfabetaf_flag:
           {
-           if (CXfabetaf_nice == 1) {
-             CXfabetafI = uiuc_3Dinterp_quick(CXfabetaf_fArray,
-                                              CXfabetaf_aArray_nice,
-                                              CXfabetaf_bArray_nice,
-                                              CXfabetaf_CXArray,
-                                              CXfabetaf_na_nice,
-                                              CXfabetaf_nb_nice,
-                                              CXfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-             // temp until Jim's code works
-             //CXo = uiuc_3Dinterp_quick(CXfabetaf_fArray,
-             //                         CXfabetaf_aArray_nice,
-             //                         CXfabetaf_bArray_nice,
-             //                         CXfabetaf_CXArray,
-             //                         CXfabetaf_na_nice,
-             //                         CXfabetaf_nb_nice,
-             //                         CXfabetaf_nf,
-             //                         flap_pos,
-             //                         0.0,
-             //                         Std_Beta); 
-           }
-           else {
-             CXfabetafI = uiuc_3Dinterpolation(CXfabetaf_fArray,
-                                               CXfabetaf_aArray,
-                                               CXfabetaf_betaArray,
-                                               CXfabetaf_CXArray,
-                                               CXfabetaf_nAlphaArray,
-                                               CXfabetaf_nbeta,
-                                               CXfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
-             // temp until Jim's code works
-             //CXo = uiuc_3Dinterpolation(CXfabetaf_fArray,
-             //                          CXfabetaf_aArray,
-             //                          CXfabetaf_betaArray,
-             //                          CXfabetaf_CXArray,
-             //                          CXfabetaf_nAlphaArray,
-             //                          CXfabetaf_nbeta,
-             //                          CXfabetaf_nf,
-             //                          flap_pos,
-             //                          0.0,
-             //                          Std_Beta); 
-           }
-           CX += CXfabetafI;
+            if (CXfabetaf_nice == 1) {
+              CXfabetafI = uiuc_3Dinterp_quick(CXfabetaf_fArray,
+                                               CXfabetaf_aArray_nice,
+                                               CXfabetaf_bArray_nice,
+                                               CXfabetaf_CXArray,
+                                               CXfabetaf_na_nice,
+                                               CXfabetaf_nb_nice,
+                                               CXfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+              // temp until Jim's code works
+              //CXo = uiuc_3Dinterp_quick(CXfabetaf_fArray,
+              //                         CXfabetaf_aArray_nice,
+              //                         CXfabetaf_bArray_nice,
+              //                         CXfabetaf_CXArray,
+              //                         CXfabetaf_na_nice,
+              //                         CXfabetaf_nb_nice,
+              //                         CXfabetaf_nf,
+              //                         flap_pos,
+              //                         0.0,
+              //                         Std_Beta); 
+            }
+            else {
+              CXfabetafI = uiuc_3Dinterpolation(CXfabetaf_fArray,
+                                                CXfabetaf_aArray,
+                                                CXfabetaf_betaArray,
+                                                CXfabetaf_CXArray,
+                                                CXfabetaf_nAlphaArray,
+                                                CXfabetaf_nbeta,
+                                                CXfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
+              // temp until Jim's code works
+              //CXo = uiuc_3Dinterpolation(CXfabetaf_fArray,
+              //                          CXfabetaf_aArray,
+              //                          CXfabetaf_betaArray,
+              //                          CXfabetaf_CXArray,
+              //                          CXfabetaf_nAlphaArray,
+              //                          CXfabetaf_nbeta,
+              //                          CXfabetaf_nf,
+              //                          flap_pos,
+              //                          0.0,
+              //                          Std_Beta); 
+            }
+            CX += CXfabetafI;
             break;
           }
         case CXfadef_flag:
           {
-           if (CXfadef_nice == 1)
-             CXfadefI = uiuc_3Dinterp_quick(CXfadef_fArray,
-                                            CXfadef_aArray_nice,
-                                            CXfadef_deArray_nice,
-                                            CXfadef_CXArray,
-                                            CXfadef_na_nice,
-                                            CXfadef_nde_nice,
-                                            CXfadef_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            elevator);
-           else
-             CXfadefI = uiuc_3Dinterpolation(CXfadef_fArray,
-                                             CXfadef_aArray,
-                                             CXfadef_deArray,
-                                             CXfadef_CXArray,
-                                             CXfadef_nAlphaArray,
-                                             CXfadef_nde,
-                                             CXfadef_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             elevator);
+            if (CXfadef_nice == 1)
+              CXfadefI = uiuc_3Dinterp_quick(CXfadef_fArray,
+                                             CXfadef_aArray_nice,
+                                             CXfadef_deArray_nice,
+                                             CXfadef_CXArray,
+                                             CXfadef_na_nice,
+                                             CXfadef_nde_nice,
+                                             CXfadef_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             elevator);
+            else
+              CXfadefI = uiuc_3Dinterpolation(CXfadef_fArray,
+                                              CXfadef_aArray,
+                                              CXfadef_deArray,
+                                              CXfadef_CXArray,
+                                              CXfadef_nAlphaArray,
+                                              CXfadef_nde,
+                                              CXfadef_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              elevator);
             CX += CXfadefI;
             break;
           }
         case CXfaqf_flag:
           {
-           q_nondim = Q_body * cbar_2U;
-           if (CXfaqf_nice == 1)
-             CXfaqfI = uiuc_3Dinterp_quick(CXfaqf_fArray,
-                                           CXfaqf_aArray_nice,
-                                           CXfaqf_qArray_nice,
-                                           CXfaqf_CXArray,
-                                           CXfaqf_na_nice,
-                                           CXfaqf_nq_nice,
-                                           CXfaqf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           q_nondim);
-           else
-             CXfaqfI = uiuc_3Dinterpolation(CXfaqf_fArray,
-                                            CXfaqf_aArray,
-                                            CXfaqf_qArray,
-                                            CXfaqf_CXArray,
-                                            CXfaqf_nAlphaArray,
-                                            CXfaqf_nq,
-                                            CXfaqf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            q_nondim);
+            q_nondim = Q_body * cbar_2U;
+            if (CXfaqf_nice == 1)
+              CXfaqfI = uiuc_3Dinterp_quick(CXfaqf_fArray,
+                                            CXfaqf_aArray_nice,
+                                            CXfaqf_qArray_nice,
+                                            CXfaqf_CXArray,
+                                            CXfaqf_na_nice,
+                                            CXfaqf_nq_nice,
+                                            CXfaqf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            q_nondim);
+            else
+              CXfaqfI = uiuc_3Dinterpolation(CXfaqf_fArray,
+                                             CXfaqf_aArray,
+                                             CXfaqf_qArray,
+                                             CXfaqf_CXArray,
+                                             CXfaqf_nAlphaArray,
+                                             CXfaqf_nq,
+                                             CXfaqf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             q_nondim);
             CX += CXfaqfI;
             break;
           }
index c7de49eecf030b8bf93c45396c18d1860e24d1f5..731cdbfdc90e1b41e382c5df93b15f30400f4b88 100644 (file)
  HISTORY:      04/15/2000   initial release
                06/18/2001   (RD) Added CZfa
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CZfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CZfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (CZfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CZfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -63,8 +63,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -117,7 +117,7 @@ void uiuc_coef_lift()
                     CLiced_tail += CLo;
                   }
               }
-           CLo_save = CLo;
+            CLo_save = CLo;
             CL += CLo_save;
             break;
           }
@@ -134,7 +134,7 @@ void uiuc_coef_lift()
                     CLiced_tail += CL_a * Std_Alpha;
                   }
               }
-           CL_a_save = CL_a * Std_Alpha;
+            CL_a_save = CL_a * Std_Alpha;
             CL += CL_a_save;
             break;
           }
@@ -153,7 +153,7 @@ void uiuc_coef_lift()
               }
             /* CL_adot must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CL_adot_save = CL_adot * Std_Alpha_dot * cbar_2U;
+            CL_adot_save = CL_adot * Std_Alpha_dot * cbar_2U;
             CL += CL_adot_save;
             break;
           }
@@ -175,13 +175,13 @@ void uiuc_coef_lift()
             /* why multiply by Theta_dot instead of Q_body?
                that is what is done in c172_aero.c; assume it 
                has something to do with axes systems */
-           CL_q_save = CL_q * Theta_dot * cbar_2U;
+            CL_q_save = CL_q * Theta_dot * cbar_2U;
             CL += CL_q_save;
             break;
           }
         case CL_ih_flag:
           {
-           CL_ih_save = CL_ih * ih;
+            CL_ih_save = CL_ih * ih;
             CL += CL_ih_save;
             break;
           }
@@ -198,25 +198,25 @@ void uiuc_coef_lift()
                     CLiced_tail += CL_de * elevator;
                   }
               }
-           CL_de_save = CL_de * elevator;
+            CL_de_save = CL_de * elevator;
             CL += CL_de_save;
             break;
           }
         case CL_df_flag:
           {
-           CL_df_save = CL_df * flap_pos;
+            CL_df_save = CL_df * flap_pos;
             CL += CL_df_save;
             break;
           }
         case CL_ds_flag:
           {
-           CL_ds_save = CL_ds * spoiler_pos;
+            CL_ds_save = CL_ds * spoiler_pos;
             CL += CL_ds_save;
             break;
           }
         case CL_dg_flag:
           {
-           CL_dg_save = CL_dg * gear_pos_norm;
+            CL_dg_save = CL_dg * gear_pos_norm;
             CL += CL_dg_save;
             break;
           }
@@ -275,7 +275,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZo;
                   }
               }
-           CZo_save = CZo;
+            CZo_save = CZo;
             CZ += CZo_save;
             break;
           }
@@ -292,7 +292,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_a * Std_Alpha;
                   }
               }
-           CZ_a_save = CZ_a * Std_Alpha;
+            CZ_a_save = CZ_a * Std_Alpha;
             CZ += CZ_a_save;
             break;
           }
@@ -309,7 +309,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_a2 * Std_Alpha * Std_Alpha;
                   }
               }
-           CZ_a2_save = CZ_a2 * Std_Alpha * Std_Alpha;
+            CZ_a2_save = CZ_a2 * Std_Alpha * Std_Alpha;
             CZ += CZ_a2_save;
             break;
           }
@@ -326,7 +326,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
                   }
               }
-           CZ_a3_save = CZ_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
+            CZ_a3_save = CZ_a3 * Std_Alpha * Std_Alpha * Std_Alpha;
             CZ += CZ_a3_save;
             break;
           }
@@ -345,7 +345,7 @@ void uiuc_coef_lift()
               }
             /* CZ_adot must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CZ_adot_save = CZ_adot * Std_Alpha_dot * cbar_2U;
+            CZ_adot_save = CZ_adot * Std_Alpha_dot * cbar_2U;
             CZ += CZ_adot_save;
             break;
           }
@@ -364,7 +364,7 @@ void uiuc_coef_lift()
               }
             /* CZ_q must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CZ_q_save = CZ_q * Q_body * cbar_2U;
+            CZ_q_save = CZ_q * Q_body * cbar_2U;
             CZ += CZ_q_save;
             break;
           }
@@ -381,7 +381,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_de * elevator;
                   }
               }
-           CZ_de_save = CZ_de * elevator;
+            CZ_de_save = CZ_de * elevator;
             CZ += CZ_de_save;
             break;
           }
@@ -398,7 +398,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_deb2 * elevator * Std_Beta * Std_Beta;
                   }
               }
-           CZ_deb2_save = CZ_deb2 * elevator * Std_Beta * Std_Beta;
+            CZ_deb2_save = CZ_deb2 * elevator * Std_Beta * Std_Beta;
             CZ += CZ_deb2_save;
             break;
           }
@@ -415,7 +415,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_df * flap_pos;
                   }
               }
-           CZ_df_save = CZ_df * flap_pos;
+            CZ_df_save = CZ_df * flap_pos;
             CZ += CZ_df_save;
             break;
           }
@@ -432,7 +432,7 @@ void uiuc_coef_lift()
                     CZiced_tail += CZ_adf * Std_Alpha * flap_pos;
                   }
               }
-           CZ_adf_save = CZ_adf * Std_Alpha * flap_pos;
+            CZ_adf_save = CZ_adf * Std_Alpha * flap_pos;
             CZ += CZ_adf_save;
             break;
           }
@@ -447,83 +447,83 @@ void uiuc_coef_lift()
           }
         case CZfabetaf_flag:
           {
-           if (CZfabetaf_nice == 1)
-             CZfabetafI = uiuc_3Dinterp_quick(CZfabetaf_fArray,
-                                              CZfabetaf_aArray_nice,
-                                              CZfabetaf_bArray_nice,
-                                              CZfabetaf_CZArray,
-                                              CZfabetaf_na_nice,
-                                              CZfabetaf_nb_nice,
-                                              CZfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-           else
-             CZfabetafI = uiuc_3Dinterpolation(CZfabetaf_fArray,
-                                               CZfabetaf_aArray,
-                                               CZfabetaf_betaArray,
-                                               CZfabetaf_CZArray,
-                                               CZfabetaf_nAlphaArray,
-                                               CZfabetaf_nbeta,
-                                               CZfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
+            if (CZfabetaf_nice == 1)
+              CZfabetafI = uiuc_3Dinterp_quick(CZfabetaf_fArray,
+                                               CZfabetaf_aArray_nice,
+                                               CZfabetaf_bArray_nice,
+                                               CZfabetaf_CZArray,
+                                               CZfabetaf_na_nice,
+                                               CZfabetaf_nb_nice,
+                                               CZfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+            else
+              CZfabetafI = uiuc_3Dinterpolation(CZfabetaf_fArray,
+                                                CZfabetaf_aArray,
+                                                CZfabetaf_betaArray,
+                                                CZfabetaf_CZArray,
+                                                CZfabetaf_nAlphaArray,
+                                                CZfabetaf_nbeta,
+                                                CZfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
             CZ += CZfabetafI;
             break;
           }
         case CZfadef_flag:
           {
-           if (CZfadef_nice == 1)
-             CZfadefI = uiuc_3Dinterp_quick(CZfadef_fArray,
-                                            CZfadef_aArray_nice,
-                                            CZfadef_deArray_nice,
-                                            CZfadef_CZArray,
-                                            CZfadef_na_nice,
-                                            CZfadef_nde_nice,
-                                            CZfadef_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            elevator);
-           else
-             CZfadefI = uiuc_3Dinterpolation(CZfadef_fArray,
-                                             CZfadef_aArray,
-                                             CZfadef_deArray,
-                                             CZfadef_CZArray,
-                                             CZfadef_nAlphaArray,
-                                             CZfadef_nde,
-                                             CZfadef_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             elevator);
+            if (CZfadef_nice == 1)
+              CZfadefI = uiuc_3Dinterp_quick(CZfadef_fArray,
+                                             CZfadef_aArray_nice,
+                                             CZfadef_deArray_nice,
+                                             CZfadef_CZArray,
+                                             CZfadef_na_nice,
+                                             CZfadef_nde_nice,
+                                             CZfadef_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             elevator);
+            else
+              CZfadefI = uiuc_3Dinterpolation(CZfadef_fArray,
+                                              CZfadef_aArray,
+                                              CZfadef_deArray,
+                                              CZfadef_CZArray,
+                                              CZfadef_nAlphaArray,
+                                              CZfadef_nde,
+                                              CZfadef_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              elevator);
             CZ += CZfadefI;
             break;
           }
         case CZfaqf_flag:
           {
-           q_nondim = Q_body * cbar_2U;
-           if (CZfaqf_nice == 1)
-             CZfaqfI = uiuc_3Dinterp_quick(CZfaqf_fArray,
-                                           CZfaqf_aArray_nice,
-                                           CZfaqf_qArray_nice,
-                                           CZfaqf_CZArray,
-                                           CZfaqf_na_nice,
-                                           CZfaqf_nq_nice,
-                                           CZfaqf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           q_nondim);
-           else
-             CZfaqfI = uiuc_3Dinterpolation(CZfaqf_fArray,
-                                            CZfaqf_aArray,
-                                            CZfaqf_qArray,
-                                            CZfaqf_CZArray,
-                                            CZfaqf_nAlphaArray,
-                                            CZfaqf_nq,
-                                            CZfaqf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            q_nondim);
+            q_nondim = Q_body * cbar_2U;
+            if (CZfaqf_nice == 1)
+              CZfaqfI = uiuc_3Dinterp_quick(CZfaqf_fArray,
+                                            CZfaqf_aArray_nice,
+                                            CZfaqf_qArray_nice,
+                                            CZfaqf_CZArray,
+                                            CZfaqf_na_nice,
+                                            CZfaqf_nq_nice,
+                                            CZfaqf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            q_nondim);
+            else
+              CZfaqfI = uiuc_3Dinterpolation(CZfaqf_fArray,
+                                             CZfaqf_aArray,
+                                             CZfaqf_qArray,
+                                             CZfaqf_CZArray,
+                                             CZfaqf_nAlphaArray,
+                                             CZfaqf_nq,
+                                             CZfaqf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             q_nondim);
             CZ += CZfaqfI;
             break;
           }
index 613261d4b3379f2dc83aa2aa42e642f15c0e13ae..673f9c2a1dc2bcf433035555103f2ab645fa1759 100644 (file)
 
  HISTORY:      04/15/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cmfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (Cmfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (Cmfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (Cmfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -62,8 +62,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -110,7 +110,7 @@ void uiuc_coef_pitch()
               {
                 Cmo = uiuc_ice_filter(Cmo_clean,kCmo);
               }
-           Cmo_save = Cmo;
+            Cmo_save = Cmo;
             Cm += Cmo_save;
             break;
           }
@@ -120,7 +120,7 @@ void uiuc_coef_pitch()
               {
                 Cm_a = uiuc_ice_filter(Cm_a_clean,kCm_a);
               }
-           Cm_a_save = Cm_a * Std_Alpha;
+            Cm_a_save = Cm_a * Std_Alpha;
             Cm += Cm_a_save;
             break;
           }
@@ -130,7 +130,7 @@ void uiuc_coef_pitch()
               {
                 Cm_a2 = uiuc_ice_filter(Cm_a2_clean,kCm_a2);
               }
-           Cm_a2_save = Cm_a2 * Std_Alpha * Std_Alpha;
+            Cm_a2_save = Cm_a2 * Std_Alpha * Std_Alpha;
             Cm += Cm_a2_save;
             break;
           }
@@ -142,15 +142,15 @@ void uiuc_coef_pitch()
               }
             /* Cm_adot must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cm_adot_save = Cm_adot * Std_Alpha_dot * cbar_2U;
-           if (eta_q_Cm_adot_fac)
-             {
-               Cm += Cm_adot_save * eta_q_Cm_adot_fac;
-             }
-           else
-             {
-               Cm += Cm_adot_save;
-             }
+            Cm_adot_save = Cm_adot * Std_Alpha_dot * cbar_2U;
+            if (eta_q_Cm_adot_fac)
+              {
+                Cm += Cm_adot_save * eta_q_Cm_adot_fac;
+              }
+            else
+              {
+                Cm += Cm_adot_save;
+              }
             break;
           }
         case Cm_q_flag:
@@ -161,20 +161,20 @@ void uiuc_coef_pitch()
               }
             /* Cm_q must be mulitplied by cbar/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cm_q_save = Cm_q * Q_body * cbar_2U;
-           if (eta_q_Cm_q_fac)
-             {
-               Cm += Cm_q_save * eta_q_Cm_q_fac;
-             }
-           else
-             {
-               Cm += Cm_q_save;
-             }
+            Cm_q_save = Cm_q * Q_body * cbar_2U;
+            if (eta_q_Cm_q_fac)
+              {
+                Cm += Cm_q_save * eta_q_Cm_q_fac;
+              }
+            else
+              {
+                Cm += Cm_q_save;
+              }
             break;
           }
         case Cm_ih_flag:
           {
-           Cm_ih_save = Cm_ih * ih;
+            Cm_ih_save = Cm_ih * ih;
             Cm += Cm_ih_save;
             break;
           }
@@ -184,15 +184,15 @@ void uiuc_coef_pitch()
               {
                 Cm_de = uiuc_ice_filter(Cm_de_clean,kCm_de);
               }
-           Cm_de_save = Cm_de * elevator;
-           if (eta_q_Cm_de_fac)
-             {
-               Cm += Cm_de_save * eta_q_Cm_de_fac;
-             }
-           else
-             {
-               Cm += Cm_de_save;
-             }
+            Cm_de_save = Cm_de * elevator;
+            if (eta_q_Cm_de_fac)
+              {
+                Cm += Cm_de_save * eta_q_Cm_de_fac;
+              }
+            else
+              {
+                Cm += Cm_de_save;
+              }
             break;
           }
         case Cm_b2_flag:
@@ -201,7 +201,7 @@ void uiuc_coef_pitch()
               {
                 Cm_b2 = uiuc_ice_filter(Cm_b2_clean,kCm_b2);
               }
-           Cm_b2_save = Cm_b2 * Std_Beta * Std_Beta;
+            Cm_b2_save = Cm_b2 * Std_Beta * Std_Beta;
             Cm += Cm_b2_save;
             break;
           }
@@ -211,7 +211,7 @@ void uiuc_coef_pitch()
               {
                 Cm_r = uiuc_ice_filter(Cm_r_clean,kCm_r);
               }
-           Cm_r_save = Cm_r * R_body * b_2U;
+            Cm_r_save = Cm_r * R_body * b_2U;
             Cm += Cm_r_save;
             break;
           }
@@ -221,19 +221,19 @@ void uiuc_coef_pitch()
               {
                 Cm_df = uiuc_ice_filter(Cm_df_clean,kCm_df);
               }
-           Cm_df_save = Cm_df * flap_pos;
+            Cm_df_save = Cm_df * flap_pos;
             Cm += Cm_df_save;
             break;
           }
         case Cm_ds_flag:
           {
-           Cm_ds_save = Cm_ds * spoiler_pos;
+            Cm_ds_save = Cm_ds * spoiler_pos;
             Cm += Cm_ds_save;
             break;
           }
         case Cm_dg_flag:
           {
-           Cm_dg_save = Cm_dg * gear_pos_norm;
+            Cm_dg_save = Cm_dg * gear_pos_norm;
             Cm += Cm_dg_save;
             break;
           }
@@ -248,52 +248,52 @@ void uiuc_coef_pitch()
           }
         case Cmfade_flag:
           {
-           if(b_downwashMode)
-             {
-               // compute the induced velocity on the tail to account for tail downwash
-               switch(downwashMode)
-                 {
-                 case 100:            
-                   if (V_rel_wind < dyn_on_speed)
-                     {
-                       alphaTail = Std_Alpha;
-                     }
-                   else
-                     {
-                       gammaWing = V_rel_wind * Sw * CL / (2.0 * bw);
-                       // printf("gammaWing = %.4f\n", (gammaWing));
-                       downwash  = downwashCoef * gammaWing;
-                       downwashAngle = atan(downwash/V_rel_wind);
-                       alphaTail = Std_Alpha - downwashAngle;
-                     }
-                   CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
-                                                  Cmfade_deArray,
-                                                  Cmfade_CmArray,
-                                                  Cmfade_nAlphaArray,
-                                                  Cmfade_nde,
-                                                  alphaTail,
-                                                  elevator);
-                   break;
-                 }
-             }
-           else
-             {
-               CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
-                                              Cmfade_deArray,
-                                              Cmfade_CmArray,
-                                              Cmfade_nAlphaArray,
-                                              Cmfade_nde,
-                                              Std_Alpha,
-                                              elevator); 
-             }
-           if (eta_q_Cmfade_fac)
-             {
-               Cm += CmfadeI * eta_q_Cmfade_fac;
-             }
-           else
-             {
-               Cm += CmfadeI;
-             }
+            if(b_downwashMode)
+              {
+                // compute the induced velocity on the tail to account for tail downwash
+                switch(downwashMode)
+                  {
+                  case 100:               
+                    if (V_rel_wind < dyn_on_speed)
+                      {
+                        alphaTail = Std_Alpha;
+                      }
+                    else
+                      {
+                        gammaWing = V_rel_wind * Sw * CL / (2.0 * bw);
+                        // printf("gammaWing = %.4f\n", (gammaWing));
+                        downwash  = downwashCoef * gammaWing;
+                        downwashAngle = atan(downwash/V_rel_wind);
+                        alphaTail = Std_Alpha - downwashAngle;
+                      }
+                    CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
+                                                   Cmfade_deArray,
+                                                   Cmfade_CmArray,
+                                                   Cmfade_nAlphaArray,
+                                                   Cmfade_nde,
+                                                   alphaTail,
+                                                   elevator);
+                    break;
+                  }
+              }
+            else
+              {
+                CmfadeI = uiuc_2Dinterpolation(Cmfade_aArray,
+                                               Cmfade_deArray,
+                                               Cmfade_CmArray,
+                                               Cmfade_nAlphaArray,
+                                               Cmfade_nde,
+                                               Std_Alpha,
+                                               elevator); 
+              }
+            if (eta_q_Cmfade_fac)
+              {
+                Cm += CmfadeI * eta_q_Cmfade_fac;
+              }
+            else
+              {
+                Cm += CmfadeI;
+              }
             break;
           }
         case Cmfdf_flag:
@@ -319,83 +319,83 @@ void uiuc_coef_pitch()
           }
         case Cmfabetaf_flag:
           {
-           if (Cmfabetaf_nice == 1)
-             CmfabetafI = uiuc_3Dinterp_quick(Cmfabetaf_fArray,
-                                              Cmfabetaf_aArray_nice,
-                                              Cmfabetaf_bArray_nice,
-                                              Cmfabetaf_CmArray,
-                                              Cmfabetaf_na_nice,
-                                              Cmfabetaf_nb_nice,
-                                              Cmfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-           else
-             CmfabetafI = uiuc_3Dinterpolation(Cmfabetaf_fArray,
-                                               Cmfabetaf_aArray,
-                                               Cmfabetaf_betaArray,
-                                               Cmfabetaf_CmArray,
-                                               Cmfabetaf_nAlphaArray,
-                                               Cmfabetaf_nbeta,
-                                               Cmfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
+            if (Cmfabetaf_nice == 1)
+              CmfabetafI = uiuc_3Dinterp_quick(Cmfabetaf_fArray,
+                                               Cmfabetaf_aArray_nice,
+                                               Cmfabetaf_bArray_nice,
+                                               Cmfabetaf_CmArray,
+                                               Cmfabetaf_na_nice,
+                                               Cmfabetaf_nb_nice,
+                                               Cmfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+            else
+              CmfabetafI = uiuc_3Dinterpolation(Cmfabetaf_fArray,
+                                                Cmfabetaf_aArray,
+                                                Cmfabetaf_betaArray,
+                                                Cmfabetaf_CmArray,
+                                                Cmfabetaf_nAlphaArray,
+                                                Cmfabetaf_nbeta,
+                                                Cmfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
             Cm += CmfabetafI;
             break;
           }
         case Cmfadef_flag:
           {
-           if (Cmfadef_nice == 1)
-             CmfadefI = uiuc_3Dinterp_quick(Cmfadef_fArray,
-                                            Cmfadef_aArray_nice,
-                                            Cmfadef_deArray_nice,
-                                            Cmfadef_CmArray,
-                                            Cmfadef_na_nice,
-                                            Cmfadef_nde_nice,
-                                            Cmfadef_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            elevator);
-           else
-             CmfadefI = uiuc_3Dinterpolation(Cmfadef_fArray,
-                                             Cmfadef_aArray,
-                                             Cmfadef_deArray,
-                                             Cmfadef_CmArray,
-                                             Cmfadef_nAlphaArray,
-                                             Cmfadef_nde,
-                                             Cmfadef_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             elevator);
-           Cm += CmfadefI;
+            if (Cmfadef_nice == 1)
+              CmfadefI = uiuc_3Dinterp_quick(Cmfadef_fArray,
+                                             Cmfadef_aArray_nice,
+                                             Cmfadef_deArray_nice,
+                                             Cmfadef_CmArray,
+                                             Cmfadef_na_nice,
+                                             Cmfadef_nde_nice,
+                                             Cmfadef_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             elevator);
+            else
+              CmfadefI = uiuc_3Dinterpolation(Cmfadef_fArray,
+                                              Cmfadef_aArray,
+                                              Cmfadef_deArray,
+                                              Cmfadef_CmArray,
+                                              Cmfadef_nAlphaArray,
+                                              Cmfadef_nde,
+                                              Cmfadef_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              elevator);
+            Cm += CmfadefI;
             break;
           }
         case Cmfaqf_flag:
           {
-           q_nondim = Q_body * cbar_2U;
-           if (Cmfaqf_nice == 1)
-             CmfaqfI = uiuc_3Dinterp_quick(Cmfaqf_fArray,
-                                           Cmfaqf_aArray_nice,
-                                           Cmfaqf_qArray_nice,
-                                           Cmfaqf_CmArray,
-                                           Cmfaqf_na_nice,
-                                           Cmfaqf_nq_nice,
-                                           Cmfaqf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           q_nondim);
-           else
-             CmfaqfI = uiuc_3Dinterpolation(Cmfaqf_fArray,
-                                            Cmfaqf_aArray,
-                                            Cmfaqf_qArray,
-                                            Cmfaqf_CmArray,
-                                            Cmfaqf_nAlphaArray,
-                                            Cmfaqf_nq,
-                                            Cmfaqf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            q_nondim);
+            q_nondim = Q_body * cbar_2U;
+            if (Cmfaqf_nice == 1)
+              CmfaqfI = uiuc_3Dinterp_quick(Cmfaqf_fArray,
+                                            Cmfaqf_aArray_nice,
+                                            Cmfaqf_qArray_nice,
+                                            Cmfaqf_CmArray,
+                                            Cmfaqf_na_nice,
+                                            Cmfaqf_nq_nice,
+                                            Cmfaqf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            q_nondim);
+            else
+              CmfaqfI = uiuc_3Dinterpolation(Cmfaqf_fArray,
+                                             Cmfaqf_aArray,
+                                             Cmfaqf_qArray,
+                                             Cmfaqf_CmArray,
+                                             Cmfaqf_nAlphaArray,
+                                             Cmfaqf_nq,
+                                             Cmfaqf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             q_nondim);
             Cm += CmfaqfI;
             break;
           }
index 2545c79574f654a8439102d83c51c8469d8063a2..5fe3c789d5e481479a224545a361172bec075863 100644 (file)
 
  HISTORY:      04/15/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Clfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (Clfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (Clfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (Clfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -63,8 +63,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -112,7 +112,7 @@ void uiuc_coef_roll()
               {
                 Clo = uiuc_ice_filter(Clo_clean,kClo);
               }
-           Clo_save = Clo;
+            Clo_save = Clo;
             Cl += Clo_save;
             break;
           }
@@ -122,15 +122,15 @@ void uiuc_coef_roll()
               {
                 Cl_beta = uiuc_ice_filter(Cl_beta_clean,kCl_beta);
               }
-           Cl_beta_save = Cl_beta * Std_Beta;
-           if (eta_q_Cl_beta_fac)
-             {
-               Cl += Cl_beta_save * eta_q_Cl_beta_fac;
-             }
-           else
-             {
-               Cl += Cl_beta_save;
-             }
+            Cl_beta_save = Cl_beta * Std_Beta;
+            if (eta_q_Cl_beta_fac)
+              {
+                Cl += Cl_beta_save * eta_q_Cl_beta_fac;
+              }
+            else
+              {
+                Cl += Cl_beta_save;
+              }
             break;
           }
         case Cl_p_flag:
@@ -141,21 +141,21 @@ void uiuc_coef_roll()
               }
             /* Cl_p must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cl_p_save = Cl_p * P_body * b_2U;
-//         if (Cl_p_save > 0.1) {
-//           Cl_p_save = 0.1;
-//         }
-//         if (Cl_p_save < -0.1) {
-//           Cl_p_save = -0.1;
-//         }
-           if (eta_q_Cl_p_fac)
-             {
-               Cl += Cl_p_save * eta_q_Cl_p_fac;
-             }
-           else
-             {
-               Cl += Cl_p_save;
-             }
+            Cl_p_save = Cl_p * P_body * b_2U;
+//              if (Cl_p_save > 0.1) {
+//                Cl_p_save = 0.1;
+//              }
+//              if (Cl_p_save < -0.1) {
+//                Cl_p_save = -0.1;
+//              }
+            if (eta_q_Cl_p_fac)
+              {
+                Cl += Cl_p_save * eta_q_Cl_p_fac;
+              }
+            else
+              {
+                Cl += Cl_p_save;
+              }
             break;
           }
         case Cl_r_flag:
@@ -166,15 +166,15 @@ void uiuc_coef_roll()
               }
             /* Cl_r must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cl_r_save = Cl_r * R_body * b_2U;
-           if (eta_q_Cl_r_fac)
-             {
-               Cl += Cl_r_save * eta_q_Cl_r_fac;
-             }
-           else
-             {
-               Cl += Cl_r_save;
-             }
+            Cl_r_save = Cl_r * R_body * b_2U;
+            if (eta_q_Cl_r_fac)
+              {
+                Cl += Cl_r_save * eta_q_Cl_r_fac;
+              }
+            else
+              {
+                Cl += Cl_r_save;
+              }
             break;
           }
         case Cl_da_flag:
@@ -183,7 +183,7 @@ void uiuc_coef_roll()
               {
                 Cl_da = uiuc_ice_filter(Cl_da_clean,kCl_da);
               }
-           Cl_da_save = Cl_da * aileron;
+            Cl_da_save = Cl_da * aileron;
             Cl += Cl_da_save;
             break;
           }
@@ -193,15 +193,15 @@ void uiuc_coef_roll()
               {
                 Cl_dr = uiuc_ice_filter(Cl_dr_clean,kCl_dr);
               }
-           Cl_dr_save = Cl_dr * rudder;
-           if (eta_q_Cl_dr_fac)
-             {
-               Cl += Cl_dr_save * eta_q_Cl_dr_fac;
-             }
-           else
-             {
-               Cl += Cl_dr_save;
-             }
+            Cl_dr_save = Cl_dr * rudder;
+            if (eta_q_Cl_dr_fac)
+              {
+                Cl += Cl_dr_save * eta_q_Cl_dr_fac;
+              }
+            else
+              {
+                Cl += Cl_dr_save;
+              }
             break;
           }
         case Cl_daa_flag:
@@ -210,7 +210,7 @@ void uiuc_coef_roll()
               {
                 Cl_daa = uiuc_ice_filter(Cl_daa_clean,kCl_daa);
               }
-           Cl_daa_save = Cl_daa * aileron * Std_Alpha;
+            Cl_daa_save = Cl_daa * aileron * Std_Alpha;
             Cl += Cl_daa_save;
             break;
           }
@@ -240,138 +240,138 @@ void uiuc_coef_roll()
           }
         case Clfabetaf_flag:
           {
-           if (Clfabetaf_nice == 1)
-             ClfabetafI = uiuc_3Dinterp_quick(Clfabetaf_fArray,
-                                              Clfabetaf_aArray_nice,
-                                              Clfabetaf_bArray_nice,
-                                              Clfabetaf_ClArray,
-                                              Clfabetaf_na_nice,
-                                              Clfabetaf_nb_nice,
-                                              Clfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-           else
-             ClfabetafI = uiuc_3Dinterpolation(Clfabetaf_fArray,
-                                               Clfabetaf_aArray,
-                                               Clfabetaf_betaArray,
-                                               Clfabetaf_ClArray,
-                                               Clfabetaf_nAlphaArray,
-                                               Clfabetaf_nbeta,
-                                               Clfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
+            if (Clfabetaf_nice == 1)
+              ClfabetafI = uiuc_3Dinterp_quick(Clfabetaf_fArray,
+                                               Clfabetaf_aArray_nice,
+                                               Clfabetaf_bArray_nice,
+                                               Clfabetaf_ClArray,
+                                               Clfabetaf_na_nice,
+                                               Clfabetaf_nb_nice,
+                                               Clfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+            else
+              ClfabetafI = uiuc_3Dinterpolation(Clfabetaf_fArray,
+                                                Clfabetaf_aArray,
+                                                Clfabetaf_betaArray,
+                                                Clfabetaf_ClArray,
+                                                Clfabetaf_nAlphaArray,
+                                                Clfabetaf_nbeta,
+                                                Clfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
             Cl += ClfabetafI;
             break;
           }
         case Clfadaf_flag:
           {
-           if (Clfadaf_nice == 1)
-             ClfadafI = uiuc_3Dinterp_quick(Clfadaf_fArray,
-                                            Clfadaf_aArray_nice,
-                                            Clfadaf_daArray_nice,
-                                            Clfadaf_ClArray,
-                                            Clfadaf_na_nice,
-                                            Clfadaf_nda_nice,
-                                            Clfadaf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            aileron);
-           else
-             ClfadafI = uiuc_3Dinterpolation(Clfadaf_fArray,
-                                             Clfadaf_aArray,
-                                             Clfadaf_daArray,
-                                             Clfadaf_ClArray,
-                                             Clfadaf_nAlphaArray,
-                                             Clfadaf_nda,
-                                             Clfadaf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             aileron);
+            if (Clfadaf_nice == 1)
+              ClfadafI = uiuc_3Dinterp_quick(Clfadaf_fArray,
+                                             Clfadaf_aArray_nice,
+                                             Clfadaf_daArray_nice,
+                                             Clfadaf_ClArray,
+                                             Clfadaf_na_nice,
+                                             Clfadaf_nda_nice,
+                                             Clfadaf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             aileron);
+            else
+              ClfadafI = uiuc_3Dinterpolation(Clfadaf_fArray,
+                                              Clfadaf_aArray,
+                                              Clfadaf_daArray,
+                                              Clfadaf_ClArray,
+                                              Clfadaf_nAlphaArray,
+                                              Clfadaf_nda,
+                                              Clfadaf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              aileron);
             Cl += ClfadafI;
             break;
           }
         case Clfadrf_flag:
           {
-           if (Clfadrf_nice == 1)
-             ClfadrfI = uiuc_3Dinterp_quick(Clfadrf_fArray,
-                                            Clfadrf_aArray_nice,
-                                            Clfadrf_drArray_nice,
-                                            Clfadrf_ClArray,
-                                            Clfadrf_na_nice,
-                                            Clfadrf_ndr_nice,
-                                            Clfadrf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            rudder);
-           else
-             ClfadrfI = uiuc_3Dinterpolation(Clfadrf_fArray,
-                                             Clfadrf_aArray,
-                                             Clfadrf_drArray,
-                                             Clfadrf_ClArray,
-                                             Clfadrf_nAlphaArray,
-                                             Clfadrf_ndr,
-                                             Clfadrf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             rudder);
+            if (Clfadrf_nice == 1)
+              ClfadrfI = uiuc_3Dinterp_quick(Clfadrf_fArray,
+                                             Clfadrf_aArray_nice,
+                                             Clfadrf_drArray_nice,
+                                             Clfadrf_ClArray,
+                                             Clfadrf_na_nice,
+                                             Clfadrf_ndr_nice,
+                                             Clfadrf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             rudder);
+            else
+              ClfadrfI = uiuc_3Dinterpolation(Clfadrf_fArray,
+                                              Clfadrf_aArray,
+                                              Clfadrf_drArray,
+                                              Clfadrf_ClArray,
+                                              Clfadrf_nAlphaArray,
+                                              Clfadrf_ndr,
+                                              Clfadrf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              rudder);
             Cl += ClfadrfI;
             break;
           }
-       case Clfapf_flag:
+        case Clfapf_flag:
           {
-           p_nondim = P_body * b_2U;
-           if (Clfapf_nice == 1)
-             ClfapfI = uiuc_3Dinterp_quick(Clfapf_fArray,
-                                           Clfapf_aArray_nice,
-                                           Clfapf_pArray_nice,
-                                           Clfapf_ClArray,
-                                           Clfapf_na_nice,
-                                           Clfapf_np_nice,
-                                           Clfapf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           p_nondim);
-           else
-             ClfapfI = uiuc_3Dinterpolation(Clfapf_fArray,
-                                            Clfapf_aArray,
-                                            Clfapf_pArray,
-                                            Clfapf_ClArray,
-                                            Clfapf_nAlphaArray,
-                                            Clfapf_np,
-                                            Clfapf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            p_nondim);
+            p_nondim = P_body * b_2U;
+            if (Clfapf_nice == 1)
+              ClfapfI = uiuc_3Dinterp_quick(Clfapf_fArray,
+                                            Clfapf_aArray_nice,
+                                            Clfapf_pArray_nice,
+                                            Clfapf_ClArray,
+                                            Clfapf_na_nice,
+                                            Clfapf_np_nice,
+                                            Clfapf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            p_nondim);
+            else
+              ClfapfI = uiuc_3Dinterpolation(Clfapf_fArray,
+                                             Clfapf_aArray,
+                                             Clfapf_pArray,
+                                             Clfapf_ClArray,
+                                             Clfapf_nAlphaArray,
+                                             Clfapf_np,
+                                             Clfapf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             p_nondim);
             Cl += ClfapfI;
             break;
           }
-       case Clfarf_flag:
+        case Clfarf_flag:
           {
-           r_nondim = R_body * b_2U;
-           if (Clfarf_nice == 1)
-             ClfarfI = uiuc_3Dinterp_quick(Clfarf_fArray,
-                                           Clfarf_aArray_nice,
-                                           Clfarf_rArray_nice,
-                                           Clfarf_ClArray,
-                                           Clfarf_na_nice,
-                                           Clfarf_nr_nice,
-                                           Clfarf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           r_nondim);
-           else
-             ClfarfI = uiuc_3Dinterpolation(Clfarf_fArray,
-                                            Clfarf_aArray,
-                                            Clfarf_rArray,
-                                            Clfarf_ClArray,
-                                            Clfarf_nAlphaArray,
-                                            Clfarf_nr,
-                                            Clfarf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            r_nondim);
+            r_nondim = R_body * b_2U;
+            if (Clfarf_nice == 1)
+              ClfarfI = uiuc_3Dinterp_quick(Clfarf_fArray,
+                                            Clfarf_aArray_nice,
+                                            Clfarf_rArray_nice,
+                                            Clfarf_ClArray,
+                                            Clfarf_na_nice,
+                                            Clfarf_nr_nice,
+                                            Clfarf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            r_nondim);
+            else
+              ClfarfI = uiuc_3Dinterpolation(Clfarf_fArray,
+                                             Clfarf_aArray,
+                                             Clfarf_rArray,
+                                             Clfarf_ClArray,
+                                             Clfarf_nAlphaArray,
+                                             Clfarf_nr,
+                                             Clfarf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             r_nondim);
             Cl += ClfarfI;
             break;
           }
index b0c76b4617a50ab36f025cdba311c520dfcdedcf..ab4b48c7fa8dc689d65ec46982151a69e6fd5ee2 100644 (file)
 
  HISTORY:      04/15/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CYfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CYfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (CYfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CYfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -63,8 +63,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -112,7 +112,7 @@ void uiuc_coef_sideforce()
               {
                 CYo = uiuc_ice_filter(CYo_clean,kCYo);
               }
-           CYo_save = CYo;
+            CYo_save = CYo;
             CY += CYo_save;
             break;
           }
@@ -122,15 +122,15 @@ void uiuc_coef_sideforce()
               {
                 CY_beta = uiuc_ice_filter(CY_beta_clean,kCY_beta);
               }
-           CY_beta_save = CY_beta * Std_Beta;
-           if (eta_q_CY_beta_fac)
-             {
-               CY += CY_beta_save * eta_q_CY_beta_fac;
-             }
-           else
-             {
-               CY += CY_beta_save;
-             }
+            CY_beta_save = CY_beta * Std_Beta;
+            if (eta_q_CY_beta_fac)
+              {
+                CY += CY_beta_save * eta_q_CY_beta_fac;
+              }
+            else
+              {
+                CY += CY_beta_save;
+              }
             break;
           }
         case CY_p_flag:
@@ -141,15 +141,15 @@ void uiuc_coef_sideforce()
               }
             /* CY_p must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CY_p_save = CY_p * P_body * b_2U;
-           if (eta_q_CY_p_fac)
-             {
-               CY += CY_p_save * eta_q_CY_p_fac;
-             }
-           else
-             {
-               CY += CY_p_save;
-             }
+            CY_p_save = CY_p * P_body * b_2U;
+            if (eta_q_CY_p_fac)
+              {
+                CY += CY_p_save * eta_q_CY_p_fac;
+              }
+            else
+              {
+                CY += CY_p_save;
+              }
             break;
           }
         case CY_r_flag:
@@ -160,15 +160,15 @@ void uiuc_coef_sideforce()
               }
             /* CY_r must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           CY_r_save = CY_r * R_body * b_2U;
-           if (eta_q_CY_r_fac)
-             {
-               CY += CY_r_save * eta_q_CY_r_fac;
-             }
-           else
-             {
-               CY += CY_r_save;
-             }
+            CY_r_save = CY_r * R_body * b_2U;
+            if (eta_q_CY_r_fac)
+              {
+                CY += CY_r_save * eta_q_CY_r_fac;
+              }
+            else
+              {
+                CY += CY_r_save;
+              }
             break;
           }
         case CY_da_flag:
@@ -177,7 +177,7 @@ void uiuc_coef_sideforce()
               {
                 CY_da = uiuc_ice_filter(CY_da_clean,kCY_da);
               }
-           CY_da_save = CY_da * aileron;
+            CY_da_save = CY_da * aileron;
             CY += CY_da_save;
             break;
           }
@@ -187,15 +187,15 @@ void uiuc_coef_sideforce()
               {
                 CY_dr = uiuc_ice_filter(CY_dr_clean,kCY_dr);
               }
-           CY_dr_save = CY_dr * rudder;
-           if (eta_q_CY_dr_fac)
-             {
-               CY += CY_dr_save * eta_q_CY_dr_fac;
-             }
-           else
-             {
-               CY += CY_dr_save;
-             }
+            CY_dr_save = CY_dr * rudder;
+            if (eta_q_CY_dr_fac)
+              {
+                CY += CY_dr_save * eta_q_CY_dr_fac;
+              }
+            else
+              {
+                CY += CY_dr_save;
+              }
             break;
           }
         case CY_dra_flag:
@@ -204,7 +204,7 @@ void uiuc_coef_sideforce()
               {
                 CY_dra = uiuc_ice_filter(CY_dra_clean,kCY_dra);
               }
-           CY_dra_save = CY_dra * rudder * Std_Alpha;
+            CY_dra_save = CY_dra * rudder * Std_Alpha;
             CY += CY_dra_save;
             break;
           }
@@ -214,7 +214,7 @@ void uiuc_coef_sideforce()
               {
                 CY_bdot = uiuc_ice_filter(CY_bdot_clean,kCY_bdot);
               }
-           CY_bdot_save = CY_bdot * Std_Beta_dot * b_2U;
+            CY_bdot_save = CY_bdot * Std_Beta_dot * b_2U;
             CY += CY_bdot_save;
             break;
           }
@@ -244,138 +244,138 @@ void uiuc_coef_sideforce()
           }
         case CYfabetaf_flag:
           {
-           if (CYfabetaf_nice == 1)
-             CYfabetafI = uiuc_3Dinterp_quick(CYfabetaf_fArray,
-                                              CYfabetaf_aArray_nice,
-                                              CYfabetaf_bArray_nice,
-                                              CYfabetaf_CYArray,
-                                              CYfabetaf_na_nice,
-                                              CYfabetaf_nb_nice,
-                                              CYfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-           else
-             CYfabetafI = uiuc_3Dinterpolation(CYfabetaf_fArray,
-                                               CYfabetaf_aArray,
-                                               CYfabetaf_betaArray,
-                                               CYfabetaf_CYArray,
-                                               CYfabetaf_nAlphaArray,
-                                               CYfabetaf_nbeta,
-                                               CYfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
+            if (CYfabetaf_nice == 1)
+              CYfabetafI = uiuc_3Dinterp_quick(CYfabetaf_fArray,
+                                               CYfabetaf_aArray_nice,
+                                               CYfabetaf_bArray_nice,
+                                               CYfabetaf_CYArray,
+                                               CYfabetaf_na_nice,
+                                               CYfabetaf_nb_nice,
+                                               CYfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+            else
+              CYfabetafI = uiuc_3Dinterpolation(CYfabetaf_fArray,
+                                                CYfabetaf_aArray,
+                                                CYfabetaf_betaArray,
+                                                CYfabetaf_CYArray,
+                                                CYfabetaf_nAlphaArray,
+                                                CYfabetaf_nbeta,
+                                                CYfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
             CY += CYfabetafI;
             break;
           }
         case CYfadaf_flag:
           {
-           if (CYfadaf_nice == 1)
-             CYfadafI = uiuc_3Dinterp_quick(CYfadaf_fArray,
-                                            CYfadaf_aArray_nice,
-                                            CYfadaf_daArray_nice,
-                                            CYfadaf_CYArray,
-                                            CYfadaf_na_nice,
-                                            CYfadaf_nda_nice,
-                                            CYfadaf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            aileron);
-           else
-             CYfadafI = uiuc_3Dinterpolation(CYfadaf_fArray,
-                                             CYfadaf_aArray,
-                                             CYfadaf_daArray,
-                                             CYfadaf_CYArray,
-                                             CYfadaf_nAlphaArray,
-                                             CYfadaf_nda,
-                                             CYfadaf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             aileron);
+            if (CYfadaf_nice == 1)
+              CYfadafI = uiuc_3Dinterp_quick(CYfadaf_fArray,
+                                             CYfadaf_aArray_nice,
+                                             CYfadaf_daArray_nice,
+                                             CYfadaf_CYArray,
+                                             CYfadaf_na_nice,
+                                             CYfadaf_nda_nice,
+                                             CYfadaf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             aileron);
+            else
+              CYfadafI = uiuc_3Dinterpolation(CYfadaf_fArray,
+                                              CYfadaf_aArray,
+                                              CYfadaf_daArray,
+                                              CYfadaf_CYArray,
+                                              CYfadaf_nAlphaArray,
+                                              CYfadaf_nda,
+                                              CYfadaf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              aileron);
             CY += CYfadafI;
             break;
           }
         case CYfadrf_flag:
           {
-           if (CYfadrf_nice == 1)
-             CYfadrfI = uiuc_3Dinterp_quick(CYfadrf_fArray,
-                                            CYfadrf_aArray_nice,
-                                            CYfadrf_drArray_nice,
-                                            CYfadrf_CYArray,
-                                            CYfadrf_na_nice,
-                                            CYfadrf_ndr_nice,
-                                            CYfadrf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            rudder);
-           else
-             CYfadrfI = uiuc_3Dinterpolation(CYfadrf_fArray,
-                                             CYfadrf_aArray,
-                                             CYfadrf_drArray,
-                                             CYfadrf_CYArray,
-                                             CYfadrf_nAlphaArray,
-                                             CYfadrf_ndr,
-                                             CYfadrf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             rudder);
+            if (CYfadrf_nice == 1)
+              CYfadrfI = uiuc_3Dinterp_quick(CYfadrf_fArray,
+                                             CYfadrf_aArray_nice,
+                                             CYfadrf_drArray_nice,
+                                             CYfadrf_CYArray,
+                                             CYfadrf_na_nice,
+                                             CYfadrf_ndr_nice,
+                                             CYfadrf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             rudder);
+            else
+              CYfadrfI = uiuc_3Dinterpolation(CYfadrf_fArray,
+                                              CYfadrf_aArray,
+                                              CYfadrf_drArray,
+                                              CYfadrf_CYArray,
+                                              CYfadrf_nAlphaArray,
+                                              CYfadrf_ndr,
+                                              CYfadrf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              rudder);
             CY += CYfadrfI;
             break;
-         }
+          }
         case CYfapf_flag:
-         {
-           p_nondim = P_body * b_2U;
-           if (CYfapf_nice == 1)
-             CYfapfI = uiuc_3Dinterp_quick(CYfapf_fArray,
-                                           CYfapf_aArray_nice,
-                                           CYfapf_pArray_nice,
-                                           CYfapf_CYArray,
-                                           CYfapf_na_nice,
-                                           CYfapf_np_nice,
-                                           CYfapf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           p_nondim);
-           else
-             CYfapfI = uiuc_3Dinterpolation(CYfapf_fArray,
-                                            CYfapf_aArray,
-                                            CYfapf_pArray,
-                                            CYfapf_CYArray,
-                                            CYfapf_nAlphaArray,
-                                            CYfapf_np,
-                                            CYfapf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            p_nondim);
+          {
+            p_nondim = P_body * b_2U;
+            if (CYfapf_nice == 1)
+              CYfapfI = uiuc_3Dinterp_quick(CYfapf_fArray,
+                                            CYfapf_aArray_nice,
+                                            CYfapf_pArray_nice,
+                                            CYfapf_CYArray,
+                                            CYfapf_na_nice,
+                                            CYfapf_np_nice,
+                                            CYfapf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            p_nondim);
+            else
+              CYfapfI = uiuc_3Dinterpolation(CYfapf_fArray,
+                                             CYfapf_aArray,
+                                             CYfapf_pArray,
+                                             CYfapf_CYArray,
+                                             CYfapf_nAlphaArray,
+                                             CYfapf_np,
+                                             CYfapf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             p_nondim);
             CY += CYfapfI;
             break;
           }
-       case CYfarf_flag:
+        case CYfarf_flag:
           {
-           r_nondim = R_body * b_2U;
-           if (CYfarf_nice == 1)
-             CYfarfI = uiuc_3Dinterp_quick(CYfarf_fArray,
-                                           CYfarf_aArray_nice,
-                                           CYfarf_rArray_nice,
-                                           CYfarf_CYArray,
-                                           CYfarf_na_nice,
-                                           CYfarf_nr_nice,
-                                           CYfarf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           r_nondim);
-           else
-             CYfarfI = uiuc_3Dinterpolation(CYfarf_fArray,
-                                            CYfarf_aArray,
-                                            CYfarf_rArray,
-                                            CYfarf_CYArray,
-                                            CYfarf_nAlphaArray,
-                                            CYfarf_nr,
-                                            CYfarf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            r_nondim);
+            r_nondim = R_body * b_2U;
+            if (CYfarf_nice == 1)
+              CYfarfI = uiuc_3Dinterp_quick(CYfarf_fArray,
+                                            CYfarf_aArray_nice,
+                                            CYfarf_rArray_nice,
+                                            CYfarf_CYArray,
+                                            CYfarf_na_nice,
+                                            CYfarf_nr_nice,
+                                            CYfarf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            r_nondim);
+            else
+              CYfarfI = uiuc_3Dinterpolation(CYfarf_fArray,
+                                             CYfarf_aArray,
+                                             CYfarf_rArray,
+                                             CYfarf_CYArray,
+                                             CYfarf_nAlphaArray,
+                                             CYfarf_nr,
+                                             CYfarf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             r_nondim);
             CY += CYfarfI;
             break;
           }
index e8430b2eddf9acf82c643e8271a9850ab16e8706..6e6442b9f5046108bf28ea391543b5591813f2c7 100644 (file)
 
  HISTORY:      04/15/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cnfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (Cnfxxf).  Zero flap vairables removed.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
-                           for a quicker 3D interpolation.  Takes
-                           advantage of "nice" data.
+                            linear Twin Otter model at zero flaps
+                            (Cnfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (Cnfxxf).  Zero flap vairables removed.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added uiuc_3Dinterp_quick() function
+                            for a quicker 3D interpolation.  Takes
+                            advantage of "nice" data.
 
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -63,8 +63,8 @@
  CALLS TO:     uiuc_1Dinterpolation
                uiuc_2Dinterpolation
                uiuc_ice_filter
-              uiuc_3Dinterpolation
-              uiuc_3Dinterp_quick
+               uiuc_3Dinterpolation
+               uiuc_3Dinterp_quick
 
 ----------------------------------------------------------------------
 
@@ -112,7 +112,7 @@ void uiuc_coef_yaw()
               {
                 Cno = uiuc_ice_filter(Cno_clean,kCno);
               }
-           Cno_save = Cno;
+            Cno_save = Cno;
             Cn += Cno_save;
             break;
           }
@@ -122,15 +122,15 @@ void uiuc_coef_yaw()
               {
                 Cn_beta = uiuc_ice_filter(Cn_beta_clean,kCn_beta);
               }
-           Cn_beta_save = Cn_beta * Std_Beta;
-           if (eta_q_Cn_beta_fac)
-             {
-               Cn += Cn_beta_save * eta_q_Cn_beta_fac;
-             }
-           else
-             {
-               Cn += Cn_beta_save;
-             }
+            Cn_beta_save = Cn_beta * Std_Beta;
+            if (eta_q_Cn_beta_fac)
+              {
+                Cn += Cn_beta_save * eta_q_Cn_beta_fac;
+              }
+            else
+              {
+                Cn += Cn_beta_save;
+              }
             break;
           }
         case Cn_p_flag:
@@ -141,15 +141,15 @@ void uiuc_coef_yaw()
               }
             /* Cn_p must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cn_p_save = Cn_p * P_body * b_2U;
-           if (eta_q_Cn_p_fac)
-             {
-               Cn += Cn_p_save * eta_q_Cn_p_fac;
-             }
-           else
-             {
-               Cn += Cn_p_save;
-             }
+            Cn_p_save = Cn_p * P_body * b_2U;
+            if (eta_q_Cn_p_fac)
+              {
+                Cn += Cn_p_save * eta_q_Cn_p_fac;
+              }
+            else
+              {
+                Cn += Cn_p_save;
+              }
             break;
           }
         case Cn_r_flag:
@@ -160,15 +160,15 @@ void uiuc_coef_yaw()
               }
             /* Cn_r must be mulitplied by b/2U 
                (see Roskam Control book, Part 1, pg. 147) */
-           Cn_r_save = Cn_r * R_body * b_2U;
-           if (eta_q_Cn_r_fac)
-             {
-               Cn += Cn_r_save * eta_q_Cn_r_fac;
-             }
-           else
-             {
-               Cn += Cn_r_save;
-             }
+            Cn_r_save = Cn_r * R_body * b_2U;
+            if (eta_q_Cn_r_fac)
+              {
+                Cn += Cn_r_save * eta_q_Cn_r_fac;
+              }
+            else
+              {
+                Cn += Cn_r_save;
+              }
             break;
           }
         case Cn_da_flag:
@@ -177,7 +177,7 @@ void uiuc_coef_yaw()
               {
                 Cn_da = uiuc_ice_filter(Cn_da_clean,kCn_da);
               }
-           Cn_da_save = Cn_da * aileron;
+            Cn_da_save = Cn_da * aileron;
             Cn += Cn_da_save;
             break;
           }
@@ -187,15 +187,15 @@ void uiuc_coef_yaw()
               {
                 Cn_dr = uiuc_ice_filter(Cn_dr_clean,kCn_dr);
               }
-           Cn_dr_save = Cn_dr * rudder;
-           if (eta_q_Cn_dr_fac)
-             {
-               Cn += Cn_dr_save * eta_q_Cn_dr_fac;
-             }
-           else
-             {
-               Cn += Cn_dr_save;
-             }
+            Cn_dr_save = Cn_dr * rudder;
+            if (eta_q_Cn_dr_fac)
+              {
+                Cn += Cn_dr_save * eta_q_Cn_dr_fac;
+              }
+            else
+              {
+                Cn += Cn_dr_save;
+              }
             break;
           }
         case Cn_q_flag:
@@ -204,7 +204,7 @@ void uiuc_coef_yaw()
               {
                 Cn_q = uiuc_ice_filter(Cn_q_clean,kCn_q);
               }
-           Cn_q_save = Cn_q * Q_body * cbar_2U;
+            Cn_q_save = Cn_q * Q_body * cbar_2U;
             Cn += Cn_q_save;
             break;
           }
@@ -214,7 +214,7 @@ void uiuc_coef_yaw()
               {
                 Cn_b3 = uiuc_ice_filter(Cn_b3_clean,kCn_b3);
               }
-           Cn_b3_save = Cn_b3 * Std_Beta * Std_Beta * Std_Beta;
+            Cn_b3_save = Cn_b3 * Std_Beta * Std_Beta * Std_Beta;
             Cn += Cn_b3_save;
             break;
           }
@@ -244,138 +244,138 @@ void uiuc_coef_yaw()
           }
         case Cnfabetaf_flag:
           {
-           if (Cnfabetaf_nice == 1)
-             CnfabetafI = uiuc_3Dinterp_quick(Cnfabetaf_fArray,
-                                              Cnfabetaf_aArray_nice,
-                                              Cnfabetaf_bArray_nice,
-                                              Cnfabetaf_CnArray,
-                                              Cnfabetaf_na_nice,
-                                              Cnfabetaf_nb_nice,
-                                              Cnfabetaf_nf,
-                                              flap_pos,
-                                              Std_Alpha,
-                                              Std_Beta);
-           else
-             CnfabetafI = uiuc_3Dinterpolation(Cnfabetaf_fArray,
-                                               Cnfabetaf_aArray,
-                                               Cnfabetaf_betaArray,
-                                               Cnfabetaf_CnArray,
-                                               Cnfabetaf_nAlphaArray,
-                                               Cnfabetaf_nbeta,
-                                               Cnfabetaf_nf,
-                                               flap_pos,
-                                               Std_Alpha,
-                                               Std_Beta);
+            if (Cnfabetaf_nice == 1)
+              CnfabetafI = uiuc_3Dinterp_quick(Cnfabetaf_fArray,
+                                               Cnfabetaf_aArray_nice,
+                                               Cnfabetaf_bArray_nice,
+                                               Cnfabetaf_CnArray,
+                                               Cnfabetaf_na_nice,
+                                               Cnfabetaf_nb_nice,
+                                               Cnfabetaf_nf,
+                                               flap_pos,
+                                               Std_Alpha,
+                                               Std_Beta);
+            else
+              CnfabetafI = uiuc_3Dinterpolation(Cnfabetaf_fArray,
+                                                Cnfabetaf_aArray,
+                                                Cnfabetaf_betaArray,
+                                                Cnfabetaf_CnArray,
+                                                Cnfabetaf_nAlphaArray,
+                                                Cnfabetaf_nbeta,
+                                                Cnfabetaf_nf,
+                                                flap_pos,
+                                                Std_Alpha,
+                                                Std_Beta);
             Cn += CnfabetafI;
             break;
           }
         case Cnfadaf_flag:
           {
-           if (Cnfadaf_nice == 1)
-             CnfadafI = uiuc_3Dinterp_quick(Cnfadaf_fArray,
-                                            Cnfadaf_aArray_nice,
-                                            Cnfadaf_daArray_nice,
-                                            Cnfadaf_CnArray,
-                                            Cnfadaf_na_nice,
-                                            Cnfadaf_nda_nice,
-                                            Cnfadaf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            aileron);
-           else
-             CnfadafI = uiuc_3Dinterpolation(Cnfadaf_fArray,
-                                             Cnfadaf_aArray,
-                                             Cnfadaf_daArray,
-                                             Cnfadaf_CnArray,
-                                             Cnfadaf_nAlphaArray,
-                                             Cnfadaf_nda,
-                                             Cnfadaf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             aileron);
+            if (Cnfadaf_nice == 1)
+              CnfadafI = uiuc_3Dinterp_quick(Cnfadaf_fArray,
+                                             Cnfadaf_aArray_nice,
+                                             Cnfadaf_daArray_nice,
+                                             Cnfadaf_CnArray,
+                                             Cnfadaf_na_nice,
+                                             Cnfadaf_nda_nice,
+                                             Cnfadaf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             aileron);
+            else
+              CnfadafI = uiuc_3Dinterpolation(Cnfadaf_fArray,
+                                              Cnfadaf_aArray,
+                                              Cnfadaf_daArray,
+                                              Cnfadaf_CnArray,
+                                              Cnfadaf_nAlphaArray,
+                                              Cnfadaf_nda,
+                                              Cnfadaf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              aileron);
             Cn += CnfadafI;
             break;
           }
         case Cnfadrf_flag:
           {
-           if (Cnfadrf_nice == 1)
-             CnfadrfI = uiuc_3Dinterp_quick(Cnfadrf_fArray,
-                                            Cnfadrf_aArray_nice,
-                                            Cnfadrf_drArray_nice,
-                                            Cnfadrf_CnArray,
-                                            Cnfadrf_na_nice,
-                                            Cnfadrf_ndr_nice,
-                                            Cnfadrf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            rudder);
-           else
-             CnfadrfI = uiuc_3Dinterpolation(Cnfadrf_fArray,
-                                             Cnfadrf_aArray,
-                                             Cnfadrf_drArray,
-                                             Cnfadrf_CnArray,
-                                             Cnfadrf_nAlphaArray,
-                                             Cnfadrf_ndr,
-                                             Cnfadrf_nf,
-                                             flap_pos,
-                                             Std_Alpha,
-                                             rudder);
+            if (Cnfadrf_nice == 1)
+              CnfadrfI = uiuc_3Dinterp_quick(Cnfadrf_fArray,
+                                             Cnfadrf_aArray_nice,
+                                             Cnfadrf_drArray_nice,
+                                             Cnfadrf_CnArray,
+                                             Cnfadrf_na_nice,
+                                             Cnfadrf_ndr_nice,
+                                             Cnfadrf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             rudder);
+            else
+              CnfadrfI = uiuc_3Dinterpolation(Cnfadrf_fArray,
+                                              Cnfadrf_aArray,
+                                              Cnfadrf_drArray,
+                                              Cnfadrf_CnArray,
+                                              Cnfadrf_nAlphaArray,
+                                              Cnfadrf_ndr,
+                                              Cnfadrf_nf,
+                                              flap_pos,
+                                              Std_Alpha,
+                                              rudder);
             Cn += CnfadrfI;
             break;
           }
         case Cnfapf_flag:
           {
-           p_nondim = P_body * b_2U;
-           if (Cnfapf_nice == 1)
-             CnfapfI = uiuc_3Dinterp_quick(Cnfapf_fArray,
-                                           Cnfapf_aArray_nice,
-                                           Cnfapf_pArray_nice,
-                                           Cnfapf_CnArray,
-                                           Cnfapf_na_nice,
-                                           Cnfapf_np_nice,
-                                           Cnfapf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           p_nondim);
-           else
-             CnfapfI = uiuc_3Dinterpolation(Cnfapf_fArray,
-                                            Cnfapf_aArray,
-                                            Cnfapf_pArray,
-                                            Cnfapf_CnArray,
-                                            Cnfapf_nAlphaArray,
-                                            Cnfapf_np,
-                                            Cnfapf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            p_nondim);
+            p_nondim = P_body * b_2U;
+            if (Cnfapf_nice == 1)
+              CnfapfI = uiuc_3Dinterp_quick(Cnfapf_fArray,
+                                            Cnfapf_aArray_nice,
+                                            Cnfapf_pArray_nice,
+                                            Cnfapf_CnArray,
+                                            Cnfapf_na_nice,
+                                            Cnfapf_np_nice,
+                                            Cnfapf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            p_nondim);
+            else
+              CnfapfI = uiuc_3Dinterpolation(Cnfapf_fArray,
+                                             Cnfapf_aArray,
+                                             Cnfapf_pArray,
+                                             Cnfapf_CnArray,
+                                             Cnfapf_nAlphaArray,
+                                             Cnfapf_np,
+                                             Cnfapf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             p_nondim);
             Cn += CnfapfI;
             break;
           }
         case Cnfarf_flag:
           {
-           r_nondim = R_body * b_2U;
-           if (Cnfarf_nice == 1)
-             CnfarfI = uiuc_3Dinterp_quick(Cnfarf_fArray,
-                                           Cnfarf_aArray_nice,
-                                           Cnfarf_rArray_nice,
-                                           Cnfarf_CnArray,
-                                           Cnfarf_na_nice,
-                                           Cnfarf_nr_nice,
-                                           Cnfarf_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           r_nondim);
-           else
-             CnfarfI = uiuc_3Dinterpolation(Cnfarf_fArray,
-                                            Cnfarf_aArray,
-                                            Cnfarf_rArray,
-                                            Cnfarf_CnArray,
-                                            Cnfarf_nAlphaArray,
-                                            Cnfarf_nr,
-                                            Cnfarf_nf,
-                                            flap_pos,
-                                            Std_Alpha,
-                                            r_nondim);
+            r_nondim = R_body * b_2U;
+            if (Cnfarf_nice == 1)
+              CnfarfI = uiuc_3Dinterp_quick(Cnfarf_fArray,
+                                            Cnfarf_aArray_nice,
+                                            Cnfarf_rArray_nice,
+                                            Cnfarf_CnArray,
+                                            Cnfarf_na_nice,
+                                            Cnfarf_nr_nice,
+                                            Cnfarf_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            r_nondim);
+            else
+              CnfarfI = uiuc_3Dinterpolation(Cnfarf_fArray,
+                                             Cnfarf_aArray,
+                                             Cnfarf_rArray,
+                                             Cnfarf_CnArray,
+                                             Cnfarf_nAlphaArray,
+                                             Cnfarf_nr,
+                                             Cnfarf_nf,
+                                             flap_pos,
+                                             Std_Alpha,
+                                             r_nondim);
             Cn += CnfarfI;
             break;
           }
index d56c2f40934f5d8bd544699932120132a62cd67a..9c04e758e0bec87e50e2e944e2dbf2c642d18951 100644 (file)
                             function from CLfade, CDfade, Cmfade, 
                             CYfada, CYfbetadr, Clfada, Clfbetadr, 
                             Cnfada, and Cnfbetadr switches
-              04/15/2000   (JS) broke up into multiple 
-                           uiuc_coef_xxx functions
-              06/18/2001   (RD) Added initialization of Std_Alpha and
-                           Std_Beta.  Added aileron_input and rudder_input.
-                           Added pilot_elev_no, pilot_ail_no, and
-                           pilot_rud_no.
-              07/05/2001   (RD) Added pilot_(elev,ail,rud)_no=false
-              01/11/2002   (AP) Added call to uiuc_iceboot()
+               04/15/2000   (JS) broke up into multiple 
+                            uiuc_coef_xxx functions
+               06/18/2001   (RD) Added initialization of Std_Alpha and
+                            Std_Beta.  Added aileron_input and rudder_input.
+                            Added pilot_elev_no, pilot_ail_no, and
+                            pilot_rud_no.
+               07/05/2001   (RD) Added pilot_(elev,ail,rud)_no=false
+               01/11/2002   (AP) Added call to uiuc_iceboot()
                12/02/2002   (RD) Moved icing demo interpolations to its
                             own function
-              
+               
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
-              Ann Peedikayil     <peedikay@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
+               Ann Peedikayil     <peedikay@uiuc.edu>
 ----------------------------------------------------------------------
 
  VARIABLES:
@@ -52,7 +52,7 @@
  INPUTS:       -V_rel_wind (or U_body)
                -dyn_on_speed
                -ice on/off
-              -phugoid on/off
+               -phugoid on/off
 
 ----------------------------------------------------------------------
 
@@ -75,7 +75,7 @@
                uiuc_coef_sideforce
                uiuc_coef_roll
                uiuc_coef_yaw
-              uiuc_controlInput
+               uiuc_controlInput
 
 ----------------------------------------------------------------------
 
@@ -119,83 +119,83 @@ void uiuc_coefficients(double dt)
   if (nondim_rate_V_rel_wind || use_V_rel_wind_2U)         // c172_aero uses V_rel_wind
     {
       if (V_rel_wind > dyn_on_speed)
-       {
-         cbar_2U = cbar / (2.0 * V_rel_wind);
-         b_2U    = bw /   (2.0 * V_rel_wind);
-         // chord_h is the horizontal tail chord
-         ch_2U   = chord_h /   (2.0 * V_rel_wind);
-       }
+        {
+          cbar_2U = cbar / (2.0 * V_rel_wind);
+          b_2U    = bw /   (2.0 * V_rel_wind);
+          // chord_h is the horizontal tail chord
+          ch_2U   = chord_h /   (2.0 * V_rel_wind);
+        }
       else if (use_dyn_on_speed_curve1)
-       {
-         V_rel_wind_dum = dyn_on_speed_zero + V_rel_wind * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
-         cbar_2U        = cbar / (2.0 * V_rel_wind_dum);
-         b_2U           = bw /   (2.0 * V_rel_wind_dum);
-         ch_2U          = chord_h /   (2.0 * V_rel_wind_dum);
-         Std_Alpha_dot      = 0.0;
-       }
+          {
+            V_rel_wind_dum = dyn_on_speed_zero + V_rel_wind * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
+            cbar_2U        = cbar / (2.0 * V_rel_wind_dum);
+            b_2U           = bw /   (2.0 * V_rel_wind_dum);
+            ch_2U          = chord_h /   (2.0 * V_rel_wind_dum);
+          Std_Alpha_dot      = 0.0;
+          }
       else
-       {
-         cbar_2U   = 0.0;
-         b_2U      = 0.0;
-         ch_2U     = 0.0;
-         Std_Alpha_dot = 0.0;
-       }
+        {
+          cbar_2U   = 0.0;
+          b_2U      = 0.0;
+          ch_2U     = 0.0;
+          Std_Alpha_dot = 0.0;
+        }
     }
   else if(use_abs_U_body_2U)      // use absolute(U_body)
     {
       if (fabs(U_body) > dyn_on_speed)
-       {
-         cbar_2U = cbar / (2.0 * fabs(U_body));
-         b_2U    = bw /   (2.0 * fabs(U_body));
-         ch_2U   = chord_h /   (2.0 * fabs(U_body));
-       }
+        {
+          cbar_2U = cbar / (2.0 * fabs(U_body));
+          b_2U    = bw /   (2.0 * fabs(U_body));
+          ch_2U   = chord_h /   (2.0 * fabs(U_body));
+        }
       else if (use_dyn_on_speed_curve1)
-       {
-         U_body_dum = dyn_on_speed_zero + fabs(U_body) * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
-         cbar_2U    = cbar / (2.0 * U_body_dum);
-         b_2U       = bw /   (2.0 * U_body_dum);
-         ch_2U      = chord_h /   (2.0 * U_body_dum);
-         Std_Alpha_dot  = 0.0;
-       }
+        {
+          U_body_dum = dyn_on_speed_zero + fabs(U_body) * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
+          cbar_2U    = cbar / (2.0 * U_body_dum);
+          b_2U       = bw /   (2.0 * U_body_dum);
+          ch_2U      = chord_h /   (2.0 * U_body_dum);
+          Std_Alpha_dot  = 0.0;
+        }
       else
-       {
-         cbar_2U   = 0.0;
-         b_2U      = 0.0;
-         ch_2U     = 0.0;
-         Std_Alpha_dot = 0.0;
-       }
+        {
+          cbar_2U   = 0.0;
+          b_2U      = 0.0;
+          ch_2U     = 0.0;
+          Std_Alpha_dot = 0.0;
+        }
     }
   else      // use U_body
     {
       if (U_body > dyn_on_speed)
-       {
-         cbar_2U = cbar / (2.0 * U_body);
-         b_2U    = bw /   (2.0 * U_body);
-         ch_2U   = chord_h /   (2.0 * U_body);
-       }
+        {
+          cbar_2U = cbar / (2.0 * U_body);
+          b_2U    = bw /   (2.0 * U_body);
+          ch_2U   = chord_h /   (2.0 * U_body);
+        }
       else if (use_dyn_on_speed_curve1)
-       {
-         U_body_dum = dyn_on_speed_zero + U_body * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
-         cbar_2U    = cbar / (2.0 * U_body_dum);
-         b_2U       = bw /   (2.0 * U_body_dum);
-         ch_2U      = chord_h /   (2.0 * U_body_dum);
-         Std_Alpha_dot  = 0.0;
-         beta_flow_clean_tail = cbar_2U;
-       }
+        {
+          U_body_dum = dyn_on_speed_zero + U_body * (dyn_on_speed - dyn_on_speed_zero)/dyn_on_speed;
+          cbar_2U    = cbar / (2.0 * U_body_dum);
+          b_2U       = bw /   (2.0 * U_body_dum);
+          ch_2U      = chord_h /   (2.0 * U_body_dum);
+          Std_Alpha_dot  = 0.0;
+          beta_flow_clean_tail = cbar_2U;
+        }
       else
-       {
-         cbar_2U   = 0.0;
-         b_2U      = 0.0;
-         ch_2U     = 0.0;
-         Std_Alpha_dot = 0.0;
-       }
+        {
+          cbar_2U   = 0.0;
+          b_2U      = 0.0;
+          ch_2U     = 0.0;
+          Std_Alpha_dot = 0.0;
+        }
     }
 
   // check if speed is sufficient to "trust" Std_Alpha_dot value
   if (use_Alpha_dot_on_speed)
     {
       if (V_rel_wind     < Alpha_dot_on_speed)
-         Std_Alpha_dot = 0.0;
+          Std_Alpha_dot = 0.0;
     }
 
 
@@ -253,77 +253,77 @@ void uiuc_coefficients(double dt)
   if (nonlin_ice_case)
     {
       if (eta_from_file)
-       {
-         if (eta_tail_input) {
-           double time = Simtime - eta_tail_input_startTime;
-           eta_tail = uiuc_1Dinterpolation(eta_tail_input_timeArray,
-                                           eta_tail_input_daArray,
-                                           eta_tail_input_ntime,
-                                           time);
-         }
-         if (eta_wing_left_input) {
-           double time = Simtime - eta_wing_left_input_startTime;
-           eta_wing_left = uiuc_1Dinterpolation(eta_wing_left_input_timeArray,
-                                                eta_wing_left_input_daArray,
-                                                eta_wing_left_input_ntime,
-                                                time);
-         }
-         if (eta_wing_right_input) {
-           double time = Simtime - eta_wing_right_input_startTime;
-           eta_wing_right = uiuc_1Dinterpolation(eta_wing_right_input_timeArray,
-                                                 eta_wing_right_input_daArray,
-                                                 eta_wing_right_input_ntime,
-                                                 time);
-         }
-       }
+        {
+          if (eta_tail_input) {
+            double time = Simtime - eta_tail_input_startTime;
+            eta_tail = uiuc_1Dinterpolation(eta_tail_input_timeArray,
+                                            eta_tail_input_daArray,
+                                            eta_tail_input_ntime,
+                                            time);
+          }
+          if (eta_wing_left_input) {
+            double time = Simtime - eta_wing_left_input_startTime;
+            eta_wing_left = uiuc_1Dinterpolation(eta_wing_left_input_timeArray,
+                                                 eta_wing_left_input_daArray,
+                                                 eta_wing_left_input_ntime,
+                                                 time);
+          }
+          if (eta_wing_right_input) {
+            double time = Simtime - eta_wing_right_input_startTime;
+            eta_wing_right = uiuc_1Dinterpolation(eta_wing_right_input_timeArray,
+                                                  eta_wing_right_input_daArray,
+                                                  eta_wing_right_input_ntime,
+                                                  time);
+          }
+        }
 
       delta_CL = delta_CD = delta_Cm = delta_Cl = delta_Cn = 0.0;
       Calc_Iced_Forces();
       add_ice_effects();
       tactilefadefI = 0.0;
       if (eta_tail == 0.2 && tactile_pitch && tactilefadef)
-       {
-         if (tactilefadef_nice == 1)
-           tactilefadefI = uiuc_3Dinterp_quick(tactilefadef_fArray,
-                                          tactilefadef_aArray_nice,
-                                          tactilefadef_deArray_nice,
-                                          tactilefadef_tactileArray,
-                                          tactilefadef_na_nice,
-                                          tactilefadef_nde_nice,
-                                          tactilefadef_nf,
-                                          flap_pos,
-                                          Std_Alpha,
-                                          elevator);
-         else
-           tactilefadefI = uiuc_3Dinterpolation(tactilefadef_fArray,
-                                           tactilefadef_aArray,
-                                           tactilefadef_deArray,
-                                           tactilefadef_tactileArray,
-                                           tactilefadef_nAlphaArray,
-                                           tactilefadef_nde,
-                                           tactilefadef_nf,
-                                           flap_pos,
-                                           Std_Alpha,
-                                           elevator);
-       }
+        {
+          if (tactilefadef_nice == 1)
+            tactilefadefI = uiuc_3Dinterp_quick(tactilefadef_fArray,
+                                           tactilefadef_aArray_nice,
+                                           tactilefadef_deArray_nice,
+                                           tactilefadef_tactileArray,
+                                           tactilefadef_na_nice,
+                                           tactilefadef_nde_nice,
+                                           tactilefadef_nf,
+                                           flap_pos,
+                                           Std_Alpha,
+                                           elevator);
+          else
+            tactilefadefI = uiuc_3Dinterpolation(tactilefadef_fArray,
+                                            tactilefadef_aArray,
+                                            tactilefadef_deArray,
+                                            tactilefadef_tactileArray,
+                                            tactilefadef_nAlphaArray,
+                                            tactilefadef_nde,
+                                            tactilefadef_nf,
+                                            flap_pos,
+                                            Std_Alpha,
+                                            elevator);
+        }
       else if (demo_tactile)
-       {
-         double time = Simtime - demo_tactile_startTime;
-         tactilefadefI = uiuc_1Dinterpolation(demo_tactile_timeArray,
-                                              demo_tactile_daArray,
-                                              demo_tactile_ntime,
-                                              time);
-       }
+        {
+          double time = Simtime - demo_tactile_startTime;
+          tactilefadefI = uiuc_1Dinterpolation(demo_tactile_timeArray,
+                                               demo_tactile_daArray,
+                                               demo_tactile_ntime,
+                                               time);
+        }
       if (icing_demo)
-       uiuc_icing_demo();
+        uiuc_icing_demo();
     }
 
   if (pilot_ail_no)
     {
       if (aileron <=0)
-       Lat_control = - aileron / damax * RAD_TO_DEG;
+        Lat_control = - aileron / damax * RAD_TO_DEG;
       else
-       Lat_control = - aileron / damin * RAD_TO_DEG;
+        Lat_control = - aileron / damin * RAD_TO_DEG;
     }
 
   // can go past real limits
@@ -331,26 +331,26 @@ void uiuc_coefficients(double dt)
   if (pilot_elev_no)
     {
       if (outside_control == false)
-       {
-         l_trim = elevator_tab;
-         l_defl = elevator - elevator_tab;
-         if (l_trim <=0 )
-           Long_trim = l_trim / demax * RAD_TO_DEG;
-         else
-           Long_trim = l_trim / demin * RAD_TO_DEG;
-         if (l_defl <= 0)
-           Long_control = l_defl / demax * RAD_TO_DEG;
-         else
-           Long_control = l_defl / demin * RAD_TO_DEG;
-       }
+        {
+          l_trim = elevator_tab;
+          l_defl = elevator - elevator_tab;
+          if (l_trim <=0 )
+            Long_trim = l_trim / demax * RAD_TO_DEG;
+          else
+            Long_trim = l_trim / demin * RAD_TO_DEG;
+          if (l_defl <= 0)
+            Long_control = l_defl / demax * RAD_TO_DEG;
+          else
+            Long_control = l_defl / demin * RAD_TO_DEG;
+        }
     }
 
   if (pilot_rud_no)
     {
       if (rudder <=0)
-       Rudder_pedal = - rudder / drmax * RAD_TO_DEG;
+        Rudder_pedal = - rudder / drmax * RAD_TO_DEG;
       else
-       Rudder_pedal = - rudder / drmin * RAD_TO_DEG;
+        Rudder_pedal = - rudder / drmin * RAD_TO_DEG;
     }
 
   return;
index b18a77c4e395663b2a7af14790f0dbb27dff81ad..c93a29693fdb22aaa9456a076a9d9fdfa14589c4 100644 (file)
@@ -19,9 +19,9 @@
 
  HISTORY:      04/08/2000   initial release
                06/18/2001   (RD) Added aileron_input and rudder_input
-              07/05/2001   (RD) Code added to allow the pilot to fly
-                           aircraft after the control surface input
-                           files have been used.
+               07/05/2001   (RD) Code added to allow the pilot to fly
+                            aircraft after the control surface input
+                            files have been used.
 
 ----------------------------------------------------------------------
 
@@ -119,11 +119,11 @@ void uiuc_controlInput()
           Simtime <= (elevator_input_startTime + elevator_input_endTime))
         {
           double time = Simtime - elevator_input_startTime;
-         if (pilot_elev_no_check)
-           {
-             elevator = 0 + elevator_tab;
-             pilot_elev_no = true;
-           }
+          if (pilot_elev_no_check)
+            {
+              elevator = 0 + elevator_tab;
+              pilot_elev_no = true;
+            }
           elevator = elevator + 
             uiuc_1Dinterpolation(elevator_input_timeArray,
                                  elevator_input_deArray,
@@ -140,14 +140,14 @@ void uiuc_controlInput()
           Simtime <= (aileron_input_startTime + aileron_input_endTime))
         {
           double time = Simtime - aileron_input_startTime;
-         if (pilot_ail_no_check)
-           {
-             aileron = 0;
-             if (Simtime==0)             //7-25-01 (RD) Added because
-               pilot_ail_no = false;     //segmentation fault is given
-             else                        //with FG 0.7.8
-               pilot_ail_no = true;
-           }
+          if (pilot_ail_no_check)
+            {
+              aileron = 0;
+              if (Simtime==0)             //7-25-01 (RD) Added because
+                pilot_ail_no = false;     //segmentation fault is given
+              else                        //with FG 0.7.8
+                pilot_ail_no = true;
+            }
           aileron = aileron + 
             uiuc_1Dinterpolation(aileron_input_timeArray,
                                  aileron_input_daArray,
@@ -164,11 +164,11 @@ void uiuc_controlInput()
           Simtime <= (rudder_input_startTime + rudder_input_endTime))
         {
           double time = Simtime - rudder_input_startTime;
-         if (pilot_rud_no_check)
-           {
-             rudder = 0;
-             pilot_rud_no = true;
-           }
+          if (pilot_rud_no_check)
+            {
+              rudder = 0;
+              pilot_rud_no = true;
+            }
           rudder = rudder + 
             uiuc_1Dinterpolation(rudder_input_timeArray,
                                  rudder_input_drArray,
@@ -185,9 +185,9 @@ void uiuc_controlInput()
         {
           double time = Simtime - flap_pos_input_startTime;
           flap_pos = uiuc_1Dinterpolation(flap_pos_input_timeArray,
-                                         flap_pos_input_dfArray,
-                                         flap_pos_input_ntime,
-                                         time);
+                                          flap_pos_input_dfArray,
+                                          flap_pos_input_ntime,
+                                          time);
         }
     }
 
index 2ca79a79362ac848c3bb4c1951d671be44d3bc14..dd1e6d6c8fe69fbdaf8df55e58d5766e5d0f6a82 100644 (file)
@@ -72,15 +72,15 @@ double uiuc_convert( int conversionType )
     {
     case 0:
       {
-       /* no conversion, multiply by 1 */
-       factor = 1;
-       break;
+        /* no conversion, multiply by 1 */
+        factor = 1;
+        break;
       }
     case 1:
       {
-       /* convert from degrees to radians */
-       factor = DEG_TO_RAD;
-       break;
+        /* convert from degrees to radians */
+        factor = DEG_TO_RAD;
+        break;
       }
     };
   return factor;
index 453b4e37fa71388ce440853844ce39510ab6825f..1cf7839a1676b58d1f828ede27ab8c66dc5c9a00 100644 (file)
@@ -25,7 +25,7 @@
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
                Michael Selig      <m-selig@uiuc.edu>
 
 ----------------------------------------------------------------------
@@ -91,7 +91,7 @@ void uiuc_engine()
                          Throttle_pct_input_dTArray,
                          Throttle_pct_input_ntime,
                          time);
-         pilot_throttle_no = true;
+          pilot_throttle_no = true;
         }
     }
   
@@ -119,50 +119,50 @@ void uiuc_engine()
         case simpleSingle_flag:
           {
             F_X_engine = Throttle[3] * simpleSingleMaxThrust;
-           F_Y_engine = 0.0;
-           F_Z_engine = 0.0;
-           M_l_engine = 0.0;
-           M_m_engine = 0.0;
-           M_n_engine = 0.0;
+            F_Y_engine = 0.0;
+            F_Z_engine = 0.0;
+            M_l_engine = 0.0;
+            M_m_engine = 0.0;
+            M_n_engine = 0.0;
             break;
           }
         case simpleSingleModel_flag:
           {
-           /* simple model based on Hepperle's equation
-            * exponent dtdvvt was computed in uiuc_menu.cpp */
-           F_X_engine = Throttle[3] * t_v0 * (1 - pow((V_rel_wind/v_t0),dtdvvt));
-           F_Y_engine = 0.0;
-           F_Z_engine = 0.0;
-           M_l_engine = 0.0;
-           M_m_engine = 0.0;
-           M_n_engine = 0.0;
-           if (b_slipstreamEffects) {
-             tc = F_X_engine/(Dynamic_pressure * LS_PI * propDia * propDia / 4);
-             w_induced = 0.5 *  V_rel_wind * (-1 + pow((1+tc),.5));
-             eta_q = (2* w_induced + V_rel_wind)*(2* w_induced + V_rel_wind)/(V_rel_wind * V_rel_wind);
-             /* add in a die-off function so that eta falls off w/ alfa and beta */
-             eta_q = Cos_alpha * Cos_alpha * Cos_beta * Cos_beta * eta_q;
-             /* determine the eta_q values for the respective coefficients */
-             if (eta_q_Cm_q_fac)    {eta_q_Cm_q    *= eta_q * eta_q_Cm_q_fac;}
-             if (eta_q_Cm_adot_fac) {eta_q_Cm_adot *= eta_q * eta_q_Cm_adot_fac;}
-             if (eta_q_Cmfade_fac)  {eta_q_Cmfade  *= eta_q * eta_q_Cmfade_fac;}
-             if (eta_q_Cm_de_fac)   {eta_q_Cm_de   *= eta_q * eta_q_Cm_de_fac;}
-             if (eta_q_Cl_beta_fac) {eta_q_Cl_beta *= eta_q * eta_q_Cl_beta_fac;}
-             if (eta_q_Cl_p_fac)    {eta_q_Cl_p    *= eta_q * eta_q_Cl_p_fac;}
-             if (eta_q_Cl_r_fac)    {eta_q_Cl_r    *= eta_q * eta_q_Cl_r_fac;}
-             if (eta_q_Cl_dr_fac)   {eta_q_Cl_dr   *= eta_q * eta_q_Cl_dr_fac;}
-             if (eta_q_CY_beta_fac) {eta_q_CY_beta *= eta_q * eta_q_CY_beta_fac;}
-             if (eta_q_CY_p_fac)    {eta_q_CY_p    *= eta_q * eta_q_CY_p_fac;}
-             if (eta_q_CY_r_fac)    {eta_q_CY_r    *= eta_q * eta_q_CY_r_fac;}
-             if (eta_q_CY_dr_fac)   {eta_q_CY_dr   *= eta_q * eta_q_CY_dr_fac;}
-             if (eta_q_Cn_beta_fac) {eta_q_Cn_beta *= eta_q * eta_q_Cn_beta_fac;}
-             if (eta_q_Cn_p_fac)    {eta_q_Cn_p    *= eta_q * eta_q_Cn_p_fac;}
-             if (eta_q_Cn_r_fac)    {eta_q_Cn_r    *= eta_q * eta_q_Cn_r_fac;}
-             if (eta_q_Cn_dr_fac)   {eta_q_Cn_dr   *= eta_q * eta_q_Cn_dr_fac;}
-           }
-           /* Need engineOmega for gyroscopic moments */
-           engineOmega = minOmega + Throttle[3] * (maxOmega - minOmega);
-           break;
+            /* simple model based on Hepperle's equation
+             * exponent dtdvvt was computed in uiuc_menu.cpp */
+            F_X_engine = Throttle[3] * t_v0 * (1 - pow((V_rel_wind/v_t0),dtdvvt));
+            F_Y_engine = 0.0;
+            F_Z_engine = 0.0;
+            M_l_engine = 0.0;
+            M_m_engine = 0.0;
+            M_n_engine = 0.0;
+            if (b_slipstreamEffects) {
+              tc = F_X_engine/(Dynamic_pressure * LS_PI * propDia * propDia / 4);
+              w_induced = 0.5 *  V_rel_wind * (-1 + pow((1+tc),.5));
+              eta_q = (2* w_induced + V_rel_wind)*(2* w_induced + V_rel_wind)/(V_rel_wind * V_rel_wind);
+              /* add in a die-off function so that eta falls off w/ alfa and beta */
+              eta_q = Cos_alpha * Cos_alpha * Cos_beta * Cos_beta * eta_q;
+              /* determine the eta_q values for the respective coefficients */
+              if (eta_q_Cm_q_fac)    {eta_q_Cm_q    *= eta_q * eta_q_Cm_q_fac;}
+              if (eta_q_Cm_adot_fac) {eta_q_Cm_adot *= eta_q * eta_q_Cm_adot_fac;}
+              if (eta_q_Cmfade_fac)  {eta_q_Cmfade  *= eta_q * eta_q_Cmfade_fac;}
+              if (eta_q_Cm_de_fac)   {eta_q_Cm_de   *= eta_q * eta_q_Cm_de_fac;}
+              if (eta_q_Cl_beta_fac) {eta_q_Cl_beta *= eta_q * eta_q_Cl_beta_fac;}
+              if (eta_q_Cl_p_fac)    {eta_q_Cl_p    *= eta_q * eta_q_Cl_p_fac;}
+              if (eta_q_Cl_r_fac)    {eta_q_Cl_r    *= eta_q * eta_q_Cl_r_fac;}
+              if (eta_q_Cl_dr_fac)   {eta_q_Cl_dr   *= eta_q * eta_q_Cl_dr_fac;}
+              if (eta_q_CY_beta_fac) {eta_q_CY_beta *= eta_q * eta_q_CY_beta_fac;}
+              if (eta_q_CY_p_fac)    {eta_q_CY_p    *= eta_q * eta_q_CY_p_fac;}
+              if (eta_q_CY_r_fac)    {eta_q_CY_r    *= eta_q * eta_q_CY_r_fac;}
+              if (eta_q_CY_dr_fac)   {eta_q_CY_dr   *= eta_q * eta_q_CY_dr_fac;}
+              if (eta_q_Cn_beta_fac) {eta_q_Cn_beta *= eta_q * eta_q_Cn_beta_fac;}
+              if (eta_q_Cn_p_fac)    {eta_q_Cn_p    *= eta_q * eta_q_Cn_p_fac;}
+              if (eta_q_Cn_r_fac)    {eta_q_Cn_r    *= eta_q * eta_q_Cn_r_fac;}
+              if (eta_q_Cn_dr_fac)   {eta_q_Cn_dr   *= eta_q * eta_q_Cn_dr_fac;}
+            }
+            /* Need engineOmega for gyroscopic moments */
+            engineOmega = minOmega + Throttle[3] * (maxOmega - minOmega);
+            break;
           }
         case c172_flag:
           {
@@ -213,39 +213,39 @@ void uiuc_engine()
             F_Z_engine = 0.0;
             break;
           }
-       case forcemom_flag:
-         {
-           double Xp_input_endTime = Xp_input_timeArray[Xp_input_ntime];
-           if (Simtime >= Xp_input_startTime && 
-               Simtime <= (Xp_input_startTime + Xp_input_endTime))
-             {
-               double time = Simtime - Xp_input_startTime;
-               F_X_engine = uiuc_1Dinterpolation(Xp_input_timeArray,
-                                                 Xp_input_XpArray,
-                                                 Xp_input_ntime,
-                                                 time);
-             }
-           double Zp_input_endTime = Zp_input_timeArray[Zp_input_ntime];
-           if (Simtime >= Zp_input_startTime && 
-               Simtime <= (Zp_input_startTime + Zp_input_endTime))
-             {
-               double time = Simtime - Zp_input_startTime;
-               F_Z_engine = uiuc_1Dinterpolation(Zp_input_timeArray,
-                                                 Zp_input_ZpArray,
-                                                 Zp_input_ntime,
-                                                 time);
-             }
-           double Mp_input_endTime = Mp_input_timeArray[Mp_input_ntime];
-           if (Simtime >= Mp_input_startTime && 
-               Simtime <= (Mp_input_startTime + Mp_input_endTime))
-             {
-               double time = Simtime - Mp_input_startTime;
-               M_m_engine = uiuc_1Dinterpolation(Mp_input_timeArray,
-                                                 Mp_input_MpArray,
-                                                 Mp_input_ntime,
-                                                 time);
-             }
-         }
+        case forcemom_flag:
+          {
+            double Xp_input_endTime = Xp_input_timeArray[Xp_input_ntime];
+            if (Simtime >= Xp_input_startTime && 
+                Simtime <= (Xp_input_startTime + Xp_input_endTime))
+              {
+                double time = Simtime - Xp_input_startTime;
+                F_X_engine = uiuc_1Dinterpolation(Xp_input_timeArray,
+                                                  Xp_input_XpArray,
+                                                  Xp_input_ntime,
+                                                  time);
+              }
+            double Zp_input_endTime = Zp_input_timeArray[Zp_input_ntime];
+            if (Simtime >= Zp_input_startTime && 
+                Simtime <= (Zp_input_startTime + Zp_input_endTime))
+              {
+                double time = Simtime - Zp_input_startTime;
+                F_Z_engine = uiuc_1Dinterpolation(Zp_input_timeArray,
+                                                  Zp_input_ZpArray,
+                                                  Zp_input_ntime,
+                                                  time);
+              }
+            double Mp_input_endTime = Mp_input_timeArray[Mp_input_ntime];
+            if (Simtime >= Mp_input_startTime && 
+                Simtime <= (Mp_input_startTime + Mp_input_endTime))
+              {
+                double time = Simtime - Mp_input_startTime;
+                M_m_engine = uiuc_1Dinterpolation(Mp_input_timeArray,
+                                                  Mp_input_MpArray,
+                                                  Mp_input_ntime,
+                                                  time);
+              }
+          }
         };
     }
   return;
index 043566e1a3bcbfbfe6e0987de1fd834f9a3a42be..e26c74c454f16e0d55e64654dbaef71758471287 100644 (file)
@@ -66,7 +66,7 @@
 #include "uiuc_find_position.h"
 
 double uiuc_find_position(double command, double increment_per_timestep,
-                         double position)
+                          double position)
 {
   if (position < command) {
     position += increment_per_timestep;
index 4612b7ded0f9108d48be44908a469fc188fa26a9..e14749df5d57f1014863c0c08d85bd8d0ba051af 100644 (file)
@@ -2,7 +2,7 @@
 #define _FIND_POSITION_H_
 
 double uiuc_find_position(double command, double increment_per_timestep,
-                         double position);
+                          double position);
 
 
 #endif // _FIND_POSITION_H_
index 662e274623849cddd95b71ea5f8fdf684e0d6087..4112586dbf0f81336555737adf53cd34094e8d67 100644 (file)
@@ -96,10 +96,10 @@ FlapData::~FlapData(){
   for(i=0;i<alphaLength;i++){
     for(j=0;j<speedLength;j++){
       for(k=0;k<freqLength;k++){
-       delete[] liftTable[i][j][k];
-       delete[] thrustTable[i][j][k];
-       delete[] momentTable[i][j][k];
-       delete[] inertiaTable[i][j][k];
+        delete[] liftTable[i][j][k];
+        delete[] thrustTable[i][j][k];
+        delete[] momentTable[i][j][k];
+        delete[] inertiaTable[i][j][k];
       }
       delete[] liftTable[i][j];
       delete[] thrustTable[i][j];
@@ -268,11 +268,11 @@ int FlapData::readIn (ifstream* f){
         f->getline(numstr,200);
         sscanf(numstr,"%d,%d,%d,%d",&alphaLength,&speedLength,&freqLength,&phiLength);
 
-       //Check to see if the first line is 0 0 0 0
-       //If so, tell user to download data file
-       //Quits FlightGear
-       if (alphaLength==0 && speedLength==0 && freqLength==0 && phiLength==0)
-         uiuc_warnings_errors(7,"");
+        //Check to see if the first line is 0 0 0 0
+        //If so, tell user to download data file
+        //Quits FlightGear
+        if (alphaLength==0 && speedLength==0 && freqLength==0 && phiLength==0)
+          uiuc_warnings_errors(7,"");
 
         alphaArray=new double[alphaLength];
         speedArray=new double[speedLength];
index 03e99a3f70edf72d5f94078bff9c9918821e4992..ec46f587941305a4ffc4ce2479f221bded83c402 100644 (file)
@@ -5,7 +5,7 @@
 ----------------------------------------------------------------------
 
  DESCRIPTION:  changes Fog variable to +/-1 or 0 using fog 
-              parameters and Simtime
+               parameters and Simtime
 
 ----------------------------------------------------------------------
 
 
 ----------------------------------------------------------------------
 
- INPUTS:       -Simtime
-               -Fog
-               -fog_field
-               -fog_next_time
-               -fog_current_segment
-               -fog_value
-               -fog_time
-              
+ INPUTS:             -Simtime
+                -Fog
+                -fog_field
+                -fog_next_time
+                -fog_current_segment
+                -fog_value
+                -fog_time
+               
 ----------------------------------------------------------------------
 
- OUTPUTS:              -Fog
-               -fog_field
-               -fog_next_time
-               -fog_current_segment
+ OUTPUTS:              -Fog
+                -fog_field
+                -fog_next_time
+                -fog_current_segment
  
 ----------------------------------------------------------------------
 
@@ -81,11 +81,11 @@ void uiuc_fog()
     if (fog_current_segment != 0)
     {
       if (fog_value[fog_current_segment] > fog_value[fog_current_segment-1])
-       Fog = 1;
+        Fog = 1;
       else if (fog_value[fog_current_segment] < fog_value[fog_current_segment-1])
-       Fog = -1;
+        Fog = -1;
       else
-       Fog = 0;
+        Fog = 0;
     }
     else
       Fog = 0;
@@ -93,12 +93,12 @@ void uiuc_fog()
     if (Simtime > fog_time[fog_current_segment]) {
       if (fog_current_segment == fog_segments)
       {
-       fog_field = false;
-       Fog = 0;
-       return;
+        fog_field = false;
+        Fog = 0;
+        return;
       }
       else
-       fog_current_segment++;                  }
+        fog_current_segment++;                        }
 
     if (fog_value[fog_current_segment] == fog_value[fog_current_segment-1])
       fog_next_time = fog_time[fog_current_segment];
index 5cef35357095f3d54e46f4fec89fe8b382734d25..3db619fcc06bbe27c77a85628a335a015ce03651 100644 (file)
@@ -1,5 +1,5 @@
 /**********************************************************************
-                                                                      
+                                                                       
  FILENAME:     uiuc_gear.cpp
 
 ----------------------------------------------------------------------
@@ -121,16 +121,16 @@ void uiuc_gear()
    * Aircraft specific initializations and data goes here
    */
   
-  static DATA percent_brake[MAX_GEAR] =            /* percent applied braking */
+  static DATA percent_brake[MAX_GEAR] =            /* percent applied braking */
   { 0.,  0.,  0., 0.,
     0.,  0.,  0., 0.,
     0.,  0.,  0., 0.,
-    0.,  0.,  0., 0. };                            /* 0 = none, 1 = full */
-  static DATA caster_angle_rad[MAX_GEAR] =         /* steerable tires - in */
+    0.,  0.,  0., 0. };                            /* 0 = none, 1 = full */
+  static DATA caster_angle_rad[MAX_GEAR] =            /* steerable tires - in */
   { 0., 0., 0., 0.,
     0., 0., 0., 0.,
     0., 0., 0., 0.,
-    0., 0., 0., 0. };                         /* radians, +CW */       
+    0., 0., 0., 0. };                         /* radians, +CW */        
   /*
    * End of aircraft specific code
    */
@@ -143,15 +143,15 @@ void uiuc_gear()
    * 
    *           mu  ^
    *               |
-   *       max_mu  |       +           
-   *               |      /|           
-   *   sliding_mu  |     / +------     
-   *               |    /              
-   *               |   /               
+   *       max_mu  |       +                
+   *               |      /|                
+   *   sliding_mu  |     / +------        
+   *               |    /                
+   *               |   /                
    *               +--+------------------------> 
    *               |  |    |      sideward V
    *               0 bkout skid
-   *                  V     V
+   *                       V     V
    */
   
   
@@ -159,53 +159,53 @@ void uiuc_gear()
   { 1, 1, 1, 0,
     0, 0, 0, 0,
     0, 0, 0, 0,
-    0, 0, 0, 0 };      
+    0, 0, 0, 0 };        
   static DATA sliding_mu[MAX_GEAR] =
   { 0.5, 0.5, 0.5, 0.3,
     0.3, 0.3, 0.3, 0.3,
     0.3, 0.3, 0.3, 0.3,
-    0.3, 0.3, 0.3, 0.3 };      
+    0.3, 0.3, 0.3, 0.3 };        
   static DATA max_brake_mu[MAX_GEAR] =
   { 0.0, 0.6, 0.6, 0.0,
     0.0, 0.0, 0.0, 0.0,
     0.0, 0.0, 0.0, 0.0,
-    0.0, 0.0, 0.0, 0.0 };      
-  static DATA max_mu        = 0.8;     
-  static DATA bkout_v       = 0.1;
+    0.0, 0.0, 0.0, 0.0 };        
+  static DATA max_mu             = 0.8;        
+  static DATA bkout_v             = 0.1;
   static DATA skid_v       = 1.0;
   /*
    * Local data variables
    */
   
-  DATA d_wheel_cg_body_v[3];           /* wheel offset from cg,  X-Y-Z */
-  DATA d_wheel_cg_local_v[3];          /* wheel offset from cg,  N-E-D */
-  DATA d_wheel_rwy_local_v[3]; /* wheel offset from rwy, N-E-U */
+  DATA d_wheel_cg_body_v[3];                /* wheel offset from cg,  X-Y-Z        */
+  DATA d_wheel_cg_local_v[3];                /* wheel offset from cg,  N-E-D        */
+  DATA d_wheel_rwy_local_v[3];        /* wheel offset from rwy, N-E-U */
   DATA v_wheel_cg_local_v[3];    /*wheel velocity rel to cg N-E-D*/
-  // DATA v_wheel_body_v[3];           /* wheel velocity,        X-Y-Z */
-  DATA v_wheel_local_v[3];             /* wheel velocity,        N-E-D */
-  DATA f_wheel_local_v[3];             /* wheel reaction force,  N-E-D */
+  // DATA v_wheel_body_v[3];                /* wheel velocity,          X-Y-Z        */
+  DATA v_wheel_local_v[3];                /* wheel velocity,          N-E-D        */
+  DATA f_wheel_local_v[3];                /* wheel reaction force,  N-E-D        */
   // DATA altitude_local_v[3];       /*altitude vector in local (N-E-D) i.e. (0,0,h)*/
   // DATA altitude_body_v[3];        /*altitude vector in body (X,Y,Z)*/
   DATA temp3a[3];
   // DATA temp3b[3];
   DATA tempF[3];
-  DATA tempM[3];       
-  DATA reaction_normal_force;          /* wheel normal (to rwy) force  */
-  DATA cos_wheel_hdg_angle, sin_wheel_hdg_angle;       /* temp storage */
+  DATA tempM[3];        
+  DATA reaction_normal_force;                /* wheel normal (to rwy) force        */
+  DATA cos_wheel_hdg_angle, sin_wheel_hdg_angle;        /* temp storage */
   DATA v_wheel_forward, v_wheel_sideward,  abs_v_wheel_sideward;
-  DATA forward_mu, sideward_mu;        /* friction coefficients        */
-  DATA beta_mu;                        /* breakout friction slope      */
+  DATA forward_mu, sideward_mu;        /* friction coefficients        */
+  DATA beta_mu;                        /* breakout friction slope        */
   DATA forward_wheel_force, sideward_wheel_force;
   
-  int i;                               /* per wheel loop counter */
+  int i;                                /* per wheel loop counter */
   
   /*
    * Execution starts here
    */
   
   beta_mu = max_mu/(skid_v-bkout_v);
-  clear3( F_gear_v );          /* Initialize sum of forces...  */
-  clear3( M_gear_v );          /* ...and moments               */
+  clear3( F_gear_v );                /* Initialize sum of forces...        */
+  clear3( M_gear_v );                /* ...and moments                */
   
   /*
    * Put aircraft specific executable code here
@@ -218,173 +218,173 @@ void uiuc_gear()
     (0.01 + 0.04 * (1 - V_calibrated_kts / 130)) * Rudder_pedal;
   
   
-  for (i=0;i<MAX_GEAR;i++)         /* Loop for each wheel */
+  for (i=0;i<MAX_GEAR;i++)            /* Loop for each wheel */
     {
       // Execute only if the gear has been defined
       if (!gear_model[i]) 
-       {
-         // do nothing
-         continue;
-       }       
+        {
+          // do nothing
+          continue;
+        }       
       else
-       {
-         
-         /*========================================*/
-         /* Calculate wheel position w.r.t. runway */
-         /*========================================*/
-         
-         /* printf("\thgcg: %g, theta: %g,phi: %g\n",D_cg_above_rwy,Theta*RAD_TO_DEG,Phi*RAD_TO_DEG); */
-         
-         /* First calculate wheel location w.r.t. cg in body (X-Y-Z) axes... */
-         
-         sub3( D_gear_v[i], D_cg_rp_body_v, d_wheel_cg_body_v );
-         
-         /* then converting to local (North-East-Down) axes... */
-         
-         multtrans3x3by3( T_local_to_body_m,  d_wheel_cg_body_v, d_wheel_cg_local_v );
-         
-         
-         /* Runway axes correction - third element is Altitude, not (-)Z... */
-         
-         d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* since altitude = -Z */
-         
-         /* Add wheel offset to cg location in local axes */
-         
-         add3( d_wheel_cg_local_v, D_cg_rwy_local_v, d_wheel_rwy_local_v );
-         
-         /* remove Runway axes correction so right hand rule applies */
-         
-         d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* now Z positive down */
-         
-         /*============================*/
-         /* Calculate wheel velocities */
-         /*============================*/
-         
-         /* contribution due to angular rates */
-         
-         cross3( Omega_body_v, d_wheel_cg_body_v, temp3a );
-         
-         /* transform into local axes */
-         
-         multtrans3x3by3( T_local_to_body_m, temp3a,v_wheel_cg_local_v );
-         
-         /* plus contribution due to cg velocities */
-         
-         add3( v_wheel_cg_local_v, V_local_rel_ground_v, v_wheel_local_v );
-         
-         clear3(f_wheel_local_v);
-         reaction_normal_force=0;
-
-         fgSetBool("/gear/gear[0]/wow", false);
-         fgSetBool("/gear/gear[1]/wow", false);
-         fgSetBool("/gear/gear[2]/wow", false);
-         if( HEIGHT_AGL_WHEEL < 0. ) 
-           /*the wheel is underground -- which implies ground contact 
-             so calculate reaction forces */ 
-           {
-             //set the property - weight on wheels
-             //          if (i==0) 
-             //            {
-             //              fgSetBool("/gear/gear[0]/wow", true);
-             //            }
-             //          if (i==1) 
-             //            {
-             //              fgSetBool("/gear/gear[1]/wow", true);
-             //            }
-             //          if (i==2) 
-             //            {
-             //              fgSetBool("/gear/gear[2]/wow", true);
-             //            }
-             
-             /*===========================================*/
-             /* Calculate forces & moments for this wheel */
-             /*===========================================*/
-             
-             /* Add any anticipation, or frame lead/prediction, here... */
-             
-                               /* no lead used at present */
-             
-             /* Calculate sideward and forward velocities of the wheel 
-                in the runway plane                                    */
-             
-             cos_wheel_hdg_angle = cos(caster_angle_rad[i] + Psi);
-             sin_wheel_hdg_angle = sin(caster_angle_rad[i] + Psi);
-             
-             v_wheel_forward  = v_wheel_local_v[0]*cos_wheel_hdg_angle
-               + v_wheel_local_v[1]*sin_wheel_hdg_angle;
-             v_wheel_sideward = v_wheel_local_v[1]*cos_wheel_hdg_angle
-               - v_wheel_local_v[0]*sin_wheel_hdg_angle;
-             
-             
-             /* Calculate normal load force (simple spring constant) */
-             
-             reaction_normal_force = 0.;
-             
-             reaction_normal_force = kgear[i]*d_wheel_rwy_local_v[2]
-               - v_wheel_local_v[2]*cgear[i];
-             /* printf("\treaction_normal_force: %g\n",reaction_normal_force); */
-             
-             if (reaction_normal_force > 0.) reaction_normal_force = 0.;
-             /* to prevent damping component from swamping spring component */
-             
-             
-             /* Calculate friction coefficients */
-             
-             if(it_rolls[i])
-               {
-                 forward_mu = (max_brake_mu[i] - muGear[i])*percent_brake[i] + muGear[i];
-                 abs_v_wheel_sideward = sqrt(v_wheel_sideward*v_wheel_sideward);
-                 sideward_mu = sliding_mu[i];
-                 if (abs_v_wheel_sideward < skid_v) 
-                   sideward_mu = (abs_v_wheel_sideward - bkout_v)*beta_mu;
-                 if (abs_v_wheel_sideward < bkout_v) sideward_mu = 0.;
-               }
-             else
-               {
-                 forward_mu=sliding_mu[i];
-                 sideward_mu=sliding_mu[i];
-               }          
-             
-             /* Calculate foreward and sideward reaction forces */
-             
-             forward_wheel_force  =   forward_mu*reaction_normal_force;
-             sideward_wheel_force =  sideward_mu*reaction_normal_force;
-             if(v_wheel_forward < 0.) forward_wheel_force = -forward_wheel_force;
-             if(v_wheel_sideward < 0.) sideward_wheel_force = -sideward_wheel_force;
-             /* printf("\tFfwdgear: %g Fsidegear: %g\n",forward_wheel_force,sideward_wheel_force);
-              */
-             /* Rotate into local (N-E-D) axes */
-             
-             f_wheel_local_v[0] = forward_wheel_force*cos_wheel_hdg_angle
-               - sideward_wheel_force*sin_wheel_hdg_angle;
-             f_wheel_local_v[1] = forward_wheel_force*sin_wheel_hdg_angle
-               + sideward_wheel_force*cos_wheel_hdg_angle;
-             f_wheel_local_v[2] = reaction_normal_force;         
-             
-             /* Convert reaction force from local (N-E-D) axes to body (X-Y-Z) */
-             mult3x3by3( T_local_to_body_m, f_wheel_local_v, tempF );
-             
-             /* Calculate moments from force and offsets in body axes */
-             
-             cross3( d_wheel_cg_body_v, tempF, tempM );
-             
-             /* Sum forces and moments across all wheels */
-             if (tempF[0] != 0.0 || tempF[1] != 0.0 || tempF[2] != 0.0) {
-               fgSetBool("/gear/gear[1]/wow", true);
-             }
-             
-             add3( tempF, F_gear_v, F_gear_v );
-             add3( tempM, M_gear_v, M_gear_v );   
-             
-           }     
-       }
+        {
+          
+          /*========================================*/
+          /* Calculate wheel position w.r.t. runway */
+          /*========================================*/
+          
+          /* printf("\thgcg: %g, theta: %g,phi: %g\n",D_cg_above_rwy,Theta*RAD_TO_DEG,Phi*RAD_TO_DEG); */
+          
+          /* First calculate wheel location w.r.t. cg in body (X-Y-Z) axes... */
+          
+          sub3( D_gear_v[i], D_cg_rp_body_v, d_wheel_cg_body_v );
+          
+          /* then converting to local (North-East-Down) axes... */
+          
+          multtrans3x3by3( T_local_to_body_m,  d_wheel_cg_body_v, d_wheel_cg_local_v );
+          
+          
+          /* Runway axes correction - third element is Altitude, not (-)Z... */
+          
+          d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* since altitude = -Z */
+          
+          /* Add wheel offset to cg location in local axes */
+          
+          add3( d_wheel_cg_local_v, D_cg_rwy_local_v, d_wheel_rwy_local_v );
+          
+          /* remove Runway axes correction so right hand rule applies */
+          
+          d_wheel_cg_local_v[2] = -d_wheel_cg_local_v[2]; /* now Z positive down */
+          
+          /*============================*/
+          /* Calculate wheel velocities */
+          /*============================*/
+          
+          /* contribution due to angular rates */
+          
+          cross3( Omega_body_v, d_wheel_cg_body_v, temp3a );
+          
+          /* transform into local axes */
+          
+          multtrans3x3by3( T_local_to_body_m, temp3a,v_wheel_cg_local_v );
+          
+          /* plus contribution due to cg velocities */
+          
+          add3( v_wheel_cg_local_v, V_local_rel_ground_v, v_wheel_local_v );
+          
+          clear3(f_wheel_local_v);
+          reaction_normal_force=0;
+
+          fgSetBool("/gear/gear[0]/wow", false);
+          fgSetBool("/gear/gear[1]/wow", false);
+          fgSetBool("/gear/gear[2]/wow", false);
+          if( HEIGHT_AGL_WHEEL < 0. ) 
+            /*the wheel is underground -- which implies ground contact 
+              so calculate reaction forces */ 
+            {
+              //set the property - weight on wheels
+              //            if (i==0) 
+              //              {
+              //                fgSetBool("/gear/gear[0]/wow", true);
+              //              }
+              //          if (i==1) 
+              //            {
+              //              fgSetBool("/gear/gear[1]/wow", true);
+              //            }
+              //            if (i==2) 
+              //              {
+              //                fgSetBool("/gear/gear[2]/wow", true);
+              //              }
+              
+              /*===========================================*/
+              /* Calculate forces & moments for this wheel */
+              /*===========================================*/
+              
+              /* Add any anticipation, or frame lead/prediction, here... */
+              
+                                    /* no lead used at present */
+              
+              /* Calculate sideward and forward velocities of the wheel 
+                 in the runway plane                                        */
+              
+              cos_wheel_hdg_angle = cos(caster_angle_rad[i] + Psi);
+              sin_wheel_hdg_angle = sin(caster_angle_rad[i] + Psi);
+              
+              v_wheel_forward  = v_wheel_local_v[0]*cos_wheel_hdg_angle
+                + v_wheel_local_v[1]*sin_wheel_hdg_angle;
+              v_wheel_sideward = v_wheel_local_v[1]*cos_wheel_hdg_angle
+                - v_wheel_local_v[0]*sin_wheel_hdg_angle;
+              
+              
+              /* Calculate normal load force (simple spring constant) */
+              
+              reaction_normal_force = 0.;
+              
+              reaction_normal_force = kgear[i]*d_wheel_rwy_local_v[2]
+                - v_wheel_local_v[2]*cgear[i];
+              /* printf("\treaction_normal_force: %g\n",reaction_normal_force); */
+              
+              if (reaction_normal_force > 0.) reaction_normal_force = 0.;
+              /* to prevent damping component from swamping spring component */
+              
+              
+              /* Calculate friction coefficients */
+              
+              if(it_rolls[i])
+                {
+                  forward_mu = (max_brake_mu[i] - muGear[i])*percent_brake[i] + muGear[i];
+                  abs_v_wheel_sideward = sqrt(v_wheel_sideward*v_wheel_sideward);
+                  sideward_mu = sliding_mu[i];
+                  if (abs_v_wheel_sideward < skid_v) 
+                    sideward_mu = (abs_v_wheel_sideward - bkout_v)*beta_mu;
+                  if (abs_v_wheel_sideward < bkout_v) sideward_mu = 0.;
+                }
+              else
+                {
+                  forward_mu=sliding_mu[i];
+                  sideward_mu=sliding_mu[i];
+                }           
+              
+              /* Calculate foreward and sideward reaction forces */
+              
+              forward_wheel_force  =   forward_mu*reaction_normal_force;
+              sideward_wheel_force =  sideward_mu*reaction_normal_force;
+              if(v_wheel_forward < 0.) forward_wheel_force = -forward_wheel_force;
+              if(v_wheel_sideward < 0.) sideward_wheel_force = -sideward_wheel_force;
+              /* printf("\tFfwdgear: %g Fsidegear: %g\n",forward_wheel_force,sideward_wheel_force);
+               */
+              /* Rotate into local (N-E-D) axes */
+              
+              f_wheel_local_v[0] = forward_wheel_force*cos_wheel_hdg_angle
+                - sideward_wheel_force*sin_wheel_hdg_angle;
+              f_wheel_local_v[1] = forward_wheel_force*sin_wheel_hdg_angle
+                + sideward_wheel_force*cos_wheel_hdg_angle;
+              f_wheel_local_v[2] = reaction_normal_force;          
+              
+              /* Convert reaction force from local (N-E-D) axes to body (X-Y-Z) */
+              mult3x3by3( T_local_to_body_m, f_wheel_local_v, tempF );
+              
+              /* Calculate moments from force and offsets in body axes */
+              
+              cross3( d_wheel_cg_body_v, tempF, tempM );
+              
+              /* Sum forces and moments across all wheels */
+              if (tempF[0] != 0.0 || tempF[1] != 0.0 || tempF[2] != 0.0) {
+                fgSetBool("/gear/gear[1]/wow", true);
+              }
+              
+              add3( tempF, F_gear_v, F_gear_v );
+              add3( tempM, M_gear_v, M_gear_v );   
+              
+            }          
+        }
       
       
       
       /* printf("\tN: %g,dZrwy: %g dZdotrwy: %g\n",reaction_normal_force,HEIGHT_AGL_WHEEL,v_wheel_cg_local_v[2]); */
       
       /*printf("\tFxgear: %g Fygear: %g, Fzgear: %g\n",F_X_gear,F_Y_gear,F_Z_gear);
-       printf("\tMgear: %g, Lgear: %g, Ngear: %g\n\n",M_m_gear,M_l_gear,M_n_gear); */
+        printf("\tMgear: %g, Lgear: %g, Ngear: %g\n\n",M_m_gear,M_l_gear,M_n_gear); */
       
       
     }
index 27417480cd50bda6dbac36c11c615b45baa0247c..271cbd3a7c916d52f16fc86b2f5cc777eeea81a6 100644 (file)
@@ -21,7 +21,7 @@ void uiuc_get_flapper(double dt)
   //    if (cycle_incr < 1)
   //      flapper_cycle_pct += cycle_incr;
   //    else  //need because problem when flapper_freq*dt is same as int
-  //   flapper_cycle_pct += cycle_incr - 1;
+  //        flapper_cycle_pct += cycle_incr - 1;
   //  }
   //if (flapper_cycle_pct >= 1)
   //  flapper_cycle_pct -= 1;
index 35628407b85b976b9ec471f43554d8f51382500d..024675d7db7e76054db77fd65e6d7d92ddc8b931 100644 (file)
@@ -21,7 +21,7 @@
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Glen Dimock         <dimock@uiuc.edu>
-              Michael Selig       <m-selig@uiuc.edu>
+                  Michael Selig            <m-selig@uiuc.edu>
 
 ----------------------------------------------------------------------
 
 
 
 /* 
-       UIUC wind gradient test code v0.1
-       
-       Returns wind vector as a function of altitude for a simple
-       parabolic gradient profile
+        UIUC wind gradient test code v0.1
+        
+        Returns wind vector as a function of altitude for a simple
+        parabolic gradient profile
 
-       Glen Dimock
-       Last update: 020227
+        Glen Dimock
+        Last update: 020227
 */
 
 #include "uiuc_getwind.h"
 
 void uiuc_getwind()
 {
-       /* Wind parameters */
-       double zref = 300.; //Reference height (ft)
-       double uref = 0; //Horizontal wind velocity at ref. height (ft/sec)
-       //      double uref = 11; //Horizontal wind velocity at ref. height (ft/sec)
-       //      double uref = 13; //Horizontal wind velocity at ref. height (ft/sec)
-       //      double uref = 20; //Horizontal wind velocity at ref. height (ft/sec), 13.63 mph
-       //      double uref = 22.5; //Horizontal wind velocity at ref. height (ft/sec), 15 mph
-       //      double uref = 60.; //Horizontal wind velocity at ref. height (ft/sec), 40 mph
-       double ordref =-64.; //Horizontal wind ordinal from north (degrees)
-       double zoff = 300.; //Z offset (ft) - wind is zero at and below this point
-       double zcomp = 0.; //Vertical component (down is positive)
-
-/*     double zref = 300.; //Reference height (ft) */
-/*     double uref = 0.; //Horizontal wind velocity at ref. height (ft/sec) */
-/*     double ordref = 0.; //Horizontal wind ordinal from north (degrees) */
-/*     double zoff = 15.; //Z offset (ft) - wind is zero at and below this point */
-/*     double zcomp = 0.; //Vertical component (down is positive) */
-
-
-       /* Get wind vector */
-       double windmag = 0; //Wind magnitude
-       double a = 0; //Parabola: Altitude = a*windmag^2 + zoff
+        /* Wind parameters */
+        double zref = 300.; //Reference height (ft)
+        double uref = 0; //Horizontal wind velocity at ref. height (ft/sec)
+        //        double uref = 11; //Horizontal wind velocity at ref. height (ft/sec)
+        //        double uref = 13; //Horizontal wind velocity at ref. height (ft/sec)
+        //      double uref = 20; //Horizontal wind velocity at ref. height (ft/sec), 13.63 mph
+        //        double uref = 22.5; //Horizontal wind velocity at ref. height (ft/sec), 15 mph
+        //        double uref = 60.; //Horizontal wind velocity at ref. height (ft/sec), 40 mph
+        double ordref =-64.; //Horizontal wind ordinal from north (degrees)
+        double zoff = 300.; //Z offset (ft) - wind is zero at and below this point
+        double zcomp = 0.; //Vertical component (down is positive)
+
+/*          double zref = 300.; //Reference height (ft) */
+/*          double uref = 0.; //Horizontal wind velocity at ref. height (ft/sec) */
+/*          double ordref = 0.; //Horizontal wind ordinal from north (degrees) */
+/*          double zoff = 15.; //Z offset (ft) - wind is zero at and below this point */
+/*          double zcomp = 0.; //Vertical component (down is positive) */
+
+
+        /* Get wind vector */
+        double windmag = 0; //Wind magnitude
+        double a = 0; //Parabola: Altitude = a*windmag^2 + zoff
         double x = pow(uref,2.);
-       
+        
         if (x) {
-           a = zref/x;
+            a = zref/x;
         }
-       if ((Altitude >= zoff) && (a > 0))
-               windmag = sqrt(Altitude/a);
-       else
-               windmag = 0.;
+        if ((Altitude >= zoff) && (a > 0))
+                windmag = sqrt(Altitude/a);
+        else
+                windmag = 0.;
 
-       V_north_airmass = windmag * cos(ordref*3.14159/180.); //North component
-       V_east_airmass  = windmag * sin(ordref*3.14159/180.); //East component
-       V_down_airmass  = zcomp;
+        V_north_airmass = windmag * cos(ordref*3.14159/180.); //North component
+        V_east_airmass  = windmag * sin(ordref*3.14159/180.); //East component
+        V_down_airmass  = zcomp;
 
-       return;
+        return;
 }
 
index d66f562f91a5f5784748256658544f194eb41423..62fcffc1c9cbe3e683cf7db2006046eedc874a5f 100644 (file)
@@ -56,8 +56,8 @@
 // (RD) changed float to double
 
 void hh_ap(double phi, double yaw, double phirate, double yaw_ref, 
-          double V, double sample_time, double b, double yawrate,
-          double ctr_defl[2], int init)
+           double V, double sample_time, double b, double yawrate,
+           double ctr_defl[2], int init)
 {
 
   static double u2prev;
@@ -79,47 +79,47 @@ void hh_ap(double phi, double yaw, double phirate, double yaw_ref,
       x6prev = 0;
     }
 
-       double Kphi, Kyaw;
-       double Kr;
-       double Ki;
-       double drr;
-       double dar;
-       double deltar;
-       double deltaa;
-       double x1, x2, x3, x4, x5, x6, phi_ref;
-       Kphi = 0.000975*V*V - 0.108*V + 2.335625;
-       Kr = -4;
-       Ki = 0.25;
-       Kyaw = 0.05*V-1.1;
-       dar = 0.165;
-       drr = -0.000075*V*V + 0.0095*V -0.4606;
-       double u1,u2,u3,u4,u5,u6,u7,ubar,udbar;
-       phi_ref = Kyaw*(yaw_ref-yaw);
-       u1 = Kphi*(phi_ref-phi);
-       u2 = u2prev + Ki*Kphi*(phi_ref-phi)*sample_time;
-       u3 = dar*yawrate;
-       u4 = u1 + u2 + u3;
-       u2prev = u2;
-       double K1,K2;
-       K1 = Kr*9.8*sin(phi)/V;
-       K2 = drr - Kr;
-       u5 = K2*yawrate;
-       u6 = K1*phi;
-       u7 = u5 + u6; 
-       ubar = phirate*b/(2*V);
-       udbar = yawrate*b/(2*V);
+        double Kphi, Kyaw;
+        double Kr;
+        double Ki;
+        double drr;
+        double dar;
+        double deltar;
+        double deltaa;
+        double x1, x2, x3, x4, x5, x6, phi_ref;
+        Kphi = 0.000975*V*V - 0.108*V + 2.335625;
+        Kr = -4;
+        Ki = 0.25;
+        Kyaw = 0.05*V-1.1;
+        dar = 0.165;
+        drr = -0.000075*V*V + 0.0095*V -0.4606;
+        double u1,u2,u3,u4,u5,u6,u7,ubar,udbar;
+        phi_ref = Kyaw*(yaw_ref-yaw);
+        u1 = Kphi*(phi_ref-phi);
+        u2 = u2prev + Ki*Kphi*(phi_ref-phi)*sample_time;
+        u3 = dar*yawrate;
+        u4 = u1 + u2 + u3;
+        u2prev = u2;
+        double K1,K2;
+        K1 = Kr*9.8*sin(phi)/V;
+        K2 = drr - Kr;
+        u5 = K2*yawrate;
+        u6 = K1*phi;
+        u7 = u5 + u6; 
+        ubar = phirate*b/(2*V);
+        udbar = yawrate*b/(2*V);
 // the following is using the actuator dynamics to get the aileron 
 // angle, given in Beaver.
 // the actuator dynamics for Twin Otter are still unavailable.
-       x1 = x1prev +(-10.6*x1prev - 2.64*x2prev -7.58*x3prev +
+        x1 = x1prev +(-10.6*x1prev - 2.64*x2prev -7.58*x3prev +
 27.46*u4 -0.0008*ubar)*sample_time;
-       x2 = x2prev + x3prev*sample_time;
-       x3 = x3prev + (1.09*x1prev - 558.86*x2prev - 23.35*x3prev +
+        x2 = x2prev + x3prev*sample_time;
+        x3 = x3prev + (1.09*x1prev - 558.86*x2prev - 23.35*x3prev +
 3.02*u4 - 0.164*ubar)*sample_time;
-       deltaa = 57.3*x2;
-       x1prev = x1;
-       x2prev = x2;
-       x3prev = x3;
+        deltaa = 57.3*x2;
+        x1prev = x1;
+        x2prev = x2;
+        x3prev = x3;
 
 // the following is using the actuator dynamics to get the rudder
 // angle, given in Beaver.
@@ -134,6 +134,6 @@ void hh_ap(double phi, double yaw, double phirate, double yaw_ref,
         x5prev = x5;
         x6prev = x6;
         ctr_defl[0] = deltaa;
-       ctr_defl[1] = deltar;
+        ctr_defl[1] = deltar;
 return;
 } 
index e1bc521e40ae22b77c961b3ddd47f24a12e1b5eb..51a46652cf8c7ed68ad69d65dc6701b0ecbd7e7b 100644 (file)
@@ -6,7 +6,7 @@
 #include <cmath>
 
 void hh_ap(double phi, double yaw, double phirate, double yaw_ref, 
-          double V, double sample_time, double b, double yawrate,
-          double ctr_defl[2], int init);
+           double V, double sample_time, double b, double yawrate,
+           double ctr_defl[2], int init);
 
 #endif //_HH_AP_H_
index 148ff35ba84cea0fe5d5cd6ba4972a5f6d47d127..149e214c3c3bc6cbd95c636a33964cba142d0463 100644 (file)
 
  CALLED BY:    uiuc_coefficients
                uiuc_coef_drag
-              uiuc_coef_lift
-              uiuc_coef_pitch
-              uiuc_coef_sideforce
-              uiuc_coef_roll
-              uiuc_coef_yaw
+               uiuc_coef_lift
+               uiuc_coef_pitch
+               uiuc_coef_sideforce
+               uiuc_coef_roll
+               uiuc_coef_yaw
 
 ----------------------------------------------------------------------
 
@@ -96,14 +96,14 @@ void uiuc_ice_eta()
 
       // slowly increase icing severity over period of transientTime
       if (Simtime < (iceTime + transientTime))
-       {
-         slope = eta_ice_final / transientTime;
-         eta_ice = slope * (Simtime - iceTime);
-       }
+        {
+          slope = eta_ice_final / transientTime;
+          eta_ice = slope * (Simtime - iceTime);
+        }
       else
-       {
-         eta_ice = eta_ice_final;
-       }
+        {
+          eta_ice = eta_ice_final;
+        }
     }
   return;
 }
index 00b38e9d4c3d5d7da03d64467697873a24dc0cd9..dc8f4a885d238b1e80c13a00816df6c0196d5687 100644 (file)
@@ -22,7 +22,7 @@
 ----------------------------------------------------------------------
 
  AUTHOR(S):    Robert Deters       <rdeters@uiuc.edu>
-              Ann Peedikayil      <peedikay@uiuc.edu>
+                  Ann Peedikayil           <peedikay@uiuc.edu>
 
 ----------------------------------------------------------------------
 
@@ -33,7 +33,7 @@
  INPUTS:       -Simtime
                -icing times
                -dt
-              -bootTime 
+               -bootTime 
               
 ----------------------------------------------------------------------
 
 
 void uiuc_iceboot(double dt)
 { 
-           
+                
   if (bootTrue[bootindex])
     {
       if (bootTime[bootindex]- dt <Simtime && bootTime[bootindex]+ dt >Simtime)
       // checks if the boot is on
        { 
-         eta_ice = 0;        
-        // drops the eta ice to zero
-          
-        if (bootTime [bootindex] > iceTime)
-          iceTime = bootTime[bootindex];
-        bootindex++;
+         eta_ice = 0;              
+         // drops the eta ice to zero
+           
+         if (bootTime [bootindex] > iceTime)
+           iceTime = bootTime[bootindex];
+         bootindex++;
        }
     }
 }
index 30ac008fa5637fb57fc9a96fe5579e1548abf82d..92c73ff24970e1851f3f76ac4b470bc20dfecda8 100644 (file)
@@ -8,99 +8,99 @@
 #include "uiuc_iced_nonlin.h"
 
 void Calc_Iced_Forces()
-       {
-       // alpha in deg
-         double alpha;
-         double de;
-       double eta_ref_wing = 0.08;                      // eta of iced data used for curve fit
-       double eta_ref_tail = 0.20; //changed from 0.12 10-23-2002
-       double eta_wing;
-       double e;
-       //double delta_CL;                              // CL_clean - CL_iced;
-       //double delta_CD;                              // CD_clean - CD_iced;
-       //double delta_Cm;                              // CM_clean - CM_iced;
-       double delta_Cm_a;                              // (Cm_clean - Cm_iced) as a function of AoA;
-       double delta_Cm_de;                             // (Cm_clean - Cm_iced) as a function of de;
-       double delta_Ch_a;
-       double delta_Ch_e;
-       double KCL;
-       double KCD;
-       double KCm_alpha;
-       double KCm_de;
-       double KCh;
-       double CL_diff;
-       double CD_diff;
-       
-       
-       
-       alpha = Std_Alpha*RAD_TO_DEG;
-       de = elevator*RAD_TO_DEG;
-       // lift fits
-       if (alpha < 16)
-               {
-               delta_CL = (0.088449 + 0.004836*alpha - 0.0005459*alpha*alpha +
-                           4.0859e-5*pow(alpha,3));
-               }
-       else
-               {
-               delta_CL = (-11.838 + 1.6861*alpha - 0.076707*alpha*alpha +
-                                       0.001142*pow(alpha,3));
-               }
-       KCL = -delta_CL/eta_ref_wing;
-       eta_wing = 0.5*(eta_wing_left + eta_wing_right);
-       if (eta_wing <= 0.1)
-         {
-           e = eta_wing;
-         }
-       else
-         {
-           e = -0.3297*exp(-5*eta_wing)+0.3;
-         }
-       delta_CL = e*KCL;
-       
-               
-       // drag fit
-       delta_CD = (-0.0089 + 0.001578*alpha - 0.00046253*pow(alpha,2) +
-                   -4.7511e-5*pow(alpha,3) + 2.3384e-6*pow(alpha,4));
-       KCD = -delta_CD/eta_ref_wing;
-       delta_CD = eta_wing*KCD;
-       
-       // pitching moment fit
-       delta_Cm_a = (-0.01892 - 0.0056476*alpha + 1.0205e-5*pow(alpha,2)
-                     - 4.0692e-5*pow(alpha,3) + 1.7594e-6*pow(alpha,4));
-                                       
-       delta_Cm_de = (-0.014928 - 0.0037783*alpha + 0.00039086*pow(de,2)
-                      - 1.1304e-5*pow(de,3) - 1.8439e-6*pow(de,4));
-                                       
-       delta_Cm = delta_Cm_a + delta_Cm_de;
-       KCm_alpha = delta_Cm_a/eta_ref_wing;
-       KCm_de = delta_Cm_de/eta_ref_tail;
-       delta_Cm = (0.75*eta_wing + 0.25*eta_tail)*KCm_alpha + (eta_tail)*KCm_de;
-       
-       // hinge moment
-       if (alpha < 13)
-         {
-           delta_Ch_a = (-0.0012862 - 0.00022705*alpha + 1.5911e-5*pow(alpha,2)
-                         + 5.4536e-7*pow(alpha,3));
-         }
-       else
-         {
-           delta_Ch_a = 0;
-         }
-       delta_Ch_e = -0.0011851 - 0.00049924*de;
-       delta_Ch = -(delta_Ch_a + delta_Ch_e);
-       KCh = -delta_Ch/eta_ref_tail;
-       delta_Ch = eta_tail*KCh;
-       
-       // rolling moment
-       CL_diff = (eta_wing_left - eta_wing_right)*KCL;
-       delta_Cl = CL_diff/8.; // 10-23-02 Previously 4
+        {
+        // alpha in deg
+          double alpha;
+          double de;
+        double eta_ref_wing = 0.08;                         // eta of iced data used for curve fit
+        double eta_ref_tail = 0.20; //changed from 0.12 10-23-2002
+        double eta_wing;
+        double e;
+        //double delta_CL;                                // CL_clean - CL_iced;
+        //double delta_CD;                                // CD_clean - CD_iced;
+        //double delta_Cm;                                // CM_clean - CM_iced;
+        double delta_Cm_a;                                // (Cm_clean - Cm_iced) as a function of AoA;
+        double delta_Cm_de;                                // (Cm_clean - Cm_iced) as a function of de;
+        double delta_Ch_a;
+        double delta_Ch_e;
+        double KCL;
+        double KCD;
+        double KCm_alpha;
+        double KCm_de;
+        double KCh;
+        double CL_diff;
+        double CD_diff;
+        
+        
+        
+        alpha = Std_Alpha*RAD_TO_DEG;
+        de = elevator*RAD_TO_DEG;
+        // lift fits
+        if (alpha < 16)
+                {
+                delta_CL = (0.088449 + 0.004836*alpha - 0.0005459*alpha*alpha +
+                            4.0859e-5*pow(alpha,3));
+                }
+        else
+                {
+                delta_CL = (-11.838 + 1.6861*alpha - 0.076707*alpha*alpha +
+                                        0.001142*pow(alpha,3));
+                }
+        KCL = -delta_CL/eta_ref_wing;
+        eta_wing = 0.5*(eta_wing_left + eta_wing_right);
+        if (eta_wing <= 0.1)
+          {
+            e = eta_wing;
+          }
+        else
+          {
+            e = -0.3297*exp(-5*eta_wing)+0.3;
+          }
+        delta_CL = e*KCL;
+        
+                
+        // drag fit
+        delta_CD = (-0.0089 + 0.001578*alpha - 0.00046253*pow(alpha,2) +
+                    -4.7511e-5*pow(alpha,3) + 2.3384e-6*pow(alpha,4));
+        KCD = -delta_CD/eta_ref_wing;
+        delta_CD = eta_wing*KCD;
+        
+        // pitching moment fit
+        delta_Cm_a = (-0.01892 - 0.0056476*alpha + 1.0205e-5*pow(alpha,2)
+                      - 4.0692e-5*pow(alpha,3) + 1.7594e-6*pow(alpha,4));
+                                        
+        delta_Cm_de = (-0.014928 - 0.0037783*alpha + 0.00039086*pow(de,2)
+                       - 1.1304e-5*pow(de,3) - 1.8439e-6*pow(de,4));
+                                        
+        delta_Cm = delta_Cm_a + delta_Cm_de;
+        KCm_alpha = delta_Cm_a/eta_ref_wing;
+        KCm_de = delta_Cm_de/eta_ref_tail;
+        delta_Cm = (0.75*eta_wing + 0.25*eta_tail)*KCm_alpha + (eta_tail)*KCm_de;
+        
+        // hinge moment
+        if (alpha < 13)
+          {
+            delta_Ch_a = (-0.0012862 - 0.00022705*alpha + 1.5911e-5*pow(alpha,2)
+                          + 5.4536e-7*pow(alpha,3));
+          }
+        else
+          {
+            delta_Ch_a = 0;
+          }
+        delta_Ch_e = -0.0011851 - 0.00049924*de;
+        delta_Ch = -(delta_Ch_a + delta_Ch_e);
+        KCh = -delta_Ch/eta_ref_tail;
+        delta_Ch = eta_tail*KCh;
+        
+        // rolling moment
+        CL_diff = (eta_wing_left - eta_wing_right)*KCL;
+        delta_Cl = CL_diff/8.; // 10-23-02 Previously 4
 
-       //yawing moment
-       CD_diff = (eta_wing_left - eta_wing_right)*KCD;
-       delta_Cn = CD_diff/8.;
-       
-       }
+        //yawing moment
+        CD_diff = (eta_wing_left - eta_wing_right)*KCD;
+        delta_Cn = CD_diff/8.;
+        
+        }
 
 void add_ice_effects()
 {
index dc322c4880bb367da495c156a42fa3798c1b5e85..4230823b060c93b7065d2688b8adb8c6abbd1b88 100644 (file)
@@ -70,169 +70,169 @@ void uiuc_icing_demo()
   if (demo_eps_alpha_max) {
     double time = Simtime - demo_eps_alpha_max_startTime;
     eps_alpha_max = uiuc_1Dinterpolation(demo_eps_alpha_max_timeArray,
-                                        demo_eps_alpha_max_daArray,
-                                        demo_eps_alpha_max_ntime,
-                                        time);
+                                         demo_eps_alpha_max_daArray,
+                                         demo_eps_alpha_max_ntime,
+                                         time);
   }
   if (demo_eps_pitch_max) {
     double time = Simtime - demo_eps_pitch_max_startTime;
     eps_pitch_max = uiuc_1Dinterpolation(demo_eps_pitch_max_timeArray,
-                                        demo_eps_pitch_max_daArray,
-                                        demo_eps_pitch_max_ntime,
-                                        time);
+                                         demo_eps_pitch_max_daArray,
+                                         demo_eps_pitch_max_ntime,
+                                         time);
   }
   if (demo_eps_pitch_min) {
     double time = Simtime - demo_eps_pitch_min_startTime;
     eps_pitch_min = uiuc_1Dinterpolation(demo_eps_pitch_min_timeArray,
-                                        demo_eps_pitch_min_daArray,
-                                        demo_eps_pitch_min_ntime,
-                                        time);
+                                         demo_eps_pitch_min_daArray,
+                                         demo_eps_pitch_min_ntime,
+                                         time);
   }
   if (demo_eps_roll_max) {
     double time = Simtime - demo_eps_roll_max_startTime;
     eps_roll_max = uiuc_1Dinterpolation(demo_eps_roll_max_timeArray,
-                                       demo_eps_roll_max_daArray,
-                                       demo_eps_roll_max_ntime,
-                                       time);
+                                        demo_eps_roll_max_daArray,
+                                        demo_eps_roll_max_ntime,
+                                        time);
   }
   if (demo_eps_thrust_min) {
     double time = Simtime - demo_eps_thrust_min_startTime;
     eps_thrust_min = uiuc_1Dinterpolation(demo_eps_thrust_min_timeArray,
-                                         demo_eps_thrust_min_daArray,
-                                         demo_eps_thrust_min_ntime,
-                                         time);
+                                          demo_eps_thrust_min_daArray,
+                                          demo_eps_thrust_min_ntime,
+                                          time);
   }
   if (demo_eps_airspeed_max) {
     double time = Simtime - demo_eps_airspeed_max_startTime;
     eps_airspeed_max = uiuc_1Dinterpolation(demo_eps_airspeed_max_timeArray,
-                                           demo_eps_airspeed_max_daArray,
-                                           demo_eps_airspeed_max_ntime,
-                                           time);
+                                            demo_eps_airspeed_max_daArray,
+                                            demo_eps_airspeed_max_ntime,
+                                            time);
   }
   if (demo_eps_airspeed_min) {
     double time = Simtime - demo_eps_airspeed_min_startTime;
     eps_airspeed_min = uiuc_1Dinterpolation(demo_eps_airspeed_min_timeArray,
-                                           demo_eps_airspeed_min_daArray,
-                                           demo_eps_airspeed_min_ntime,
-                                           time);
+                                            demo_eps_airspeed_min_daArray,
+                                            demo_eps_airspeed_min_ntime,
+                                            time);
   }
   if (demo_eps_flap_max) {
     double time = Simtime - demo_eps_flap_max_startTime;
     eps_flap_max = uiuc_1Dinterpolation(demo_eps_flap_max_timeArray,
-                                       demo_eps_flap_max_daArray,
-                                       demo_eps_flap_max_ntime,
-                                       time);
+                                        demo_eps_flap_max_daArray,
+                                        demo_eps_flap_max_ntime,
+                                        time);
   }
   if (demo_eps_pitch_input) {
     double time = Simtime - demo_eps_pitch_input_startTime;
     eps_pitch_input = uiuc_1Dinterpolation(demo_eps_pitch_input_timeArray,
-                                          demo_eps_pitch_input_daArray,
-                                          demo_eps_pitch_input_ntime,
-                                          time);
+                                           demo_eps_pitch_input_daArray,
+                                           demo_eps_pitch_input_ntime,
+                                           time);
   }
 
   // Boot cycle values
   if (demo_boot_cycle_tail) {
     double time = Simtime - demo_boot_cycle_tail_startTime;
     boot_cycle_tail = uiuc_1Dinterpolation(demo_boot_cycle_tail_timeArray,
-                                          demo_boot_cycle_tail_daArray,
-                                          demo_boot_cycle_tail_ntime,
-                                          time);
+                                           demo_boot_cycle_tail_daArray,
+                                           demo_boot_cycle_tail_ntime,
+                                           time);
   }
   if (demo_boot_cycle_wing_left) {
     double time = Simtime - demo_boot_cycle_wing_left_startTime;
     boot_cycle_wing_left = uiuc_1Dinterpolation(demo_boot_cycle_wing_left_timeArray,
-                                               demo_boot_cycle_wing_left_daArray,
-                                               demo_boot_cycle_wing_left_ntime,
-                                               time);
+                                                demo_boot_cycle_wing_left_daArray,
+                                                demo_boot_cycle_wing_left_ntime,
+                                                time);
   }
   if (demo_boot_cycle_wing_right) {
     double time = Simtime - demo_boot_cycle_wing_right_startTime;
     boot_cycle_wing_right = uiuc_1Dinterpolation(demo_boot_cycle_wing_right_timeArray,
-                                                demo_boot_cycle_wing_right_daArray,
-                                                demo_boot_cycle_wing_right_ntime,
-                                                time);
+                                                 demo_boot_cycle_wing_right_daArray,
+                                                 demo_boot_cycle_wing_right_ntime,
+                                                 time);
   }
 
   // Ice values
   if (demo_ice_tail) {
     double time = Simtime - demo_ice_tail_startTime;
     ice_tail = uiuc_1Dinterpolation(demo_ice_tail_timeArray,
-                                   demo_ice_tail_daArray,
-                                   demo_ice_tail_ntime,
-                                   time);
+                                    demo_ice_tail_daArray,
+                                    demo_ice_tail_ntime,
+                                    time);
   }
   if (demo_ice_left) {
     double time = Simtime - demo_ice_left_startTime;
     ice_left = uiuc_1Dinterpolation(demo_ice_left_timeArray,
-                                   demo_ice_left_daArray,
-                                   demo_ice_left_ntime,
-                                   time);
+                                    demo_ice_left_daArray,
+                                    demo_ice_left_ntime,
+                                    time);
   }
   if (demo_ice_right) {
     double time = Simtime - demo_ice_right_startTime;
     ice_right = uiuc_1Dinterpolation(demo_ice_right_timeArray,
-                                    demo_ice_right_daArray,
-                                    demo_ice_right_ntime,
-                                    time);
+                                     demo_ice_right_daArray,
+                                     demo_ice_right_ntime,
+                                     time);
   }
 
   // Autopilot
   if (demo_ap_pah_on){
     double time = Simtime - demo_ap_pah_on_startTime;
     ap_pah_on = uiuc_1Dinterpolation(demo_ap_pah_on_timeArray,
-                                    demo_ap_pah_on_daArray,
-                                    demo_ap_pah_on_ntime,
-                                    time);
+                                     demo_ap_pah_on_daArray,
+                                     demo_ap_pah_on_ntime,
+                                     time);
   }
   if (demo_ap_alh_on){
     double time = Simtime - demo_ap_alh_on_startTime;
     ap_alh_on = uiuc_1Dinterpolation(demo_ap_alh_on_timeArray,
-                                    demo_ap_alh_on_daArray,
-                                    demo_ap_alh_on_ntime,
-                                    time);
+                                     demo_ap_alh_on_daArray,
+                                     demo_ap_alh_on_ntime,
+                                     time);
   }
   if (demo_ap_rah_on){
     double time = Simtime - demo_ap_rah_on_startTime;
     ap_rah_on = uiuc_1Dinterpolation(demo_ap_rah_on_timeArray,
-                                    demo_ap_rah_on_daArray,
-                                    demo_ap_rah_on_ntime,
-                                    time);
+                                     demo_ap_rah_on_daArray,
+                                     demo_ap_rah_on_ntime,
+                                     time);
   }
   if (demo_ap_hh_on){
     double time = Simtime - demo_ap_hh_on_startTime;
     ap_hh_on = uiuc_1Dinterpolation(demo_ap_hh_on_timeArray,
-                                   demo_ap_hh_on_daArray,
-                                   demo_ap_hh_on_ntime,
-                                   time);
+                                    demo_ap_hh_on_daArray,
+                                    demo_ap_hh_on_ntime,
+                                    time);
   }
   if (demo_ap_Theta_ref){
     double time = Simtime - demo_ap_Theta_ref_startTime;
     ap_Theta_ref_rad = uiuc_1Dinterpolation(demo_ap_Theta_ref_timeArray,
-                                           demo_ap_Theta_ref_daArray,
-                                           demo_ap_Theta_ref_ntime,
-                                           time);
+                                            demo_ap_Theta_ref_daArray,
+                                            demo_ap_Theta_ref_ntime,
+                                            time);
   }
   if (demo_ap_alt_ref){
     double time = Simtime - demo_ap_alt_ref_startTime;
     ap_alt_ref_ft = uiuc_1Dinterpolation(demo_ap_alt_ref_timeArray,
-                                           demo_ap_alt_ref_daArray,
-                                           demo_ap_alt_ref_ntime,
-                                           time);
+                                            demo_ap_alt_ref_daArray,
+                                            demo_ap_alt_ref_ntime,
+                                            time);
   }
   if (demo_ap_Phi_ref){
     double time = Simtime - demo_ap_Phi_ref_startTime;
     ap_Phi_ref_rad = uiuc_1Dinterpolation(demo_ap_Phi_ref_timeArray,
-                                           demo_ap_Phi_ref_daArray,
-                                           demo_ap_Phi_ref_ntime,
-                                           time);
+                                            demo_ap_Phi_ref_daArray,
+                                            demo_ap_Phi_ref_ntime,
+                                            time);
   }
   if (demo_ap_Psi_ref){
     double time = Simtime - demo_ap_Psi_ref_startTime;
     ap_Psi_ref_rad = uiuc_1Dinterpolation(demo_ap_Psi_ref_timeArray,
-                                           demo_ap_Psi_ref_daArray,
-                                           demo_ap_Psi_ref_ntime,
-                                           time);
+                                            demo_ap_Psi_ref_daArray,
+                                            demo_ap_Psi_ref_ntime,
+                                            time);
   }
 
   return;
index be4af9f53f4c60a85f7535cf0445648d0ed392be..e77fab4c868c2bf766413874061cd8d4ea35ab01 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CXfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CXfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (CXfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CXfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
  
index 45da4a272791165607a4008a5a65775dc14edbae..33bf1747406367eee2fa391466e34917d2cfc1c3 100644 (file)
  HISTORY:      04/08/2000   initial release
                06/18/2001   Added CZfa
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CZfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CZfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (CZfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CZfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index da2f9592c7a6786c6ab30b95b519ead05f3eb5fb..3ac5a8d1488964059329c4ef6e40b14a7b995d7c 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CYfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CYfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (CYfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CYfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index 8f8253419a85b8c63aede64d85bf6b808cbee748..56599ab562ef2fd93eae827aa372ce49d7c3b60b 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cmfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (Cmfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (Cmfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (Cmfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
  
index 5c76df8af6bdedcd40f79df7631f8f5df2f5bb39..db737693f837cbecb6b3dfe85411d9310e161ef3 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cnfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CXfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (Cnfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CXfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
  
index 7ee47046b7d46200c62a432e4964648493558480..5efb2fbb504742092bd9777c02f7d6935bf884a1 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Clfxxf0)
-              11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CXfxxf).  Zero flap vairables removed.
+                            linear Twin Otter model at zero flaps
+                            (Clfxxf0)
+               11/12/2001   (RD) Added new variables needed for the non-
+                            linear Twin Otter model with flaps
+                            (CXfxxf).  Zero flap vairables removed.
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
  
index 27b178e2d6853568764bd605c0eaa1cac3fc9f5a..b3a665716ec010d04a199edcc2378a96469d185b 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                06/18/2001   (RD) Added aileron_input, rudder_input,
-                           pilot_elev_no, pilot_ail_no, and 
-                           pilot_rud_no
-              11/12/2001   (RD) Added flap_max, flap_rate
+                            pilot_elev_no, pilot_ail_no, and 
+                            pilot_rud_no
+               11/12/2001   (RD) Added flap_max, flap_rate
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         http://www.jeffscott.net/
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index 27b5136b22eedb192c078eedd0776ac55001fe72..f4d35c3749e9e14cfe867b5be82384a57b7c6d63 100644 (file)
@@ -24,7 +24,7 @@
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index be9d8ecd4bcd801b50ab10337e89d281d3a938ad..fa71664fdd21156374ecd8c2fadf4d6da106b078 100644 (file)
@@ -67,8 +67,8 @@
 
 void uiuc_map_fog()
 {
-  fog_map["fog_segments"]      =       fog_segments_flag       ;
-  fog_map["fog_point"]         =       fog_point_flag          ;
+  fog_map["fog_segments"]        =        fog_segments_flag        ;
+  fog_map["fog_point"]                =        fog_point_flag                ;
   
 }
 
index e59971e05c21fd762e44a97f56453263a872f3f8..8ed5ec953455908c8359f256767dd0f266007ac6 100644 (file)
  
  HISTORY:      04/08/2000   initial release
                06/18/2001   (RD) Added Alpha, Beta, U_body
-                           V_body, and W_body.
+                            V_body, and W_body.
                08/20/2003   (RD) Removed old_flap_routine
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index 1148dae51e4af3e52545907585e39cad2d4e25f5..6ab77337ffbfd220bf5ff11aeca66b7fad760e7a 100644 (file)
@@ -82,7 +82,7 @@ void uiuc_map_keyword()
   Keyword_map["ice"]              =      ice_flag                   ;
   Keyword_map["record"]           =      record_flag                ;
   Keyword_map["misc"]             =      misc_flag                  ;
-  Keyword_map["fog"]             =      fog_flag                   ;
+  Keyword_map["fog"]                  =         fog_flag                    ;
 }
 
 // end uiuc_map_keyword.cpp
index 7ef38c437f4c3cf7236b673a6c14d5d6f2ccbd2f..2cf43b4d481fbdfd92172d17ef094d0ed6ec6823 100644 (file)
@@ -27,7 +27,7 @@
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
  
 ----------------------------------------------------------------------
  
index c1e12480304679e1d2067be5dd7443b62936ba1c..afd0b22ccaba98e4653f70861c8ad92ef9371371 100644 (file)
  
  HISTORY:      06/03/2000   file creation
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cxfxxf0I)
+                            linear Twin Otter model at zero flaps
+                            (Cxfxxf0I)
                11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (CxfxxfI).  Removed zero flap vairables
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
+                            linear Twin Otter model with flaps
+                            (CxfxxfI).  Removed zero flap vairables
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
 
 ----------------------------------------------------------------------
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         <jscott@mail.com>
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
 
 ----------------------------------------------------------------------
  
index 06f9dea493fd9314f0d9d20c1cb57d08460d64d3..9315d65dc320d92a7bc3479b7adbc4f4d1706f94 100644 (file)
                             maps; added zero_Long_trim to 
                             controlSurface map
                03/09/2001   (DPM) added support for gear.
-              06/18/2001   (RD) Added Alpha, Beta, U_body,
-                           V_body, and W_body to init map.  Added 
-                           aileron_input, rudder_input, pilot_elev_no,
-                           pilot_ail_no, and pilot_rud_no to
-                           controlSurface map.  Added Throttle_pct_input
-                           to engine map.  Added CZfa to CL map.
-              07/05/2001   (RD) Changed pilot_elev_no = true to pilot_
-                           elev_no_check=false.  This is to allow pilot
-                           to fly aircraft after input files have been
-                           used.
-              08/27/2001   (RD) Added xxx_init_true and xxx_init for
-                           P_body, Q_body, R_body, Phi, Theta, Psi,
-                           U_body, V_body, and W_body to help in
-                           starting the A/C at an initial condition.
+               06/18/2001   (RD) Added Alpha, Beta, U_body,
+                            V_body, and W_body to init map.  Added 
+                            aileron_input, rudder_input, pilot_elev_no,
+                            pilot_ail_no, and pilot_rud_no to
+                            controlSurface map.  Added Throttle_pct_input
+                            to engine map.  Added CZfa to CL map.
+               07/05/2001   (RD) Changed pilot_elev_no = true to pilot_
+                            elev_no_check=false.  This is to allow pilot
+                            to fly aircraft after input files have been
+                            used.
+                08/27/2001   (RD) Added xxx_init_true and xxx_init for
+                            P_body, Q_body, R_body, Phi, Theta, Psi,
+                            U_body, V_body, and W_body to help in
+                            starting the A/C at an initial condition.
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cxfxxf0)
+                            linear Twin Otter model at zero flaps
+                            (Cxfxxf0)
                11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model with flaps
-                           (Cxfxxf).  Removed zero flap variables.
-                           Added minmaxfind() which is needed for non-
-                           linear variables
-              01/11/2002   (AP) Added keywords for bootTime
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
-              02/18/2002   (RD) Added variables necessary to use the
-                           uiuc_3Dinterp_quick() function.  Takes
-                           advantage of data in a "nice" form (data
-                           that are in a rectangular matrix).
-              03/13/2002   (RD) Added aircraft_directory so full path
-                           is no longer needed in the aircraft.dat file
-              04/02/2002   (RD) Removed minmaxfind() since it was no
-                           longer needed.  Added d_2_to_3(),
-                           d_1_to_2(), and i_1_to_2() so uiuc_menu()
-                           will compile with certain compilers.
-              08/29/2002   (RD) Separated each primary keyword into its
-                           own function to speed up compile time
+                            linear Twin Otter model with flaps
+                            (Cxfxxf).  Removed zero flap variables.
+                            Added minmaxfind() which is needed for non-
+                            linear variables
+               01/11/2002   (AP) Added keywords for bootTime
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
+               02/18/2002   (RD) Added variables necessary to use the
+                            uiuc_3Dinterp_quick() function.  Takes
+                            advantage of data in a "nice" form (data
+                            that are in a rectangular matrix).
+               03/13/2002   (RD) Added aircraft_directory so full path
+                            is no longer needed in the aircraft.dat file
+               04/02/2002   (RD) Removed minmaxfind() since it was no
+                            longer needed.  Added d_2_to_3(),
+                            d_1_to_2(), and i_1_to_2() so uiuc_menu()
+                            will compile with certain compilers.
+               08/29/2002   (RD) Separated each primary keyword into its
+                            own function to speed up compile time
                08/29/2002   (RD w/ help from CO) Made changes to shorten
                             compile time.  [] RD to add more comments here.
                08/29/2003   (MSS) Adding new keywords for new engine model
 
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Jeff Scott         http://www.jeffscott.net/
-              Robert Deters      <rdeters@uiuc.edu>
+               Robert Deters      <rdeters@uiuc.edu>
                Michael Selig      <m-selig@uiuc.edu>
                David Megginson    <david@megginson.com>
-              Ann Peedikayil     <peedikay@uiuc.edu>
+               Ann Peedikayil     <peedikay@uiuc.edu>
 ----------------------------------------------------------------------
 
  VARIABLES:
@@ -236,31 +236,31 @@ void uiuc_menu( string aircraft_name )
       linetoken1 = airplane -> getToken (*command_line, 1); 
       linetoken2 = airplane -> getToken (*command_line, 2); 
       if (linetoken2=="")
-       linetoken2="0";
+        linetoken2="0";
       linetoken3 = airplane -> getToken (*command_line, 3); 
       if (linetoken3=="")
-       linetoken3="0";
+        linetoken3="0";
       linetoken4 = airplane -> getToken (*command_line, 4); 
       if (linetoken4=="")
-       linetoken4="0";
+        linetoken4="0";
       linetoken5 = airplane -> getToken (*command_line, 5); 
       if (linetoken5=="")
-       linetoken5="0";
+        linetoken5="0";
       linetoken6 = airplane -> getToken (*command_line, 6); 
       if (linetoken6=="")
-       linetoken6="0";
+        linetoken6="0";
       linetoken7 = airplane -> getToken (*command_line, 7);
       if (linetoken7=="")
-       linetoken7="0";
+        linetoken7="0";
       linetoken8 = airplane -> getToken (*command_line, 8);
       if (linetoken8=="")
-       linetoken8="0";
+        linetoken8="0";
       linetoken9 = airplane -> getToken (*command_line, 9);
       if (linetoken9=="")
-       linetoken9="0";
+        linetoken9="0";
       linetoken10 = airplane -> getToken (*command_line, 10);
       if (linetoken10=="")
-       linetoken10="0";
+        linetoken10="0";
  
       //cout << linetoken1 << endl;
       //cout << linetoken2 << endl;
@@ -286,20 +286,20 @@ void uiuc_menu( string aircraft_name )
         {
         case init_flag:
           {
-           parse_init( linetoken2, linetoken3, linetoken4, 
-                       linetoken5, linetoken6, linetoken7,
-                       linetoken8, linetoken9, linetoken10,
-                       aircraft_directory, command_line );
+            parse_init( linetoken2, linetoken3, linetoken4, 
+                        linetoken5, linetoken6, linetoken7,
+                        linetoken8, linetoken9, linetoken10,
+                        aircraft_directory, command_line );
             break;
           } // end init map
           
       
         case geometry_flag:
           {
-           parse_geometry( linetoken2, linetoken3, linetoken4,
-                           linetoken5, linetoken6, linetoken7,
-                           linetoken8, linetoken9, linetoken10,
-                           aircraft_directory, command_line );
+            parse_geometry( linetoken2, linetoken3, linetoken4,
+                            linetoken5, linetoken6, linetoken7,
+                            linetoken8, linetoken9, linetoken10,
+                            aircraft_directory, command_line );
             break;
           } // end geometry map
 
@@ -308,18 +308,18 @@ void uiuc_menu( string aircraft_name )
           {
             parse_controlSurface( linetoken2, linetoken3, linetoken4,
                                   linetoken5, linetoken6, linetoken7,
-                                 linetoken8, linetoken9, linetoken10,
-                                 aircraft_directory, command_line );
+                                  linetoken8, linetoken9, linetoken10,
+                                  aircraft_directory, command_line );
             break;
           } // end controlSurface map
 
 
         case mass_flag:
           {
-           parse_mass( linetoken2, linetoken3, linetoken4,
-                       linetoken5, linetoken6, linetoken7,
-                       linetoken8, linetoken9, linetoken10,
-                       aircraft_directory, command_line );
+            parse_mass( linetoken2, linetoken3, linetoken4,
+                        linetoken5, linetoken6, linetoken7,
+                        linetoken8, linetoken9, linetoken10,
+                        aircraft_directory, command_line );
             break;
           } // end mass map
           
@@ -327,102 +327,102 @@ void uiuc_menu( string aircraft_name )
         case engine_flag:
           {
             parse_engine( linetoken2, linetoken3, linetoken4,
-                         linetoken5, linetoken6, linetoken7,
-                         linetoken8, linetoken9, linetoken10,
-                         aircraft_directory, command_line );
+                          linetoken5, linetoken6, linetoken7,
+                          linetoken8, linetoken9, linetoken10,
+                          aircraft_directory, command_line );
             break;
           } // end engine map
           
           
         case CD_flag:
           {
-           parse_CD( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_CD( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end CD map
 
           
         case CL_flag:
           {
-           parse_CL( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_CL( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end CL map
 
 
         case Cm_flag:
           {
-           parse_Cm( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_Cm( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end Cm map
 
 
         case CY_flag:
           {
-           parse_CY( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_CY( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end CY map
 
 
         case Cl_flag:
           {
-           parse_Cl( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_Cl( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end Cl map
 
 
         case Cn_flag:
           {
-           parse_Cn( linetoken2, linetoken3, linetoken4,
-                     linetoken5, linetoken6, linetoken7,
-                     linetoken8, linetoken9, linetoken10,
-                     aircraft_directory, command_line );
+            parse_Cn( linetoken2, linetoken3, linetoken4,
+                      linetoken5, linetoken6, linetoken7,
+                      linetoken8, linetoken9, linetoken10,
+                      aircraft_directory, command_line );
             break;
           } // end Cn map
           
         
         case gear_flag:
           {
-           parse_gear( linetoken2, linetoken3, linetoken4,
-                       linetoken5, linetoken6, linetoken7,
-                       linetoken8, linetoken9, linetoken10,
-                       aircraft_directory, command_line );
-           break;
+            parse_gear( linetoken2, linetoken3, linetoken4,
+                        linetoken5, linetoken6, linetoken7,
+                        linetoken8, linetoken9, linetoken10,
+                        aircraft_directory, command_line );
+            break;
           } // end gear map
       
 
         case ice_flag:
           {
-           parse_ice( linetoken2, linetoken3, linetoken4,
-                      linetoken5, linetoken6, linetoken7,
-                      linetoken8, linetoken9, linetoken10,
-                      aircraft_directory, command_line );
+            parse_ice( linetoken2, linetoken3, linetoken4,
+                       linetoken5, linetoken6, linetoken7,
+                       linetoken8, linetoken9, linetoken10,
+                       aircraft_directory, command_line );
             break;
           } // end ice map
          
 
-       case fog_flag:
+        case fog_flag:
           {
-           parse_fog( linetoken2, linetoken3, linetoken4,
-                      linetoken5, linetoken6, linetoken7,
-                      linetoken8, linetoken9, linetoken10,
-                      aircraft_directory, command_line );
-           break;
-         } // end fog map        
-         
+            parse_fog( linetoken2, linetoken3, linetoken4,
+                       linetoken5, linetoken6, linetoken7,
+                       linetoken8, linetoken9, linetoken10,
+                       aircraft_directory, command_line );
+            break;
+          } // end fog map          
+          
 
         case record_flag:
           {
@@ -432,20 +432,20 @@ void uiuc_menu( string aircraft_name )
               fout_flag=-1;
               fout.open("uiuc_record.dat");
             }
-           parse_record( linetoken2, linetoken3, linetoken4, 
-                         linetoken5, linetoken6, linetoken7,
-                         linetoken8, linetoken9, linetoken10,
-                         aircraft_directory, command_line );
+            parse_record( linetoken2, linetoken3, linetoken4, 
+                          linetoken5, linetoken6, linetoken7,
+                          linetoken8, linetoken9, linetoken10,
+                          aircraft_directory, command_line );
             break;
           } // end record map               
 
 
         case misc_flag:
           {
-           parse_misc( linetoken2, linetoken3, linetoken4, 
-                       linetoken5, linetoken6, linetoken7,
-                       linetoken8, linetoken9, linetoken10,
-                       aircraft_directory, command_line );
+            parse_misc( linetoken2, linetoken3, linetoken4, 
+                        linetoken5, linetoken6, linetoken7,
+                        linetoken8, linetoken9, linetoken10,
+                        aircraft_directory, command_line );
             break;
           } // end misc map
 
@@ -454,12 +454,12 @@ void uiuc_menu( string aircraft_name )
           {
             if (linetoken1=="*")
                 return;
-           if (ignore_unknown_keywords) {
-             // do nothing
-           } else {
-             // print error message
-             uiuc_warnings_errors(2, *command_line);
-           }
+            if (ignore_unknown_keywords) {
+              // do nothing
+            } else {
+              // print error message
+              uiuc_warnings_errors(2, *command_line);
+            }
             break;
           }
         };
index 44823d066a52a26c447e17d2e0e2229c4edaeedb..1d1017a1e4c0ab2f486802e34d899e87f751e236 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_CD( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7, 
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7, 
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -116,569 +116,569 @@ void parse_CD( const string& linetoken2, const string& linetoken3,
     switch(CD_map[linetoken2])
       {
       case CDo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CDo = token_value;
-         CDo_clean = CDo;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CDo = token_value;
+          CDo_clean = CDo;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDK_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CDK = token_value;
-         CDK_clean = CDK;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CDK = token_value;
+          CDK_clean = CDK;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CLK_flag:
-       {
-         b_CLK = true;
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         CLK = token_value;
-         break;
-       }
+        {
+          b_CLK = true;
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          CLK = token_value;
+          break;
+        }
       case CD_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_a = token_value;
-         CD_a_clean = CD_a;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_a = token_value;
+          CD_a_clean = CD_a;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_adot = token_value;
-         CD_adot_clean = CD_adot;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_adot = token_value;
+          CD_adot_clean = CD_adot;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_q = token_value;
-         CD_q_clean = CD_q;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_q = token_value;
+          CD_q_clean = CD_q;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_ih_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_ih = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_ih = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_de = token_value;
-         CD_de_clean = CD_de;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_de = token_value;
+          CD_de_clean = CD_de;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_dr = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_dr = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_da = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_da = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_beta = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_beta = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_df = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_df = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_ds_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_ds = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_ds = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CD_dg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CD_dg = token_value;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CD_dg = token_value;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDfa_flag:
-       {
-         CDfa = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CDfa) and conversion 
-            factors; function returns array of alphas (aArray) and 
-            corresponding CD values (CDArray) and max number of 
-            terms in arrays (nAlpha) */
-         uiuc_1DdataFileReader(CDfa,
-                               CDfa_aArray,
-                               CDfa_CDArray,
-                               CDfa_nAlpha);
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CDfa = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CDfa) and conversion 
+             factors; function returns array of alphas (aArray) and 
+             corresponding CD values (CDArray) and max number of 
+             terms in arrays (nAlpha) */
+          uiuc_1DdataFileReader(CDfa,
+                                CDfa_aArray,
+                                CDfa_CDArray,
+                                CDfa_nAlpha);
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDfCL_flag:
-       {
-         CDfCL = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CDfCL) and conversion 
-            factors; function returns array of CLs (CLArray) and 
-            corresponding CD values (CDArray) and max number of 
-            terms in arrays (nCL) */
-         uiuc_1DdataFileReader(CDfCL,
-                               CDfCL_CLArray,
-                               CDfCL_CDArray,
-                               CDfCL_nCL);
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CDfCL = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CDfCL) and conversion 
+             factors; function returns array of CLs (CLArray) and 
+             corresponding CD values (CDArray) and max number of 
+             terms in arrays (nCL) */
+          uiuc_1DdataFileReader(CDfCL,
+                                CDfCL_CLArray,
+                                CDfCL_CDArray,
+                                CDfCL_nCL);
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDfade_flag:
-       {
-         CDfade = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CDfade) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CD (CDArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nde) */
-         uiuc_2DdataFileReader(CDfade,
-                               CDfade_aArray,
-                               CDfade_deArray,
-                               CDfade_CDArray,
-                               CDfade_nAlphaArray,
-                               CDfade_nde);
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CDfade = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CDfade) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CD (CDArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nde) */
+          uiuc_2DdataFileReader(CDfade,
+                                CDfade_aArray,
+                                CDfade_deArray,
+                                CDfade_CDArray,
+                                CDfade_nAlphaArray,
+                                CDfade_nde);
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDfdf_flag:
-       {
-         CDfdf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CDfdf) and conversion 
-            factors; function returns array of dfs (dfArray) and 
-            corresponding CD values (CDArray) and max number of 
-            terms in arrays (ndf) */
-         uiuc_1DdataFileReader(CDfdf,
-                               CDfdf_dfArray,
-                               CDfdf_CDArray,
-                               CDfdf_ndf);
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CDfdf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CDfdf) and conversion 
+             factors; function returns array of dfs (dfArray) and 
+             corresponding CD values (CDArray) and max number of 
+             terms in arrays (ndf) */
+          uiuc_1DdataFileReader(CDfdf,
+                                CDfdf_dfArray,
+                                CDfdf_CDArray,
+                                CDfdf_ndf);
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CDfadf_flag:
-       {
-         CDfadf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CDfadf) and 
-            conversion factors; function returns array of 
-            flap deflections (dfArray) and corresponding 
-            alpha (aArray) and delta CD (CDArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (ndf) */
-         uiuc_2DdataFileReader(CDfadf,
-                               CDfadf_aArray,
-                               CDfadf_dfArray,
-                               CDfadf_CDArray,
-                               CDfadf_nAlphaArray,
-                               CDfadf_ndf);
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CDfadf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CDfadf) and 
+             conversion factors; function returns array of 
+             flap deflections (dfArray) and corresponding 
+             alpha (aArray) and delta CD (CDArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (ndf) */
+          uiuc_2DdataFileReader(CDfadf,
+                                CDfadf_aArray,
+                                CDfadf_dfArray,
+                                CDfadf_CDArray,
+                                CDfadf_nAlphaArray,
+                                CDfadf_ndf);
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CXo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CXo = token_value;
-         CXo_clean = CXo;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CXo = token_value;
+          CXo_clean = CXo;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CXK_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CXK = token_value;
-         CXK_clean = CXK;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CXK = token_value;
+          CXK_clean = CXK;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_a = token_value;
-         CX_a_clean = CX_a;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_a = token_value;
+          CX_a_clean = CX_a;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_a2 = token_value;
-         CX_a2_clean = CX_a2;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_a2 = token_value;
+          CX_a2_clean = CX_a2;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_a3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_a3 = token_value;
-         CX_a3_clean = CX_a3;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_a3 = token_value;
+          CX_a3_clean = CX_a3;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_adot = token_value;
-         CX_adot_clean = CX_adot;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_adot = token_value;
+          CX_adot_clean = CX_adot;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_q = token_value;
-         CX_q_clean = CX_q;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_q = token_value;
+          CX_q_clean = CX_q;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_de = token_value;
-         CX_de_clean = CX_de;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_de = token_value;
+          CX_de_clean = CX_de;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_dr = token_value;
-         CX_dr_clean = CX_dr;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_dr = token_value;
+          CX_dr_clean = CX_dr;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_df = token_value;
-         CX_df_clean = CX_df;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_df = token_value;
+          CX_df_clean = CX_df;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CX_adf_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CX_adf = token_value;
-         CX_adf_clean = CX_adf;
-         aeroDragParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CX_adf = token_value;
+          CX_adf_clean = CX_adf;
+          aeroDragParts -> storeCommands (*command_line);
+          break;
+        }
       case CXfabetaf_flag:
-       {
-         int CXfabetaf_index, i;
-         string CXfabetaf_file;
-         double flap_value;
-         CXfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> CXfabetaf_index;
-         if (CXfabetaf_index < 1 || CXfabetaf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CXfabetaf_index > CXfabetaf_nf)
-           CXfabetaf_nf = CXfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CXfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CXfabetaf_fArray[CXfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CXfabetaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CXfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CXfabetaf_aArray, CXfabetaf_index);
-         d_1_to_2(datafile_yArray, CXfabetaf_betaArray, CXfabetaf_index);
-         d_2_to_3(datafile_zArray, CXfabetaf_CXArray, CXfabetaf_index);
-         i_1_to_2(datafile_nxArray, CXfabetaf_nAlphaArray, CXfabetaf_index);
-         CXfabetaf_nbeta[CXfabetaf_index] = datafile_ny;
-         if (CXfabetaf_first==true)
-           {
-             if (CXfabetaf_nice == 1)
-               {
-                 CXfabetaf_na_nice = datafile_nxArray[1];
-                 CXfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CXfabetaf_bArray_nice);
-                 for (i=1; i<=CXfabetaf_na_nice; i++)
-                   CXfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroDragParts -> storeCommands (*command_line);
-             CXfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int CXfabetaf_index, i;
+          string CXfabetaf_file;
+          double flap_value;
+          CXfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> CXfabetaf_index;
+          if (CXfabetaf_index < 1 || CXfabetaf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CXfabetaf_index > CXfabetaf_nf)
+            CXfabetaf_nf = CXfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CXfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CXfabetaf_fArray[CXfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CXfabetaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CXfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CXfabetaf_aArray, CXfabetaf_index);
+          d_1_to_2(datafile_yArray, CXfabetaf_betaArray, CXfabetaf_index);
+          d_2_to_3(datafile_zArray, CXfabetaf_CXArray, CXfabetaf_index);
+          i_1_to_2(datafile_nxArray, CXfabetaf_nAlphaArray, CXfabetaf_index);
+          CXfabetaf_nbeta[CXfabetaf_index] = datafile_ny;
+          if (CXfabetaf_first==true)
+            {
+              if (CXfabetaf_nice == 1)
+                {
+                  CXfabetaf_na_nice = datafile_nxArray[1];
+                  CXfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CXfabetaf_bArray_nice);
+                  for (i=1; i<=CXfabetaf_na_nice; i++)
+                    CXfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroDragParts -> storeCommands (*command_line);
+              CXfabetaf_first=false;
+            }
+          break;
+        }
       case CXfadef_flag:
-       {
-         int CXfadef_index, i;
-         string CXfadef_file;
-         double flap_value;
-         CXfadef_file = aircraft_directory + linetoken3;
-         token4 >> CXfadef_index;
-         if (CXfadef_index < 0 || CXfadef_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CXfadef_index > CXfadef_nf)
-           CXfadef_nf = CXfadef_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CXfadef_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CXfadef_fArray[CXfadef_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CXfadef_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CXfadef_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CXfadef_aArray, CXfadef_index);
-         d_1_to_2(datafile_yArray, CXfadef_deArray, CXfadef_index);
-         d_2_to_3(datafile_zArray, CXfadef_CXArray, CXfadef_index);
-         i_1_to_2(datafile_nxArray, CXfadef_nAlphaArray, CXfadef_index);
-         CXfadef_nde[CXfadef_index] = datafile_ny;
-         if (CXfadef_first==true)
-           {
-             if (CXfadef_nice == 1)
-               {
-                 CXfadef_na_nice = datafile_nxArray[1];
-                 CXfadef_nde_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CXfadef_deArray_nice);
-                 for (i=1; i<=CXfadef_na_nice; i++)
-                   CXfadef_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroDragParts -> storeCommands (*command_line);
-             CXfadef_first=false;
-           }
-         break;
-       }
+        {
+          int CXfadef_index, i;
+          string CXfadef_file;
+          double flap_value;
+          CXfadef_file = aircraft_directory + linetoken3;
+          token4 >> CXfadef_index;
+          if (CXfadef_index < 0 || CXfadef_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CXfadef_index > CXfadef_nf)
+            CXfadef_nf = CXfadef_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CXfadef_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CXfadef_fArray[CXfadef_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CXfadef_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CXfadef_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CXfadef_aArray, CXfadef_index);
+          d_1_to_2(datafile_yArray, CXfadef_deArray, CXfadef_index);
+          d_2_to_3(datafile_zArray, CXfadef_CXArray, CXfadef_index);
+          i_1_to_2(datafile_nxArray, CXfadef_nAlphaArray, CXfadef_index);
+          CXfadef_nde[CXfadef_index] = datafile_ny;
+          if (CXfadef_first==true)
+            {
+              if (CXfadef_nice == 1)
+                {
+                  CXfadef_na_nice = datafile_nxArray[1];
+                  CXfadef_nde_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CXfadef_deArray_nice);
+                  for (i=1; i<=CXfadef_na_nice; i++)
+                    CXfadef_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroDragParts -> storeCommands (*command_line);
+              CXfadef_first=false;
+            }
+          break;
+        }
       case CXfaqf_flag:
-       {
-         int CXfaqf_index, i;
-         string CXfaqf_file;
-         double flap_value;
-         CXfaqf_file = aircraft_directory + linetoken3;
-         token4 >> CXfaqf_index;
-         if (CXfaqf_index < 0 || CXfaqf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CXfaqf_index > CXfaqf_nf)
-           CXfaqf_nf = CXfaqf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CXfaqf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CXfaqf_fArray[CXfaqf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CXfaqf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CXfaqf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CXfaqf_aArray, CXfaqf_index);
-         d_1_to_2(datafile_yArray, CXfaqf_qArray, CXfaqf_index);
-         d_2_to_3(datafile_zArray, CXfaqf_CXArray, CXfaqf_index);
-         i_1_to_2(datafile_nxArray, CXfaqf_nAlphaArray, CXfaqf_index);
-         CXfaqf_nq[CXfaqf_index] = datafile_ny;
-         if (CXfaqf_first==true)
-           {
-             if (CXfaqf_nice == 1)
-               {
-                 CXfaqf_na_nice = datafile_nxArray[1];
-                 CXfaqf_nq_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CXfaqf_qArray_nice);
-                 for (i=1; i<=CXfaqf_na_nice; i++)
-                   CXfaqf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroDragParts -> storeCommands (*command_line);
-             CXfaqf_first=false;
-           }
-         break;
-       }
+        {
+          int CXfaqf_index, i;
+          string CXfaqf_file;
+          double flap_value;
+          CXfaqf_file = aircraft_directory + linetoken3;
+          token4 >> CXfaqf_index;
+          if (CXfaqf_index < 0 || CXfaqf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CXfaqf_index > CXfaqf_nf)
+            CXfaqf_nf = CXfaqf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CXfaqf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CXfaqf_fArray[CXfaqf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CXfaqf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CXfaqf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CXfaqf_aArray, CXfaqf_index);
+          d_1_to_2(datafile_yArray, CXfaqf_qArray, CXfaqf_index);
+          d_2_to_3(datafile_zArray, CXfaqf_CXArray, CXfaqf_index);
+          i_1_to_2(datafile_nxArray, CXfaqf_nAlphaArray, CXfaqf_index);
+          CXfaqf_nq[CXfaqf_index] = datafile_ny;
+          if (CXfaqf_first==true)
+            {
+              if (CXfaqf_nice == 1)
+                {
+                  CXfaqf_na_nice = datafile_nxArray[1];
+                  CXfaqf_nq_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CXfaqf_qArray_nice);
+                  for (i=1; i<=CXfaqf_na_nice; i++)
+                    CXfaqf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroDragParts -> storeCommands (*command_line);
+              CXfaqf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 8287bebe2e6226924ede906ea98d0b0bf80e2842..a986d7bdeb1263338cae892d9839772ee40f8561 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_CD( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7, 
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7, 
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CD_H_
index 553d6d689d54506c881bfc467e6bf3244bfbb6ca..1270279be0e1088d514e35fec27fa62b845e75f6 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_CL( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -116,512 +116,512 @@ void parse_CL( const string& linetoken2, const string& linetoken3,
     switch(CL_map[linetoken2])
       {
       case CLo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CLo = token_value;
-         CLo_clean = CLo;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CLo = token_value;
+          CLo_clean = CLo;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_a = token_value;
-         CL_a_clean = CL_a;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_a = token_value;
+          CL_a_clean = CL_a;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_adot = token_value;
-         CL_adot_clean = CL_adot;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_adot = token_value;
+          CL_adot_clean = CL_adot;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_q = token_value;
-         CL_q_clean = CL_q;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_q = token_value;
+          CL_q_clean = CL_q;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_ih_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_ih = token_value;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_ih = token_value;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_de = token_value;
-         CL_de_clean = CL_de;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_de = token_value;
+          CL_de_clean = CL_de;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_df = token_value;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_df = token_value;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_ds_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_ds = token_value;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_ds = token_value;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CL_dg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CL_dg = token_value;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CL_dg = token_value;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CLfa_flag:
-       {
-         CLfa = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CLfa) and conversion 
-            factors; function returns array of alphas (aArray) and 
-            corresponding CL values (CLArray) and max number of 
-            terms in arrays (nAlpha) */
-         uiuc_1DdataFileReader(CLfa,
-                               CLfa_aArray,
-                               CLfa_CLArray,
-                               CLfa_nAlpha);
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CLfa = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CLfa) and conversion 
+             factors; function returns array of alphas (aArray) and 
+             corresponding CL values (CLArray) and max number of 
+             terms in arrays (nAlpha) */
+          uiuc_1DdataFileReader(CLfa,
+                                CLfa_aArray,
+                                CLfa_CLArray,
+                                CLfa_nAlpha);
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CLfade_flag:
-       {
-         CLfade = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CLfade) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CL (CLArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nde) */
-         uiuc_2DdataFileReader(CLfade,
-                               CLfade_aArray,
-                               CLfade_deArray,
-                               CLfade_CLArray,
-                               CLfade_nAlphaArray,
-                               CLfade_nde);
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CLfade = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CLfade) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CL (CLArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nde) */
+          uiuc_2DdataFileReader(CLfade,
+                                CLfade_aArray,
+                                CLfade_deArray,
+                                CLfade_CLArray,
+                                CLfade_nAlphaArray,
+                                CLfade_nde);
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CLfdf_flag:
-       {
-         CLfdf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CLfdf) and conversion 
-            factors; function returns array of dfs (dfArray) and 
-            corresponding CL values (CLArray) and max number of 
-            terms in arrays (ndf) */
-         uiuc_1DdataFileReader(CLfdf,
-                               CLfdf_dfArray,
-                               CLfdf_CLArray,
-                               CLfdf_ndf);
-         aeroLiftParts -> storeCommands (*command_line);
-         
-         // additional variables to streamline flap routine in aerodeflections
-         //ndf = CLfdf_ndf;
-         //int temp_counter = 1;
-         //while (temp_counter <= ndf)
-         //  {
-         //    dfArray[temp_counter] = CLfdf_dfArray[temp_counter];
-         //    TimeArray[temp_counter] = dfTimefdf_TimeArray[temp_counter];
-         //    temp_counter++;
-         //  }
-         break;
-       }
+        {
+          CLfdf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CLfdf) and conversion 
+             factors; function returns array of dfs (dfArray) and 
+             corresponding CL values (CLArray) and max number of 
+             terms in arrays (ndf) */
+          uiuc_1DdataFileReader(CLfdf,
+                                CLfdf_dfArray,
+                                CLfdf_CLArray,
+                                CLfdf_ndf);
+          aeroLiftParts -> storeCommands (*command_line);
+          
+          // additional variables to streamline flap routine in aerodeflections
+          //ndf = CLfdf_ndf;
+          //int temp_counter = 1;
+          //while (temp_counter <= ndf)
+          //  {
+          //    dfArray[temp_counter] = CLfdf_dfArray[temp_counter];
+          //    TimeArray[temp_counter] = dfTimefdf_TimeArray[temp_counter];
+          //    temp_counter++;
+          //  }
+          break;
+        }
       case CLfadf_flag:
-       {
-         CLfadf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CLfadf) and 
-            conversion factors; function returns array of 
-            flap deflections (dfArray) and corresponding 
-            alpha (aArray) and delta CL (CLArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (ndf) */
-         uiuc_2DdataFileReader(CLfadf,
-                               CLfadf_aArray,
-                               CLfadf_dfArray,
-                               CLfadf_CLArray,
-                               CLfadf_nAlphaArray,
-                               CLfadf_ndf);
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CLfadf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CLfadf) and 
+             conversion factors; function returns array of 
+             flap deflections (dfArray) and corresponding 
+             alpha (aArray) and delta CL (CLArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (ndf) */
+          uiuc_2DdataFileReader(CLfadf,
+                                CLfadf_aArray,
+                                CLfadf_dfArray,
+                                CLfadf_CLArray,
+                                CLfadf_nAlphaArray,
+                                CLfadf_ndf);
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZo = token_value;
-         CZo_clean = CZo;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZo = token_value;
+          CZo_clean = CZo;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_a = token_value;
-         CZ_a_clean = CZ_a;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_a = token_value;
+          CZ_a_clean = CZ_a;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_a2 = token_value;
-         CZ_a2_clean = CZ_a2;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_a2 = token_value;
+          CZ_a2_clean = CZ_a2;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_a3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_a3 = token_value;
-         CZ_a3_clean = CZ_a3;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_a3 = token_value;
+          CZ_a3_clean = CZ_a3;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_adot = token_value;
-         CZ_adot_clean = CZ_adot;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_adot = token_value;
+          CZ_adot_clean = CZ_adot;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_q = token_value;
-         CZ_q_clean = CZ_q;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_q = token_value;
+          CZ_q_clean = CZ_q;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_de = token_value;
-         CZ_de_clean = CZ_de;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_de = token_value;
+          CZ_de_clean = CZ_de;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_deb2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_deb2 = token_value;
-         CZ_deb2_clean = CZ_deb2;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_deb2 = token_value;
+          CZ_deb2_clean = CZ_deb2;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_df = token_value;
-         CZ_df_clean = CZ_df;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_df = token_value;
+          CZ_df_clean = CZ_df;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZ_adf_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CZ_adf = token_value;
-         CZ_adf_clean = CZ_adf;
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CZ_adf = token_value;
+          CZ_adf_clean = CZ_adf;
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZfa_flag:
-       {
-         CZfa = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (CZfa) and conversion 
-            factors; function returns array of alphas (aArray) and 
-            corresponding CZ values (CZArray) and max number of 
-            terms in arrays (nAlpha) */
-         uiuc_1DdataFileReader(CZfa,
-                               CZfa_aArray,
-                               CZfa_CZArray,
-                               CZfa_nAlpha);
-         aeroLiftParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CZfa = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (CZfa) and conversion 
+             factors; function returns array of alphas (aArray) and 
+             corresponding CZ values (CZArray) and max number of 
+             terms in arrays (nAlpha) */
+          uiuc_1DdataFileReader(CZfa,
+                                CZfa_aArray,
+                                CZfa_CZArray,
+                                CZfa_nAlpha);
+          aeroLiftParts -> storeCommands (*command_line);
+          break;
+        }
       case CZfabetaf_flag:
-       {
-         int CZfabetaf_index, i;
-         string CZfabetaf_file;
-         double flap_value;
-         CZfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> CZfabetaf_index;
-         if (CZfabetaf_index < 0 || CZfabetaf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CZfabetaf_index > CZfabetaf_nf)
-           CZfabetaf_nf = CZfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CZfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CZfabetaf_fArray[CZfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CZfabetaf_file) and 
-            conversion factors; function returns array of 
-            beta (betaArray) and corresponding 
-            alpha (aArray) and CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and beta array (nbeta) */
-         uiuc_2DdataFileReader(CZfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CZfabetaf_aArray, CZfabetaf_index);
-         d_1_to_2(datafile_yArray, CZfabetaf_betaArray, CZfabetaf_index);
-         d_2_to_3(datafile_zArray, CZfabetaf_CZArray, CZfabetaf_index);
-         i_1_to_2(datafile_nxArray, CZfabetaf_nAlphaArray, CZfabetaf_index);
-         CZfabetaf_nbeta[CZfabetaf_index] = datafile_ny;
-         if (CZfabetaf_first==true)
-           {
-             if (CZfabetaf_nice == 1)
-               {
-                 CZfabetaf_na_nice = datafile_nxArray[1];
-                 CZfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CZfabetaf_bArray_nice);
-                 for (i=1; i<=CZfabetaf_na_nice; i++)
-                   CZfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroLiftParts -> storeCommands (*command_line);
-             CZfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int CZfabetaf_index, i;
+          string CZfabetaf_file;
+          double flap_value;
+          CZfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> CZfabetaf_index;
+          if (CZfabetaf_index < 0 || CZfabetaf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CZfabetaf_index > CZfabetaf_nf)
+            CZfabetaf_nf = CZfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CZfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CZfabetaf_fArray[CZfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CZfabetaf_file) and 
+             conversion factors; function returns array of 
+             beta (betaArray) and corresponding 
+             alpha (aArray) and CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and beta array (nbeta) */
+          uiuc_2DdataFileReader(CZfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CZfabetaf_aArray, CZfabetaf_index);
+          d_1_to_2(datafile_yArray, CZfabetaf_betaArray, CZfabetaf_index);
+          d_2_to_3(datafile_zArray, CZfabetaf_CZArray, CZfabetaf_index);
+          i_1_to_2(datafile_nxArray, CZfabetaf_nAlphaArray, CZfabetaf_index);
+          CZfabetaf_nbeta[CZfabetaf_index] = datafile_ny;
+          if (CZfabetaf_first==true)
+            {
+              if (CZfabetaf_nice == 1)
+                {
+                  CZfabetaf_na_nice = datafile_nxArray[1];
+                  CZfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CZfabetaf_bArray_nice);
+                  for (i=1; i<=CZfabetaf_na_nice; i++)
+                    CZfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroLiftParts -> storeCommands (*command_line);
+              CZfabetaf_first=false;
+            }
+          break;
+        }
       case CZfadef_flag:
-       {
-         int CZfadef_index, i;
-         string CZfadef_file;
-         double flap_value;
-         CZfadef_file = aircraft_directory + linetoken3;
-         token4 >> CZfadef_index;
-         if (CZfadef_index < 0 || CZfadef_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CZfadef_index > CZfadef_nf)
-           CZfadef_nf = CZfadef_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CZfadef_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CZfadef_fArray[CZfadef_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CZfadef_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CZfadef_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CZfadef_aArray, CZfadef_index);
-         d_1_to_2(datafile_yArray, CZfadef_deArray, CZfadef_index);
-         d_2_to_3(datafile_zArray, CZfadef_CZArray, CZfadef_index);
-         i_1_to_2(datafile_nxArray, CZfadef_nAlphaArray, CZfadef_index);
-         CZfadef_nde[CZfadef_index] = datafile_ny;
-         if (CZfadef_first==true)
-           {
-             if (CZfadef_nice == 1)
-               {
-                 CZfadef_na_nice = datafile_nxArray[1];
-                 CZfadef_nde_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CZfadef_deArray_nice);
-                 for (i=1; i<=CZfadef_na_nice; i++)
-                   CZfadef_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroLiftParts -> storeCommands (*command_line);
-             CZfadef_first=false;
-           }
-         break;
-       }
+        {
+          int CZfadef_index, i;
+          string CZfadef_file;
+          double flap_value;
+          CZfadef_file = aircraft_directory + linetoken3;
+          token4 >> CZfadef_index;
+          if (CZfadef_index < 0 || CZfadef_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CZfadef_index > CZfadef_nf)
+            CZfadef_nf = CZfadef_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CZfadef_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CZfadef_fArray[CZfadef_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CZfadef_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CZfadef_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CZfadef_aArray, CZfadef_index);
+          d_1_to_2(datafile_yArray, CZfadef_deArray, CZfadef_index);
+          d_2_to_3(datafile_zArray, CZfadef_CZArray, CZfadef_index);
+          i_1_to_2(datafile_nxArray, CZfadef_nAlphaArray, CZfadef_index);
+          CZfadef_nde[CZfadef_index] = datafile_ny;
+          if (CZfadef_first==true)
+            {
+              if (CZfadef_nice == 1)
+                {
+                  CZfadef_na_nice = datafile_nxArray[1];
+                  CZfadef_nde_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CZfadef_deArray_nice);
+                  for (i=1; i<=CZfadef_na_nice; i++)
+                    CZfadef_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroLiftParts -> storeCommands (*command_line);
+              CZfadef_first=false;
+            }
+          break;
+        }
       case CZfaqf_flag:
-       {
-         int CZfaqf_index, i;
-         string CZfaqf_file;
-         double flap_value;
-         CZfaqf_file = aircraft_directory + linetoken3;
-         token4 >> CZfaqf_index;
-         if (CZfaqf_index < 0 || CZfaqf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CZfaqf_index > CZfaqf_nf)
-           CZfaqf_nf = CZfaqf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CZfaqf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CZfaqf_fArray[CZfaqf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CZfaqf_file) and 
-            conversion factors; function returns array of 
-            pitch rate (qArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and pitch rate array (nq) */
-         uiuc_2DdataFileReader(CZfaqf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CZfaqf_aArray, CZfaqf_index);
-         d_1_to_2(datafile_yArray, CZfaqf_qArray, CZfaqf_index);
-         d_2_to_3(datafile_zArray, CZfaqf_CZArray, CZfaqf_index);
-         i_1_to_2(datafile_nxArray, CZfaqf_nAlphaArray, CZfaqf_index);
-         CZfaqf_nq[CZfaqf_index] = datafile_ny;
-         if (CZfaqf_first==true)
-           {
-             if (CZfaqf_nice == 1)
-               {
-                 CZfaqf_na_nice = datafile_nxArray[1];
-                 CZfaqf_nq_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CZfaqf_qArray_nice);
-                 for (i=1; i<=CZfaqf_na_nice; i++)
-                   CZfaqf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroLiftParts -> storeCommands (*command_line);
-             CZfaqf_first=false;
-           }
-         break;
-       }
+        {
+          int CZfaqf_index, i;
+          string CZfaqf_file;
+          double flap_value;
+          CZfaqf_file = aircraft_directory + linetoken3;
+          token4 >> CZfaqf_index;
+          if (CZfaqf_index < 0 || CZfaqf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CZfaqf_index > CZfaqf_nf)
+            CZfaqf_nf = CZfaqf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CZfaqf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CZfaqf_fArray[CZfaqf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CZfaqf_file) and 
+             conversion factors; function returns array of 
+             pitch rate (qArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and pitch rate array (nq) */
+          uiuc_2DdataFileReader(CZfaqf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CZfaqf_aArray, CZfaqf_index);
+          d_1_to_2(datafile_yArray, CZfaqf_qArray, CZfaqf_index);
+          d_2_to_3(datafile_zArray, CZfaqf_CZArray, CZfaqf_index);
+          i_1_to_2(datafile_nxArray, CZfaqf_nAlphaArray, CZfaqf_index);
+          CZfaqf_nq[CZfaqf_index] = datafile_ny;
+          if (CZfaqf_first==true)
+            {
+              if (CZfaqf_nice == 1)
+                {
+                  CZfaqf_na_nice = datafile_nxArray[1];
+                  CZfaqf_nq_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CZfaqf_qArray_nice);
+                  for (i=1; i<=CZfaqf_na_nice; i++)
+                    CZfaqf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroLiftParts -> storeCommands (*command_line);
+              CZfaqf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 3169b7472e95dd99d24207a4bbd32c15ba1ecf72..d976967db3b7acca2e3982894d56bba9f80facfd 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_CL( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CL_H_
index c9949d0d52e12d55078e9849ada85c7abe8cdb5f..d32d3dc6c92b276b2f4b5b039d94ed0623d771b2 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_CY( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -118,428 +118,428 @@ void parse_CY( const string& linetoken2, const string& linetoken3,
     switch(CY_map[linetoken2])
       {
       case CYo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CYo = token_value;
-         CYo_clean = CYo;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CYo = token_value;
+          CYo_clean = CYo;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CY_beta = token_value;
-         CY_beta_clean = CY_beta;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CY_beta = token_value;
+          CY_beta_clean = CY_beta;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CY_p = token_value;
-         CY_p_clean = CY_p;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CY_p = token_value;
+          CY_p_clean = CY_p;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CY_r = token_value;
-         CY_r_clean = CY_r;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CY_r = token_value;
+          CY_r_clean = CY_r;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         CY_da = token_value;
-         CY_da_clean = CY_da;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          CY_da = token_value;
+          CY_da_clean = CY_da;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(2, *command_line);
-         
-         CY_dr = token_value;
-         CY_dr_clean = CY_dr;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(2, *command_line);
+          
+          CY_dr = token_value;
+          CY_dr_clean = CY_dr;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_dra_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(2, *command_line);
-         
-         CY_dra = token_value;
-         CY_dra_clean = CY_dra;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(2, *command_line);
+          
+          CY_dra = token_value;
+          CY_dra_clean = CY_dra;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CY_bdot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(2, *command_line);
-         
-         CY_bdot = token_value;
-         CY_bdot_clean = CY_bdot;
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(2, *command_line);
+          
+          CY_bdot = token_value;
+          CY_bdot_clean = CY_bdot;
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CYfada_flag:
-       {
-         CYfada = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CYfada) and 
-            conversion factors; function returns array of 
-            aileron deflections (daArray) and corresponding 
-            alpha (aArray) and delta CY (CYArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nda) */
-         uiuc_2DdataFileReader(CYfada,
-                               CYfada_aArray,
-                               CYfada_daArray,
-                               CYfada_CYArray,
-                               CYfada_nAlphaArray,
-                               CYfada_nda);
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CYfada = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CYfada) and 
+             conversion factors; function returns array of 
+             aileron deflections (daArray) and corresponding 
+             alpha (aArray) and delta CY (CYArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nda) */
+          uiuc_2DdataFileReader(CYfada,
+                                CYfada_aArray,
+                                CYfada_daArray,
+                                CYfada_CYArray,
+                                CYfada_nAlphaArray,
+                                CYfada_nda);
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CYfbetadr_flag:
-       {
-         CYfbetadr = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (CYfbetadr) and 
-            conversion factors; function returns array of 
-            rudder deflections (drArray) and corresponding 
-            beta (betaArray) and delta CY (CYArray) values and 
-            max number of terms in beta arrays (nBetaArray) 
-            and deflection array (ndr) */
-         uiuc_2DdataFileReader(CYfbetadr,
-                               CYfbetadr_betaArray,
-                               CYfbetadr_drArray,
-                               CYfbetadr_CYArray,
-                               CYfbetadr_nBetaArray,
-                               CYfbetadr_ndr);
-         aeroSideforceParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          CYfbetadr = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (CYfbetadr) and 
+             conversion factors; function returns array of 
+             rudder deflections (drArray) and corresponding 
+             beta (betaArray) and delta CY (CYArray) values and 
+             max number of terms in beta arrays (nBetaArray) 
+             and deflection array (ndr) */
+          uiuc_2DdataFileReader(CYfbetadr,
+                                CYfbetadr_betaArray,
+                                CYfbetadr_drArray,
+                                CYfbetadr_CYArray,
+                                CYfbetadr_nBetaArray,
+                                CYfbetadr_ndr);
+          aeroSideforceParts -> storeCommands (*command_line);
+          break;
+        }
       case CYfabetaf_flag:
-       {
-         int CYfabetaf_index, i;
-         string CYfabetaf_file;
-         double flap_value;
-         CYfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> CYfabetaf_index;
-         if (CYfabetaf_index < 0 || CYfabetaf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CYfabetaf_index > CYfabetaf_nf)
-           CYfabetaf_nf = CYfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CYfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CYfabetaf_fArray[CYfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CYfabetaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CYfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CYfabetaf_aArray, CYfabetaf_index);
-         d_1_to_2(datafile_yArray, CYfabetaf_betaArray, CYfabetaf_index);
-         d_2_to_3(datafile_zArray, CYfabetaf_CYArray, CYfabetaf_index);
-         i_1_to_2(datafile_nxArray, CYfabetaf_nAlphaArray, CYfabetaf_index);
-         CYfabetaf_nbeta[CYfabetaf_index] = datafile_ny;
-         if (CYfabetaf_first==true)
-           {
-             if (CYfabetaf_nice == 1)
-               {
-                 CYfabetaf_na_nice = datafile_nxArray[1];
-                 CYfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CYfabetaf_bArray_nice);
-                 for (i=1; i<=CYfabetaf_na_nice; i++)
-                   CYfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroSideforceParts -> storeCommands (*command_line);
-             CYfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int CYfabetaf_index, i;
+          string CYfabetaf_file;
+          double flap_value;
+          CYfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> CYfabetaf_index;
+          if (CYfabetaf_index < 0 || CYfabetaf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CYfabetaf_index > CYfabetaf_nf)
+            CYfabetaf_nf = CYfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CYfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CYfabetaf_fArray[CYfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CYfabetaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CYfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CYfabetaf_aArray, CYfabetaf_index);
+          d_1_to_2(datafile_yArray, CYfabetaf_betaArray, CYfabetaf_index);
+          d_2_to_3(datafile_zArray, CYfabetaf_CYArray, CYfabetaf_index);
+          i_1_to_2(datafile_nxArray, CYfabetaf_nAlphaArray, CYfabetaf_index);
+          CYfabetaf_nbeta[CYfabetaf_index] = datafile_ny;
+          if (CYfabetaf_first==true)
+            {
+              if (CYfabetaf_nice == 1)
+                {
+                  CYfabetaf_na_nice = datafile_nxArray[1];
+                  CYfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CYfabetaf_bArray_nice);
+                  for (i=1; i<=CYfabetaf_na_nice; i++)
+                    CYfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroSideforceParts -> storeCommands (*command_line);
+              CYfabetaf_first=false;
+            }
+          break;
+        }
       case CYfadaf_flag:
-       {
-         int CYfadaf_index, i;
-         string CYfadaf_file;
-         double flap_value;
-         CYfadaf_file = aircraft_directory + linetoken3;
-         token4 >> CYfadaf_index;
-         if (CYfadaf_index < 0 || CYfadaf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CYfadaf_index > CYfadaf_nf)
-           CYfadaf_nf = CYfadaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CYfadaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CYfadaf_fArray[CYfadaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CYfadaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CYfadaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CYfadaf_aArray, CYfadaf_index);
-         d_1_to_2(datafile_yArray, CYfadaf_daArray, CYfadaf_index);
-         d_2_to_3(datafile_zArray, CYfadaf_CYArray, CYfadaf_index);
-         i_1_to_2(datafile_nxArray, CYfadaf_nAlphaArray, CYfadaf_index);
-         CYfadaf_nda[CYfadaf_index] = datafile_ny;
-         if (CYfadaf_first==true)
-           {
-             if (CYfadaf_nice == 1)
-               {
-                 CYfadaf_na_nice = datafile_nxArray[1];
-                 CYfadaf_nda_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CYfadaf_daArray_nice);
-                 for (i=1; i<=CYfadaf_na_nice; i++)
-                   CYfadaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroSideforceParts -> storeCommands (*command_line);
-             CYfadaf_first=false;
-           }
-         break;
-       }
+        {
+          int CYfadaf_index, i;
+          string CYfadaf_file;
+          double flap_value;
+          CYfadaf_file = aircraft_directory + linetoken3;
+          token4 >> CYfadaf_index;
+          if (CYfadaf_index < 0 || CYfadaf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CYfadaf_index > CYfadaf_nf)
+            CYfadaf_nf = CYfadaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CYfadaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CYfadaf_fArray[CYfadaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CYfadaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CYfadaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CYfadaf_aArray, CYfadaf_index);
+          d_1_to_2(datafile_yArray, CYfadaf_daArray, CYfadaf_index);
+          d_2_to_3(datafile_zArray, CYfadaf_CYArray, CYfadaf_index);
+          i_1_to_2(datafile_nxArray, CYfadaf_nAlphaArray, CYfadaf_index);
+          CYfadaf_nda[CYfadaf_index] = datafile_ny;
+          if (CYfadaf_first==true)
+            {
+              if (CYfadaf_nice == 1)
+                {
+                  CYfadaf_na_nice = datafile_nxArray[1];
+                  CYfadaf_nda_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CYfadaf_daArray_nice);
+                  for (i=1; i<=CYfadaf_na_nice; i++)
+                    CYfadaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroSideforceParts -> storeCommands (*command_line);
+              CYfadaf_first=false;
+            }
+          break;
+        }
       case CYfadrf_flag:
-       {
-         int CYfadrf_index, i;
-         string CYfadrf_file;
-         double flap_value;
-         CYfadrf_file = aircraft_directory + linetoken3;
-         token4 >> CYfadrf_index;
-         if (CYfadrf_index < 0 || CYfadrf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CYfadrf_index > CYfadrf_nf)
-           CYfadrf_nf = CYfadrf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CYfadrf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CYfadrf_fArray[CYfadrf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CYfadrf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CYfadrf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CYfadrf_aArray, CYfadrf_index);
-         d_1_to_2(datafile_yArray, CYfadrf_drArray, CYfadrf_index);
-         d_2_to_3(datafile_zArray, CYfadrf_CYArray, CYfadrf_index);
-         i_1_to_2(datafile_nxArray, CYfadrf_nAlphaArray, CYfadrf_index);
-         CYfadrf_ndr[CYfadrf_index] = datafile_ny;
-         if (CYfadrf_first==true)
-           {
-             if (CYfadrf_nice == 1)
-               {
-                 CYfadrf_na_nice = datafile_nxArray[1];
-                 CYfadrf_ndr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CYfadrf_drArray_nice);
-                 for (i=1; i<=CYfadrf_na_nice; i++)
-                   CYfadrf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroSideforceParts -> storeCommands (*command_line);
-             CYfadrf_first=false;
-           }
-         break;
-       }
+        {
+          int CYfadrf_index, i;
+          string CYfadrf_file;
+          double flap_value;
+          CYfadrf_file = aircraft_directory + linetoken3;
+          token4 >> CYfadrf_index;
+          if (CYfadrf_index < 0 || CYfadrf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CYfadrf_index > CYfadrf_nf)
+            CYfadrf_nf = CYfadrf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CYfadrf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CYfadrf_fArray[CYfadrf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CYfadrf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CYfadrf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CYfadrf_aArray, CYfadrf_index);
+          d_1_to_2(datafile_yArray, CYfadrf_drArray, CYfadrf_index);
+          d_2_to_3(datafile_zArray, CYfadrf_CYArray, CYfadrf_index);
+          i_1_to_2(datafile_nxArray, CYfadrf_nAlphaArray, CYfadrf_index);
+          CYfadrf_ndr[CYfadrf_index] = datafile_ny;
+          if (CYfadrf_first==true)
+            {
+              if (CYfadrf_nice == 1)
+                {
+                  CYfadrf_na_nice = datafile_nxArray[1];
+                  CYfadrf_ndr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CYfadrf_drArray_nice);
+                  for (i=1; i<=CYfadrf_na_nice; i++)
+                    CYfadrf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroSideforceParts -> storeCommands (*command_line);
+              CYfadrf_first=false;
+            }
+          break;
+        }
       case CYfapf_flag:
-       {
-         int CYfapf_index, i;
-         string CYfapf_file;
-         double flap_value;
-         CYfapf_file = aircraft_directory + linetoken3;
-         token4 >> CYfapf_index;
-         if (CYfapf_index < 0 || CYfapf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CYfapf_index > CYfapf_nf)
-           CYfapf_nf = CYfapf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CYfapf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CYfapf_fArray[CYfapf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CYfapf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CYfapf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CYfapf_aArray, CYfapf_index);
-         d_1_to_2(datafile_yArray, CYfapf_pArray, CYfapf_index);
-         d_2_to_3(datafile_zArray, CYfapf_CYArray, CYfapf_index);
-         i_1_to_2(datafile_nxArray, CYfapf_nAlphaArray, CYfapf_index);
-         CYfapf_np[CYfapf_index] = datafile_ny;
-         if (CYfapf_first==true)
-           {
-             if (CYfapf_nice == 1)
-               {
-                 CYfapf_na_nice = datafile_nxArray[1];
-                 CYfapf_np_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CYfapf_pArray_nice);
-                 for (i=1; i<=CYfapf_na_nice; i++)
-                   CYfapf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroSideforceParts -> storeCommands (*command_line);
-             CYfapf_first=false;
-           }
-         break;
-       }
+        {
+          int CYfapf_index, i;
+          string CYfapf_file;
+          double flap_value;
+          CYfapf_file = aircraft_directory + linetoken3;
+          token4 >> CYfapf_index;
+          if (CYfapf_index < 0 || CYfapf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CYfapf_index > CYfapf_nf)
+            CYfapf_nf = CYfapf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CYfapf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CYfapf_fArray[CYfapf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CYfapf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CYfapf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CYfapf_aArray, CYfapf_index);
+          d_1_to_2(datafile_yArray, CYfapf_pArray, CYfapf_index);
+          d_2_to_3(datafile_zArray, CYfapf_CYArray, CYfapf_index);
+          i_1_to_2(datafile_nxArray, CYfapf_nAlphaArray, CYfapf_index);
+          CYfapf_np[CYfapf_index] = datafile_ny;
+          if (CYfapf_first==true)
+            {
+              if (CYfapf_nice == 1)
+                {
+                  CYfapf_na_nice = datafile_nxArray[1];
+                  CYfapf_np_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CYfapf_pArray_nice);
+                  for (i=1; i<=CYfapf_na_nice; i++)
+                    CYfapf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroSideforceParts -> storeCommands (*command_line);
+              CYfapf_first=false;
+            }
+          break;
+        }
       case CYfarf_flag:
-       {
-         int CYfarf_index, i;
-         string CYfarf_file;
-         double flap_value;
-         CYfarf_file = aircraft_directory + linetoken3;
-         token4 >> CYfarf_index;
-         if (CYfarf_index < 0 || CYfarf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (CYfarf_index > CYfarf_nf)
-           CYfarf_nf = CYfarf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> CYfarf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         CYfarf_fArray[CYfarf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (CYfarf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(CYfarf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, CYfarf_aArray, CYfarf_index);
-         d_1_to_2(datafile_yArray, CYfarf_rArray, CYfarf_index);
-         d_2_to_3(datafile_zArray, CYfarf_CYArray, CYfarf_index);
-         i_1_to_2(datafile_nxArray, CYfarf_nAlphaArray, CYfarf_index);
-         CYfarf_nr[CYfarf_index] = datafile_ny;
-         if (CYfarf_first==true)
-           {
-             if (CYfarf_nice == 1)
-               {
-                 CYfarf_na_nice = datafile_nxArray[1];
-                 CYfarf_nr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, CYfarf_rArray_nice);
-                 for (i=1; i<=CYfarf_na_nice; i++)
-                   CYfarf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroSideforceParts -> storeCommands (*command_line);
-             CYfarf_first=false;
-           }
-         break;
-       }
+        {
+          int CYfarf_index, i;
+          string CYfarf_file;
+          double flap_value;
+          CYfarf_file = aircraft_directory + linetoken3;
+          token4 >> CYfarf_index;
+          if (CYfarf_index < 0 || CYfarf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (CYfarf_index > CYfarf_nf)
+            CYfarf_nf = CYfarf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> CYfarf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          CYfarf_fArray[CYfarf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (CYfarf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(CYfarf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, CYfarf_aArray, CYfarf_index);
+          d_1_to_2(datafile_yArray, CYfarf_rArray, CYfarf_index);
+          d_2_to_3(datafile_zArray, CYfarf_CYArray, CYfarf_index);
+          i_1_to_2(datafile_nxArray, CYfarf_nAlphaArray, CYfarf_index);
+          CYfarf_nr[CYfarf_index] = datafile_ny;
+          if (CYfarf_first==true)
+            {
+              if (CYfarf_nice == 1)
+                {
+                  CYfarf_na_nice = datafile_nxArray[1];
+                  CYfarf_nr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, CYfarf_rArray_nice);
+                  for (i=1; i<=CYfarf_na_nice; i++)
+                    CYfarf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroSideforceParts -> storeCommands (*command_line);
+              CYfarf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 0d5fde5525e036505f559cd3ea7afa6fc95e83d8..7bb8f2271f2b163df3bc505f339bee2d9bca6343 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_CY( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CY_H_
index ba21aab2a0bd0f7df358b92fd7532f006140a817..76edf75110878757389a72ada0022f1cd3695435 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_Cm( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -116,401 +116,401 @@ void parse_Cm( const string& linetoken2, const string& linetoken3,
     switch(Cm_map[linetoken2])
       {
       case Cmo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cmo = token_value;
-         Cmo_clean = Cmo;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cmo = token_value;
+          Cmo_clean = Cmo;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_a = token_value;
-         Cm_a_clean = Cm_a;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_a = token_value;
+          Cm_a_clean = Cm_a;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_a2 = token_value;
-         Cm_a2_clean = Cm_a2;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_a2 = token_value;
+          Cm_a2_clean = Cm_a2;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_adot = token_value;
-         Cm_adot_clean = Cm_adot;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_adot = token_value;
+          Cm_adot_clean = Cm_adot;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_q = token_value;
-         Cm_q_clean = Cm_q;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_q = token_value;
+          Cm_q_clean = Cm_q;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_ih_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_ih = token_value;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_ih = token_value;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_de = token_value;
-         Cm_de_clean = Cm_de;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_de = token_value;
+          Cm_de_clean = Cm_de;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_b2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_b2 = token_value;
-         Cm_b2_clean = Cm_b2;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_b2 = token_value;
+          Cm_b2_clean = Cm_b2;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_r = token_value;
-         Cm_r_clean = Cm_r;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_r = token_value;
+          Cm_r_clean = Cm_r;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_df = token_value;
-         Cm_df_clean = Cm_df;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_df = token_value;
+          Cm_df_clean = Cm_df;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_ds_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_ds = token_value;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_ds = token_value;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cm_dg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cm_dg = token_value;
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cm_dg = token_value;
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cmfa_flag:
-       {
-         Cmfa = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (Cmfa) and conversion 
-            factors; function returns array of alphas (aArray) and 
-            corresponding Cm values (CmArray) and max number of 
-            terms in arrays (nAlpha) */
-         uiuc_1DdataFileReader(Cmfa,
-                               Cmfa_aArray,
-                               Cmfa_CmArray,
-                               Cmfa_nAlpha);
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cmfa = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (Cmfa) and conversion 
+             factors; function returns array of alphas (aArray) and 
+             corresponding Cm values (CmArray) and max number of 
+             terms in arrays (nAlpha) */
+          uiuc_1DdataFileReader(Cmfa,
+                                Cmfa_aArray,
+                                Cmfa_CmArray,
+                                Cmfa_nAlpha);
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cmfade_flag:
-       {
-         Cmfade = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Cmfade) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta Cm (CmArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nde) */
-         uiuc_2DdataFileReader(Cmfade,
-                               Cmfade_aArray,
-                               Cmfade_deArray,
-                               Cmfade_CmArray,
-                               Cmfade_nAlphaArray,
-                               Cmfade_nde);
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cmfade = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Cmfade) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta Cm (CmArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nde) */
+          uiuc_2DdataFileReader(Cmfade,
+                                Cmfade_aArray,
+                                Cmfade_deArray,
+                                Cmfade_CmArray,
+                                Cmfade_nAlphaArray,
+                                Cmfade_nde);
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cmfdf_flag:
-       {
-         Cmfdf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         /* call 1D File Reader with file name (Cmfdf) and conversion 
-            factors; function returns array of dfs (dfArray) and 
-            corresponding Cm values (CmArray) and max number of 
-            terms in arrays (ndf) */
-         uiuc_1DdataFileReader(Cmfdf,
-                               Cmfdf_dfArray,
-                               Cmfdf_CmArray,
-                               Cmfdf_ndf);
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cmfdf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          /* call 1D File Reader with file name (Cmfdf) and conversion 
+             factors; function returns array of dfs (dfArray) and 
+             corresponding Cm values (CmArray) and max number of 
+             terms in arrays (ndf) */
+          uiuc_1DdataFileReader(Cmfdf,
+                                Cmfdf_dfArray,
+                                Cmfdf_CmArray,
+                                Cmfdf_ndf);
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cmfadf_flag:
-       {
-         Cmfadf = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Cmfadf) and 
-            conversion factors; function returns array of 
-            flap deflections (dfArray) and corresponding 
-            alpha (aArray) and delta Cm (CmArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (ndf) */
-         uiuc_2DdataFileReader(Cmfadf,
-                               Cmfadf_aArray,
-                               Cmfadf_dfArray,
-                               Cmfadf_CmArray,
-                               Cmfadf_nAlphaArray,
-                               Cmfadf_ndf);
-         aeroPitchParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cmfadf = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Cmfadf) and 
+             conversion factors; function returns array of 
+             flap deflections (dfArray) and corresponding 
+             alpha (aArray) and delta Cm (CmArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (ndf) */
+          uiuc_2DdataFileReader(Cmfadf,
+                                Cmfadf_aArray,
+                                Cmfadf_dfArray,
+                                Cmfadf_CmArray,
+                                Cmfadf_nAlphaArray,
+                                Cmfadf_ndf);
+          aeroPitchParts -> storeCommands (*command_line);
+          break;
+        }
       case Cmfabetaf_flag:
-       {
-         int Cmfabetaf_index, i;
-         string Cmfabetaf_file;
-         double flap_value;
-         Cmfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> Cmfabetaf_index;
-         if (Cmfabetaf_index < 0 || Cmfabetaf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cmfabetaf_index > Cmfabetaf_nf)
-           Cmfabetaf_nf = Cmfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cmfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cmfabetaf_fArray[Cmfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cmfabetaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cmfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cmfabetaf_aArray, Cmfabetaf_index);
-         d_1_to_2(datafile_yArray, Cmfabetaf_betaArray, Cmfabetaf_index);
-         d_2_to_3(datafile_zArray, Cmfabetaf_CmArray, Cmfabetaf_index);
-         i_1_to_2(datafile_nxArray, Cmfabetaf_nAlphaArray, Cmfabetaf_index);
-         Cmfabetaf_nbeta[Cmfabetaf_index] = datafile_ny;
-         if (Cmfabetaf_first==true)
-           {
-             if (Cmfabetaf_nice == 1)
-               {
-                 Cmfabetaf_na_nice = datafile_nxArray[1];
-                 Cmfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cmfabetaf_bArray_nice);
-                 for (i=1; i<=Cmfabetaf_na_nice; i++)
-                   Cmfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroPitchParts -> storeCommands (*command_line);
-             Cmfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int Cmfabetaf_index, i;
+          string Cmfabetaf_file;
+          double flap_value;
+          Cmfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> Cmfabetaf_index;
+          if (Cmfabetaf_index < 0 || Cmfabetaf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cmfabetaf_index > Cmfabetaf_nf)
+            Cmfabetaf_nf = Cmfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cmfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cmfabetaf_fArray[Cmfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cmfabetaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cmfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cmfabetaf_aArray, Cmfabetaf_index);
+          d_1_to_2(datafile_yArray, Cmfabetaf_betaArray, Cmfabetaf_index);
+          d_2_to_3(datafile_zArray, Cmfabetaf_CmArray, Cmfabetaf_index);
+          i_1_to_2(datafile_nxArray, Cmfabetaf_nAlphaArray, Cmfabetaf_index);
+          Cmfabetaf_nbeta[Cmfabetaf_index] = datafile_ny;
+          if (Cmfabetaf_first==true)
+            {
+              if (Cmfabetaf_nice == 1)
+                {
+                  Cmfabetaf_na_nice = datafile_nxArray[1];
+                  Cmfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cmfabetaf_bArray_nice);
+                  for (i=1; i<=Cmfabetaf_na_nice; i++)
+                    Cmfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroPitchParts -> storeCommands (*command_line);
+              Cmfabetaf_first=false;
+            }
+          break;
+        }
       case Cmfadef_flag:
-       {
-         int Cmfadef_index, i;
-         string Cmfadef_file;
-         double flap_value;
-         Cmfadef_file = aircraft_directory + linetoken3;
-         token4 >> Cmfadef_index;
-         if (Cmfadef_index < 0 || Cmfadef_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cmfadef_index > Cmfadef_nf)
-           Cmfadef_nf = Cmfadef_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cmfadef_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cmfadef_fArray[Cmfadef_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cmfadef_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cmfadef_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cmfadef_aArray, Cmfadef_index);
-         d_1_to_2(datafile_yArray, Cmfadef_deArray, Cmfadef_index);
-         d_2_to_3(datafile_zArray, Cmfadef_CmArray, Cmfadef_index);
-         i_1_to_2(datafile_nxArray, Cmfadef_nAlphaArray, Cmfadef_index);
-         Cmfadef_nde[Cmfadef_index] = datafile_ny;
-         if (Cmfadef_first==true)
-           {
-             if (Cmfadef_nice == 1)
-               {
-                 Cmfadef_na_nice = datafile_nxArray[1];
-                 Cmfadef_nde_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cmfadef_deArray_nice);
-                 for (i=1; i<=Cmfadef_na_nice; i++)
-                   Cmfadef_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroPitchParts -> storeCommands (*command_line);
-             Cmfadef_first=false;
-           }
-         break;
-       }
+        {
+          int Cmfadef_index, i;
+          string Cmfadef_file;
+          double flap_value;
+          Cmfadef_file = aircraft_directory + linetoken3;
+          token4 >> Cmfadef_index;
+          if (Cmfadef_index < 0 || Cmfadef_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cmfadef_index > Cmfadef_nf)
+            Cmfadef_nf = Cmfadef_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cmfadef_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cmfadef_fArray[Cmfadef_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cmfadef_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cmfadef_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cmfadef_aArray, Cmfadef_index);
+          d_1_to_2(datafile_yArray, Cmfadef_deArray, Cmfadef_index);
+          d_2_to_3(datafile_zArray, Cmfadef_CmArray, Cmfadef_index);
+          i_1_to_2(datafile_nxArray, Cmfadef_nAlphaArray, Cmfadef_index);
+          Cmfadef_nde[Cmfadef_index] = datafile_ny;
+          if (Cmfadef_first==true)
+            {
+              if (Cmfadef_nice == 1)
+                {
+                  Cmfadef_na_nice = datafile_nxArray[1];
+                  Cmfadef_nde_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cmfadef_deArray_nice);
+                  for (i=1; i<=Cmfadef_na_nice; i++)
+                    Cmfadef_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroPitchParts -> storeCommands (*command_line);
+              Cmfadef_first=false;
+            }
+          break;
+        }
       case Cmfaqf_flag:
-       {
-         int Cmfaqf_index, i;
-         string Cmfaqf_file;
-         double flap_value;
-         Cmfaqf_file = aircraft_directory + linetoken3;
-         token4 >> Cmfaqf_index;
-         if (Cmfaqf_index < 0 || Cmfaqf_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cmfaqf_index > Cmfaqf_nf)
-           Cmfaqf_nf = Cmfaqf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cmfaqf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cmfaqf_fArray[Cmfaqf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cmfaqf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cmfaqf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cmfaqf_aArray, Cmfaqf_index);
-         d_1_to_2(datafile_yArray, Cmfaqf_qArray, Cmfaqf_index);
-         d_2_to_3(datafile_zArray, Cmfaqf_CmArray, Cmfaqf_index);
-         i_1_to_2(datafile_nxArray, Cmfaqf_nAlphaArray, Cmfaqf_index);
-         Cmfaqf_nq[Cmfaqf_index] = datafile_ny;
-         if (Cmfaqf_first==true)
-           {
-             if (Cmfaqf_nice == 1)
-               {
-                 Cmfaqf_na_nice = datafile_nxArray[1];
-                 Cmfaqf_nq_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cmfaqf_qArray_nice);
-                 for (i=1; i<=Cmfaqf_na_nice; i++)
-                   Cmfaqf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroPitchParts -> storeCommands (*command_line);
-             Cmfaqf_first=false;
-           }
-         break;
-       }
+        {
+          int Cmfaqf_index, i;
+          string Cmfaqf_file;
+          double flap_value;
+          Cmfaqf_file = aircraft_directory + linetoken3;
+          token4 >> Cmfaqf_index;
+          if (Cmfaqf_index < 0 || Cmfaqf_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cmfaqf_index > Cmfaqf_nf)
+            Cmfaqf_nf = Cmfaqf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cmfaqf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cmfaqf_fArray[Cmfaqf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cmfaqf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cmfaqf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cmfaqf_aArray, Cmfaqf_index);
+          d_1_to_2(datafile_yArray, Cmfaqf_qArray, Cmfaqf_index);
+          d_2_to_3(datafile_zArray, Cmfaqf_CmArray, Cmfaqf_index);
+          i_1_to_2(datafile_nxArray, Cmfaqf_nAlphaArray, Cmfaqf_index);
+          Cmfaqf_nq[Cmfaqf_index] = datafile_ny;
+          if (Cmfaqf_first==true)
+            {
+              if (Cmfaqf_nice == 1)
+                {
+                  Cmfaqf_na_nice = datafile_nxArray[1];
+                  Cmfaqf_nq_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cmfaqf_qArray_nice);
+                  for (i=1; i<=Cmfaqf_na_nice; i++)
+                    Cmfaqf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroPitchParts -> storeCommands (*command_line);
+              Cmfaqf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index f177df994e6232d50a54d7f90f96ffa39bac1330..3772bfef79511186d9358aaa93612a508496ca3c 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_Cm( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CM_H_
index cdd5977468ef23bdc8eeae9a25dfaac68e7b4e48..dac41b1a47330e7d0aa732cc57846cd9d8f9c294 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_Cn( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -118,428 +118,428 @@ void parse_Cn( const string& linetoken2, const string& linetoken3,
     switch(Cn_map[linetoken2])
       {
       case Cno_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cno = token_value;
-         Cno_clean = Cno;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cno = token_value;
+          Cno_clean = Cno;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_beta = token_value;
-         Cn_beta_clean = Cn_beta;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_beta = token_value;
+          Cn_beta_clean = Cn_beta;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_p = token_value;
-         Cn_p_clean = Cn_p;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_p = token_value;
+          Cn_p_clean = Cn_p;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_r = token_value;
-         Cn_r_clean = Cn_r;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_r = token_value;
+          Cn_r_clean = Cn_r;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_da = token_value;
-         Cn_da_clean = Cn_da;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_da = token_value;
+          Cn_da_clean = Cn_da;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_dr = token_value;
-         Cn_dr_clean = Cn_dr;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_dr = token_value;
+          Cn_dr_clean = Cn_dr;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_q = token_value;
-         Cn_q_clean = Cn_q;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_q = token_value;
+          Cn_q_clean = Cn_q;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cn_b3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cn_b3 = token_value;
-         Cn_b3_clean = Cn_b3;
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cn_b3 = token_value;
+          Cn_b3_clean = Cn_b3;
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cnfada_flag:
-       {
-         Cnfada = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Cnfada) and 
-            conversion factors; function returns array of 
-            aileron deflections (daArray) and corresponding 
-            alpha (aArray) and delta Cn (CnArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nda) */
-         uiuc_2DdataFileReader(Cnfada,
-                               Cnfada_aArray,
-                               Cnfada_daArray,
-                               Cnfada_CnArray,
-                               Cnfada_nAlphaArray,
-                               Cnfada_nda);
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cnfada = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Cnfada) and 
+             conversion factors; function returns array of 
+             aileron deflections (daArray) and corresponding 
+             alpha (aArray) and delta Cn (CnArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nda) */
+          uiuc_2DdataFileReader(Cnfada,
+                                Cnfada_aArray,
+                                Cnfada_daArray,
+                                Cnfada_CnArray,
+                                Cnfada_nAlphaArray,
+                                Cnfada_nda);
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cnfbetadr_flag:
-       {
-         Cnfbetadr = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Cnfbetadr) and 
-            conversion factors; function returns array of 
-            rudder deflections (drArray) and corresponding 
-            beta (betaArray) and delta Cn (CnArray) values and 
-            max number of terms in beta arrays (nBetaArray) 
-            and deflection array (ndr) */
-         uiuc_2DdataFileReader(Cnfbetadr,
-                               Cnfbetadr_betaArray,
-                               Cnfbetadr_drArray,
-                               Cnfbetadr_CnArray,
-                               Cnfbetadr_nBetaArray,
-                               Cnfbetadr_ndr);
-         aeroYawParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Cnfbetadr = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Cnfbetadr) and 
+             conversion factors; function returns array of 
+             rudder deflections (drArray) and corresponding 
+             beta (betaArray) and delta Cn (CnArray) values and 
+             max number of terms in beta arrays (nBetaArray) 
+             and deflection array (ndr) */
+          uiuc_2DdataFileReader(Cnfbetadr,
+                                Cnfbetadr_betaArray,
+                                Cnfbetadr_drArray,
+                                Cnfbetadr_CnArray,
+                                Cnfbetadr_nBetaArray,
+                                Cnfbetadr_ndr);
+          aeroYawParts -> storeCommands (*command_line);
+          break;
+        }
       case Cnfabetaf_flag:
-       {
-         int Cnfabetaf_index, i;
-         string Cnfabetaf_file;
-         double flap_value;
-         Cnfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> Cnfabetaf_index;
-         if (Cnfabetaf_index < 0 || Cnfabetaf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cnfabetaf_index > Cnfabetaf_nf)
-           Cnfabetaf_nf = Cnfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cnfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cnfabetaf_fArray[Cnfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cnfabetaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cnfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cnfabetaf_aArray, Cnfabetaf_index);
-         d_1_to_2(datafile_yArray, Cnfabetaf_betaArray, Cnfabetaf_index);
-         d_2_to_3(datafile_zArray, Cnfabetaf_CnArray, Cnfabetaf_index);
-         i_1_to_2(datafile_nxArray, Cnfabetaf_nAlphaArray, Cnfabetaf_index);
-         Cnfabetaf_nbeta[Cnfabetaf_index] = datafile_ny;
-         if (Cnfabetaf_first==true)
-           {
-             if (Cnfabetaf_nice == 1)
-               {
-                 Cnfabetaf_na_nice = datafile_nxArray[1];
-                 Cnfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cnfabetaf_bArray_nice);
-                 for (i=1; i<=Cnfabetaf_na_nice; i++)
-                   Cnfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroYawParts -> storeCommands (*command_line);
-             Cnfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int Cnfabetaf_index, i;
+          string Cnfabetaf_file;
+          double flap_value;
+          Cnfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> Cnfabetaf_index;
+          if (Cnfabetaf_index < 0 || Cnfabetaf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cnfabetaf_index > Cnfabetaf_nf)
+            Cnfabetaf_nf = Cnfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cnfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cnfabetaf_fArray[Cnfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cnfabetaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cnfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cnfabetaf_aArray, Cnfabetaf_index);
+          d_1_to_2(datafile_yArray, Cnfabetaf_betaArray, Cnfabetaf_index);
+          d_2_to_3(datafile_zArray, Cnfabetaf_CnArray, Cnfabetaf_index);
+          i_1_to_2(datafile_nxArray, Cnfabetaf_nAlphaArray, Cnfabetaf_index);
+          Cnfabetaf_nbeta[Cnfabetaf_index] = datafile_ny;
+          if (Cnfabetaf_first==true)
+            {
+              if (Cnfabetaf_nice == 1)
+                {
+                  Cnfabetaf_na_nice = datafile_nxArray[1];
+                  Cnfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cnfabetaf_bArray_nice);
+                  for (i=1; i<=Cnfabetaf_na_nice; i++)
+                    Cnfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroYawParts -> storeCommands (*command_line);
+              Cnfabetaf_first=false;
+            }
+          break;
+        }
       case Cnfadaf_flag:
-       {
-         int Cnfadaf_index, i;
-         string Cnfadaf_file;
-         double flap_value;
-         Cnfadaf_file = aircraft_directory + linetoken3;
-         token4 >> Cnfadaf_index;
-         if (Cnfadaf_index < 0 || Cnfadaf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cnfadaf_index > Cnfadaf_nf)
-           Cnfadaf_nf = Cnfadaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cnfadaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cnfadaf_fArray[Cnfadaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cnfadaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cnfadaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cnfadaf_aArray, Cnfadaf_index);
-         d_1_to_2(datafile_yArray, Cnfadaf_daArray, Cnfadaf_index);
-         d_2_to_3(datafile_zArray, Cnfadaf_CnArray, Cnfadaf_index);
-         i_1_to_2(datafile_nxArray, Cnfadaf_nAlphaArray, Cnfadaf_index);
-         Cnfadaf_nda[Cnfadaf_index] = datafile_ny;
-         if (Cnfadaf_first==true)
-           {
-             if (Cnfadaf_nice == 1)
-               {
-                 Cnfadaf_na_nice = datafile_nxArray[1];
-                 Cnfadaf_nda_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cnfadaf_daArray_nice);
-                 for (i=1; i<=Cnfadaf_na_nice; i++)
-                   Cnfadaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroYawParts -> storeCommands (*command_line);
-             Cnfadaf_first=false;
-           }
-         break;
-       }
+        {
+          int Cnfadaf_index, i;
+          string Cnfadaf_file;
+          double flap_value;
+          Cnfadaf_file = aircraft_directory + linetoken3;
+          token4 >> Cnfadaf_index;
+          if (Cnfadaf_index < 0 || Cnfadaf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cnfadaf_index > Cnfadaf_nf)
+            Cnfadaf_nf = Cnfadaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cnfadaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cnfadaf_fArray[Cnfadaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cnfadaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cnfadaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cnfadaf_aArray, Cnfadaf_index);
+          d_1_to_2(datafile_yArray, Cnfadaf_daArray, Cnfadaf_index);
+          d_2_to_3(datafile_zArray, Cnfadaf_CnArray, Cnfadaf_index);
+          i_1_to_2(datafile_nxArray, Cnfadaf_nAlphaArray, Cnfadaf_index);
+          Cnfadaf_nda[Cnfadaf_index] = datafile_ny;
+          if (Cnfadaf_first==true)
+            {
+              if (Cnfadaf_nice == 1)
+                {
+                  Cnfadaf_na_nice = datafile_nxArray[1];
+                  Cnfadaf_nda_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cnfadaf_daArray_nice);
+                  for (i=1; i<=Cnfadaf_na_nice; i++)
+                    Cnfadaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroYawParts -> storeCommands (*command_line);
+              Cnfadaf_first=false;
+            }
+          break;
+        }
       case Cnfadrf_flag:
-       {
-         int Cnfadrf_index, i;
-         string Cnfadrf_file;
-         double flap_value;
-         Cnfadrf_file = aircraft_directory + linetoken3;
-         token4 >> Cnfadrf_index;
-         if (Cnfadrf_index < 0 || Cnfadrf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cnfadrf_index > Cnfadrf_nf)
-           Cnfadrf_nf = Cnfadrf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cnfadrf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cnfadrf_fArray[Cnfadrf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cnfadrf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cnfadrf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cnfadrf_aArray, Cnfadrf_index);
-         d_1_to_2(datafile_yArray, Cnfadrf_drArray, Cnfadrf_index);
-         d_2_to_3(datafile_zArray, Cnfadrf_CnArray, Cnfadrf_index);
-         i_1_to_2(datafile_nxArray, Cnfadrf_nAlphaArray, Cnfadrf_index);
-         Cnfadrf_ndr[Cnfadrf_index] = datafile_ny;
-         if (Cnfadrf_first==true)
-           {
-             if (Cnfadrf_nice == 1)
-               {
-                 Cnfadrf_na_nice = datafile_nxArray[1];
-                 Cnfadrf_ndr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cnfadrf_drArray_nice);
-                 for (i=1; i<=Cnfadrf_na_nice; i++)
-                   Cnfadrf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroYawParts -> storeCommands (*command_line);
-             Cnfadrf_first=false;
-           }
-         break;
-       }
+        {
+          int Cnfadrf_index, i;
+          string Cnfadrf_file;
+          double flap_value;
+          Cnfadrf_file = aircraft_directory + linetoken3;
+          token4 >> Cnfadrf_index;
+          if (Cnfadrf_index < 0 || Cnfadrf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cnfadrf_index > Cnfadrf_nf)
+            Cnfadrf_nf = Cnfadrf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cnfadrf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cnfadrf_fArray[Cnfadrf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cnfadrf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cnfadrf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cnfadrf_aArray, Cnfadrf_index);
+          d_1_to_2(datafile_yArray, Cnfadrf_drArray, Cnfadrf_index);
+          d_2_to_3(datafile_zArray, Cnfadrf_CnArray, Cnfadrf_index);
+          i_1_to_2(datafile_nxArray, Cnfadrf_nAlphaArray, Cnfadrf_index);
+          Cnfadrf_ndr[Cnfadrf_index] = datafile_ny;
+          if (Cnfadrf_first==true)
+            {
+              if (Cnfadrf_nice == 1)
+                {
+                  Cnfadrf_na_nice = datafile_nxArray[1];
+                  Cnfadrf_ndr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cnfadrf_drArray_nice);
+                  for (i=1; i<=Cnfadrf_na_nice; i++)
+                    Cnfadrf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroYawParts -> storeCommands (*command_line);
+              Cnfadrf_first=false;
+            }
+          break;
+        }
       case Cnfapf_flag:
-       {
-         int Cnfapf_index, i;
-         string Cnfapf_file;
-         double flap_value;
-         Cnfapf_file = aircraft_directory + linetoken3;
-         token4 >> Cnfapf_index;
-         if (Cnfapf_index < 0 || Cnfapf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cnfapf_index > Cnfapf_nf)
-           Cnfapf_nf = Cnfapf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cnfapf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cnfapf_fArray[Cnfapf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cnfapf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cnfapf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cnfapf_aArray, Cnfapf_index);
-         d_1_to_2(datafile_yArray, Cnfapf_pArray, Cnfapf_index);
-         d_2_to_3(datafile_zArray, Cnfapf_CnArray, Cnfapf_index);
-         i_1_to_2(datafile_nxArray, Cnfapf_nAlphaArray, Cnfapf_index);
-         Cnfapf_np[Cnfapf_index] = datafile_ny;
-         if (Cnfapf_first==true)
-           {
-             if (Cnfapf_nice == 1)
-               {
-                 Cnfapf_na_nice = datafile_nxArray[1];
-                 Cnfapf_np_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cnfapf_pArray_nice);
-                 for (i=1; i<=Cnfapf_na_nice; i++)
-                   Cnfapf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroYawParts -> storeCommands (*command_line);
-             Cnfapf_first=false;
-           }
-         break;
-       }
+        {
+          int Cnfapf_index, i;
+          string Cnfapf_file;
+          double flap_value;
+          Cnfapf_file = aircraft_directory + linetoken3;
+          token4 >> Cnfapf_index;
+          if (Cnfapf_index < 0 || Cnfapf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cnfapf_index > Cnfapf_nf)
+            Cnfapf_nf = Cnfapf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cnfapf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cnfapf_fArray[Cnfapf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cnfapf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cnfapf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cnfapf_aArray, Cnfapf_index);
+          d_1_to_2(datafile_yArray, Cnfapf_pArray, Cnfapf_index);
+          d_2_to_3(datafile_zArray, Cnfapf_CnArray, Cnfapf_index);
+          i_1_to_2(datafile_nxArray, Cnfapf_nAlphaArray, Cnfapf_index);
+          Cnfapf_np[Cnfapf_index] = datafile_ny;
+          if (Cnfapf_first==true)
+            {
+              if (Cnfapf_nice == 1)
+                {
+                  Cnfapf_na_nice = datafile_nxArray[1];
+                  Cnfapf_np_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cnfapf_pArray_nice);
+                  for (i=1; i<=Cnfapf_na_nice; i++)
+                    Cnfapf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroYawParts -> storeCommands (*command_line);
+              Cnfapf_first=false;
+            }
+          break;
+        }
       case Cnfarf_flag:
-       {
-         int Cnfarf_index, i;
-         string Cnfarf_file;
-         double flap_value;
-         Cnfarf_file = aircraft_directory + linetoken3;
-         token4 >> Cnfarf_index;
-         if (Cnfarf_index < 0 || Cnfarf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Cnfarf_index > Cnfarf_nf)
-           Cnfarf_nf = Cnfarf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Cnfarf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Cnfarf_fArray[Cnfarf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Cnfarf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Cnfarf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Cnfarf_aArray, Cnfarf_index);
-         d_1_to_2(datafile_yArray, Cnfarf_rArray, Cnfarf_index);
-         d_2_to_3(datafile_zArray, Cnfarf_CnArray, Cnfarf_index);
-         i_1_to_2(datafile_nxArray, Cnfarf_nAlphaArray, Cnfarf_index);
-         Cnfarf_nr[Cnfarf_index] = datafile_ny;
-         if (Cnfarf_first==true)
-           {
-             if (Cnfarf_nice == 1)
-               {
-                 Cnfarf_na_nice = datafile_nxArray[1];
-                 Cnfarf_nr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Cnfarf_rArray_nice);
-                 for (i=1; i<=Cnfarf_na_nice; i++)
-                   Cnfarf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroYawParts -> storeCommands (*command_line);
-             Cnfarf_first=false;
-           }
-         break;
-       }
+        {
+          int Cnfarf_index, i;
+          string Cnfarf_file;
+          double flap_value;
+          Cnfarf_file = aircraft_directory + linetoken3;
+          token4 >> Cnfarf_index;
+          if (Cnfarf_index < 0 || Cnfarf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Cnfarf_index > Cnfarf_nf)
+            Cnfarf_nf = Cnfarf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Cnfarf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Cnfarf_fArray[Cnfarf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Cnfarf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Cnfarf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Cnfarf_aArray, Cnfarf_index);
+          d_1_to_2(datafile_yArray, Cnfarf_rArray, Cnfarf_index);
+          d_2_to_3(datafile_zArray, Cnfarf_CnArray, Cnfarf_index);
+          i_1_to_2(datafile_nxArray, Cnfarf_nAlphaArray, Cnfarf_index);
+          Cnfarf_nr[Cnfarf_index] = datafile_ny;
+          if (Cnfarf_first==true)
+            {
+              if (Cnfarf_nice == 1)
+                {
+                  Cnfarf_na_nice = datafile_nxArray[1];
+                  Cnfarf_nr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Cnfarf_rArray_nice);
+                  for (i=1; i<=Cnfarf_na_nice; i++)
+                    Cnfarf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroYawParts -> storeCommands (*command_line);
+              Cnfarf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 79bd66ec45a7e1baeaa7effceaa6b2c2817498c5..8b4da0be3e70e05c2080dd2e6c3e1d678e42d0ab 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_Cn( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CN_H_
index 6161df2cbdb3780b01008df5141e63539f80f5e3..7ffc58ac0de0d695f518ddbc1ff5646791d26c24 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_Cl( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line ) {
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -118,416 +118,416 @@ void parse_Cl( const string& linetoken2, const string& linetoken3,
     switch(Cl_map[linetoken2])
       {
       case Clo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Clo = token_value;
-         Clo_clean = Clo;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Clo = token_value;
+          Clo_clean = Clo;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_beta = token_value;
-         Cl_beta_clean = Cl_beta;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_beta = token_value;
+          Cl_beta_clean = Cl_beta;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_p = token_value;
-         Cl_p_clean = Cl_p;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_p = token_value;
+          Cl_p_clean = Cl_p;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_r = token_value;
-         Cl_r_clean = Cl_r;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_r = token_value;
+          Cl_r_clean = Cl_r;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_da = token_value;
-         Cl_da_clean = Cl_da;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_da = token_value;
+          Cl_da_clean = Cl_da;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_dr = token_value;
-         Cl_dr_clean = Cl_dr;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_dr = token_value;
+          Cl_dr_clean = Cl_dr;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Cl_daa_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Cl_daa = token_value;
-         Cl_daa_clean = Cl_daa;
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Cl_daa = token_value;
+          Cl_daa_clean = Cl_daa;
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Clfada_flag:
-       {
-         Clfada = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Clfada) and 
-            conversion factors; function returns array of 
-            aileron deflections (daArray) and corresponding 
-            alpha (aArray) and delta Cl (ClArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and deflection array (nda) */
-         uiuc_2DdataFileReader(Clfada,
-                               Clfada_aArray,
-                               Clfada_daArray,
-                               Clfada_ClArray,
-                               Clfada_nAlphaArray,
-                               Clfada_nda);
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Clfada = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Clfada) and 
+             conversion factors; function returns array of 
+             aileron deflections (daArray) and corresponding 
+             alpha (aArray) and delta Cl (ClArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and deflection array (nda) */
+          uiuc_2DdataFileReader(Clfada,
+                                Clfada_aArray,
+                                Clfada_daArray,
+                                Clfada_ClArray,
+                                Clfada_nAlphaArray,
+                                Clfada_nda);
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Clfbetadr_flag:
-       {
-         Clfbetadr = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         token6 >> token_value_convert3;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         /* call 2D File Reader with file name (Clfbetadr) and 
-            conversion factors; function returns array of 
-            rudder deflections (drArray) and corresponding 
-            beta (betaArray) and delta Cl (ClArray) values and 
-            max number of terms in beta arrays (nBetaArray) 
-            and deflection array (ndr) */
-         uiuc_2DdataFileReader(Clfbetadr,
-                               Clfbetadr_betaArray,
-                               Clfbetadr_drArray,
-                               Clfbetadr_ClArray,
-                               Clfbetadr_nBetaArray,
-                               Clfbetadr_ndr);
-         aeroRollParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          Clfbetadr = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          token6 >> token_value_convert3;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          /* call 2D File Reader with file name (Clfbetadr) and 
+             conversion factors; function returns array of 
+             rudder deflections (drArray) and corresponding 
+             beta (betaArray) and delta Cl (ClArray) values and 
+             max number of terms in beta arrays (nBetaArray) 
+             and deflection array (ndr) */
+          uiuc_2DdataFileReader(Clfbetadr,
+                                Clfbetadr_betaArray,
+                                Clfbetadr_drArray,
+                                Clfbetadr_ClArray,
+                                Clfbetadr_nBetaArray,
+                                Clfbetadr_ndr);
+          aeroRollParts -> storeCommands (*command_line);
+          break;
+        }
       case Clfabetaf_flag:
-       {
-         int Clfabetaf_index, i;
-         string Clfabetaf_file;
-         double flap_value;
-         Clfabetaf_file = aircraft_directory + linetoken3;
-         token4 >> Clfabetaf_index;
-         if (Clfabetaf_index < 0 || Clfabetaf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Clfabetaf_index > Clfabetaf_nf)
-           Clfabetaf_nf = Clfabetaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Clfabetaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Clfabetaf_fArray[Clfabetaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Clfabetaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Clfabetaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Clfabetaf_aArray, Clfabetaf_index);
-         d_1_to_2(datafile_yArray, Clfabetaf_betaArray, Clfabetaf_index);
-         d_2_to_3(datafile_zArray, Clfabetaf_ClArray, Clfabetaf_index);
-         i_1_to_2(datafile_nxArray, Clfabetaf_nAlphaArray, Clfabetaf_index);
-         Clfabetaf_nbeta[Clfabetaf_index] = datafile_ny;
-         if (Clfabetaf_first==true)
-           {
-             if (Clfabetaf_nice == 1)
-               {
-                 Clfabetaf_na_nice = datafile_nxArray[1];
-                 Clfabetaf_nb_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Clfabetaf_bArray_nice);
-                 for (i=1; i<=Clfabetaf_na_nice; i++)
-                   Clfabetaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroRollParts -> storeCommands (*command_line);
-             Clfabetaf_first=false;
-           }
-         break;
-       }
+        {
+          int Clfabetaf_index, i;
+          string Clfabetaf_file;
+          double flap_value;
+          Clfabetaf_file = aircraft_directory + linetoken3;
+          token4 >> Clfabetaf_index;
+          if (Clfabetaf_index < 0 || Clfabetaf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Clfabetaf_index > Clfabetaf_nf)
+            Clfabetaf_nf = Clfabetaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Clfabetaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Clfabetaf_fArray[Clfabetaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Clfabetaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Clfabetaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Clfabetaf_aArray, Clfabetaf_index);
+          d_1_to_2(datafile_yArray, Clfabetaf_betaArray, Clfabetaf_index);
+          d_2_to_3(datafile_zArray, Clfabetaf_ClArray, Clfabetaf_index);
+          i_1_to_2(datafile_nxArray, Clfabetaf_nAlphaArray, Clfabetaf_index);
+          Clfabetaf_nbeta[Clfabetaf_index] = datafile_ny;
+          if (Clfabetaf_first==true)
+            {
+              if (Clfabetaf_nice == 1)
+                {
+                  Clfabetaf_na_nice = datafile_nxArray[1];
+                  Clfabetaf_nb_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Clfabetaf_bArray_nice);
+                  for (i=1; i<=Clfabetaf_na_nice; i++)
+                    Clfabetaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroRollParts -> storeCommands (*command_line);
+              Clfabetaf_first=false;
+            }
+          break;
+        }
       case Clfadaf_flag:
-       {
-         int Clfadaf_index, i;
-         string Clfadaf_file;
-         double flap_value;
-         Clfadaf_file = aircraft_directory + linetoken3;
-         token4 >> Clfadaf_index;
-         if (Clfadaf_index < 0 || Clfadaf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Clfadaf_index > Clfadaf_nf)
-           Clfadaf_nf = Clfadaf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Clfadaf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Clfadaf_fArray[Clfadaf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Clfadaf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Clfadaf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Clfadaf_aArray, Clfadaf_index);
-         d_1_to_2(datafile_yArray, Clfadaf_daArray, Clfadaf_index);
-         d_2_to_3(datafile_zArray, Clfadaf_ClArray, Clfadaf_index);
-         i_1_to_2(datafile_nxArray, Clfadaf_nAlphaArray, Clfadaf_index);
-         Clfadaf_nda[Clfadaf_index] = datafile_ny;
-         if (Clfadaf_first==true)
-           {
-             if (Clfadaf_nice == 1)
-               {
-                 Clfadaf_na_nice = datafile_nxArray[1];
-                 Clfadaf_nda_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Clfadaf_daArray_nice);
-                 for (i=1; i<=Clfadaf_na_nice; i++)
-                   Clfadaf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroRollParts -> storeCommands (*command_line);
-             Clfadaf_first=false;
-           }
-         break;
-       }
+        {
+          int Clfadaf_index, i;
+          string Clfadaf_file;
+          double flap_value;
+          Clfadaf_file = aircraft_directory + linetoken3;
+          token4 >> Clfadaf_index;
+          if (Clfadaf_index < 0 || Clfadaf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Clfadaf_index > Clfadaf_nf)
+            Clfadaf_nf = Clfadaf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Clfadaf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Clfadaf_fArray[Clfadaf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Clfadaf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Clfadaf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Clfadaf_aArray, Clfadaf_index);
+          d_1_to_2(datafile_yArray, Clfadaf_daArray, Clfadaf_index);
+          d_2_to_3(datafile_zArray, Clfadaf_ClArray, Clfadaf_index);
+          i_1_to_2(datafile_nxArray, Clfadaf_nAlphaArray, Clfadaf_index);
+          Clfadaf_nda[Clfadaf_index] = datafile_ny;
+          if (Clfadaf_first==true)
+            {
+              if (Clfadaf_nice == 1)
+                {
+                  Clfadaf_na_nice = datafile_nxArray[1];
+                  Clfadaf_nda_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Clfadaf_daArray_nice);
+                  for (i=1; i<=Clfadaf_na_nice; i++)
+                    Clfadaf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroRollParts -> storeCommands (*command_line);
+              Clfadaf_first=false;
+            }
+          break;
+        }
       case Clfadrf_flag:
-       {
-         int Clfadrf_index, i;
-         string Clfadrf_file;
-         double flap_value;
-         Clfadrf_file = aircraft_directory + linetoken3;
-         token4 >> Clfadrf_index;
-         if (Clfadrf_index < 0 || Clfadrf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Clfadrf_index > Clfadrf_nf)
-           Clfadrf_nf = Clfadrf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Clfadrf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Clfadrf_fArray[Clfadrf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Clfadrf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Clfadrf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Clfadrf_aArray, Clfadrf_index);
-         d_1_to_2(datafile_yArray, Clfadrf_drArray, Clfadrf_index);
-         d_2_to_3(datafile_zArray, Clfadrf_ClArray, Clfadrf_index);
-         i_1_to_2(datafile_nxArray, Clfadrf_nAlphaArray, Clfadrf_index);
-         Clfadrf_ndr[Clfadrf_index] = datafile_ny;
-         if (Clfadrf_first==true)
-           {
-             if (Clfadrf_nice == 1)
-               {
-                 Clfadrf_na_nice = datafile_nxArray[1];
-                 Clfadrf_ndr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Clfadrf_drArray_nice);
-                 for (i=1; i<=Clfadrf_na_nice; i++)
-                   Clfadrf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroRollParts -> storeCommands (*command_line);
-             Clfadrf_first=false;
-           }
-         break;
-       }
+        {
+          int Clfadrf_index, i;
+          string Clfadrf_file;
+          double flap_value;
+          Clfadrf_file = aircraft_directory + linetoken3;
+          token4 >> Clfadrf_index;
+          if (Clfadrf_index < 0 || Clfadrf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Clfadrf_index > Clfadrf_nf)
+            Clfadrf_nf = Clfadrf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Clfadrf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Clfadrf_fArray[Clfadrf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Clfadrf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Clfadrf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Clfadrf_aArray, Clfadrf_index);
+          d_1_to_2(datafile_yArray, Clfadrf_drArray, Clfadrf_index);
+          d_2_to_3(datafile_zArray, Clfadrf_ClArray, Clfadrf_index);
+          i_1_to_2(datafile_nxArray, Clfadrf_nAlphaArray, Clfadrf_index);
+          Clfadrf_ndr[Clfadrf_index] = datafile_ny;
+          if (Clfadrf_first==true)
+            {
+              if (Clfadrf_nice == 1)
+                {
+                  Clfadrf_na_nice = datafile_nxArray[1];
+                  Clfadrf_ndr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Clfadrf_drArray_nice);
+                  for (i=1; i<=Clfadrf_na_nice; i++)
+                    Clfadrf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroRollParts -> storeCommands (*command_line);
+              Clfadrf_first=false;
+            }
+          break;
+        }
       case Clfapf_flag:
-       {
-         int Clfapf_index, i;
-         string Clfapf_file;
-         double flap_value;
-         Clfapf_file = aircraft_directory + linetoken3;
-         token4 >> Clfapf_index;
-         if (Clfapf_index < 0 || Clfapf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Clfapf_index > Clfapf_nf)
-           Clfapf_nf = Clfapf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Clfapf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Clfapf_fArray[Clfapf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Clfapf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Clfapf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Clfapf_aArray, Clfapf_index);
-         d_1_to_2(datafile_yArray, Clfapf_pArray, Clfapf_index);
-         d_2_to_3(datafile_zArray, Clfapf_ClArray, Clfapf_index);
-         i_1_to_2(datafile_nxArray, Clfapf_nAlphaArray, Clfapf_index);
-         Clfapf_np[Clfapf_index] = datafile_ny;
-         if (Clfapf_first==true)
-           {
-             if (Clfapf_nice == 1)
-               {
-                 Clfapf_na_nice = datafile_nxArray[1];
-                 Clfapf_np_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Clfapf_pArray_nice);
-                 for (i=1; i<=Clfapf_na_nice; i++)
-                   Clfapf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroRollParts -> storeCommands (*command_line);
-             Clfapf_first=false;
-           }
-         break;
-       }
+        {
+          int Clfapf_index, i;
+          string Clfapf_file;
+          double flap_value;
+          Clfapf_file = aircraft_directory + linetoken3;
+          token4 >> Clfapf_index;
+          if (Clfapf_index < 0 || Clfapf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Clfapf_index > Clfapf_nf)
+            Clfapf_nf = Clfapf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Clfapf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Clfapf_fArray[Clfapf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Clfapf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Clfapf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Clfapf_aArray, Clfapf_index);
+          d_1_to_2(datafile_yArray, Clfapf_pArray, Clfapf_index);
+          d_2_to_3(datafile_zArray, Clfapf_ClArray, Clfapf_index);
+          i_1_to_2(datafile_nxArray, Clfapf_nAlphaArray, Clfapf_index);
+          Clfapf_np[Clfapf_index] = datafile_ny;
+          if (Clfapf_first==true)
+            {
+              if (Clfapf_nice == 1)
+                {
+                  Clfapf_na_nice = datafile_nxArray[1];
+                  Clfapf_np_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Clfapf_pArray_nice);
+                  for (i=1; i<=Clfapf_na_nice; i++)
+                    Clfapf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroRollParts -> storeCommands (*command_line);
+              Clfapf_first=false;
+            }
+          break;
+        }
       case Clfarf_flag:
-       {
-         int Clfarf_index, i;
-         string Clfarf_file;
-         double flap_value;
-         Clfarf_file = aircraft_directory + linetoken3;
-         token4 >> Clfarf_index;
-         if (Clfarf_index < 0 || Clfarf_index >= 100)
-           uiuc_warnings_errors(1, *command_line);
-         if (Clfarf_index > Clfarf_nf)
-           Clfarf_nf = Clfarf_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> Clfarf_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         Clfarf_fArray[Clfarf_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (Clfarf_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(Clfarf_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, Clfarf_aArray, Clfarf_index);
-         d_1_to_2(datafile_yArray, Clfarf_rArray, Clfarf_index);
-         d_2_to_3(datafile_zArray, Clfarf_ClArray, Clfarf_index);
-         i_1_to_2(datafile_nxArray, Clfarf_nAlphaArray, Clfarf_index);
-         Clfarf_nr[Clfarf_index] = datafile_ny;
-         if (Clfarf_first==true)
-           {
-             if (Clfarf_nice == 1)
-               {
-                 Clfarf_na_nice = datafile_nxArray[1];
-                 Clfarf_nr_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, Clfarf_rArray_nice);
-                 for (i=1; i<=Clfarf_na_nice; i++)
-                   Clfarf_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             aeroRollParts -> storeCommands (*command_line);
-             Clfarf_first=false;
-           }
-         break;
-       }
+        {
+          int Clfarf_index, i;
+          string Clfarf_file;
+          double flap_value;
+          Clfarf_file = aircraft_directory + linetoken3;
+          token4 >> Clfarf_index;
+          if (Clfarf_index < 0 || Clfarf_index >= 100)
+            uiuc_warnings_errors(1, *command_line);
+          if (Clfarf_index > Clfarf_nf)
+            Clfarf_nf = Clfarf_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> Clfarf_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          Clfarf_fArray[Clfarf_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (Clfarf_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(Clfarf_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, Clfarf_aArray, Clfarf_index);
+          d_1_to_2(datafile_yArray, Clfarf_rArray, Clfarf_index);
+          d_2_to_3(datafile_zArray, Clfarf_ClArray, Clfarf_index);
+          i_1_to_2(datafile_nxArray, Clfarf_nAlphaArray, Clfarf_index);
+          Clfarf_nr[Clfarf_index] = datafile_ny;
+          if (Clfarf_first==true)
+            {
+              if (Clfarf_nice == 1)
+                {
+                  Clfarf_na_nice = datafile_nxArray[1];
+                  Clfarf_nr_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, Clfarf_rArray_nice);
+                  for (i=1; i<=Clfarf_na_nice; i++)
+                    Clfarf_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              aeroRollParts -> storeCommands (*command_line);
+              Clfarf_first=false;
+            }
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index d0a2a7243a388b1c6ea7aefcccab980e3d4d5582..af98ba7a5a035838ae0c7898e917c4b65f47b446 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_Cl( const string& linetoken2, const string& linetoken3,
-              const string& linetoken4, const string& linetoken5, 
-              const string& linetoken6, const string& linetoken7,
-              const string& linetoken8, const string& linetoken9,
-              const string& linetoken10, const string& aircraft_directory,
-              LIST command_line );
+               const string& linetoken4, const string& linetoken5, 
+               const string& linetoken6, const string& linetoken7,
+               const string& linetoken8, const string& linetoken9,
+               const string& linetoken10, const string& aircraft_directory,
+               LIST command_line );
 
 #endif //_MENU_CROLL_H_
index 1a0c40947b183b6b08f33f92c20d66336db72948..62792291d785130e1a8683caac6342fb34a769b5 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -90,10 +90,10 @@ using std::exit;
 void parse_controlSurface( const string& linetoken2, const string& linetoken3,
                            const string& linetoken4, const string& linetoken5,
                            const string& linetoken6, const string& linetoken7, 
-                          const string& linetoken8, const string& linetoken9,
-                          const string& linetoken10, 
-                          const string& aircraft_directory, 
-                          LIST command_line ) {
+                           const string& linetoken8, const string& linetoken9,
+                           const string& linetoken10, 
+                           const string& aircraft_directory, 
+                           LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2;
     istringstream token3(linetoken3.c_str());
@@ -108,500 +108,500 @@ void parse_controlSurface( const string& linetoken2, const string& linetoken3,
     switch(controlSurface_map[linetoken2])
       {
       case de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         demax = token_value;
-         
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         demin = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          demax = token_value;
+          
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          demin = token_value;
+          break;
+        }
       case da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         damax = token_value;
-         
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         damin = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          damax = token_value;
+          
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          damin = token_value;
+          break;
+        }
       case dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         drmax = token_value;
-         
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         drmin = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          drmax = token_value;
+          
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          drmin = token_value;
+          break;
+        }
       case set_Long_trim_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         set_Long_trim = true;
-         elevator_tab = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          set_Long_trim = true;
+          elevator_tab = token_value;
+          break;
+        }
       case set_Long_trim_deg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         set_Long_trim = true;
-         elevator_tab = token_value * DEG_TO_RAD;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          set_Long_trim = true;
+          elevator_tab = token_value * DEG_TO_RAD;
+          break;
+        }
       case zero_Long_trim_flag:
-       {
-         zero_Long_trim = true;
-         break;
-       }
+        {
+          zero_Long_trim = true;
+          break;
+        }
       case elevator_step_flag:
-       {
-         // set step input flag
-         elevator_step = true;
-         
-         // read in step angle in degrees and convert
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_step_angle = token_value * DEG_TO_RAD;
-         
-         // read in step start time
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_step_startTime = token_value;
-         break;
-       }
+        {
+          // set step input flag
+          elevator_step = true;
+          
+          // read in step angle in degrees and convert
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_step_angle = token_value * DEG_TO_RAD;
+          
+          // read in step start time
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_step_startTime = token_value;
+          break;
+        }
       case elevator_singlet_flag:
-       {
-         // set singlet input flag
-         elevator_singlet = true;
-         
-         // read in singlet angle in degrees and convert
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_singlet_angle = token_value * DEG_TO_RAD;
-         
-         // read in singlet start time
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_singlet_startTime = token_value;
-         
-         // read in singlet duration
-         if (check_float(linetoken5))
-           token5 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_singlet_duration = token_value;
-         break;
-       }
+        {
+          // set singlet input flag
+          elevator_singlet = true;
+          
+          // read in singlet angle in degrees and convert
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_singlet_angle = token_value * DEG_TO_RAD;
+          
+          // read in singlet start time
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_singlet_startTime = token_value;
+          
+          // read in singlet duration
+          if (check_float(linetoken5))
+            token5 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_singlet_duration = token_value;
+          break;
+        }
       case elevator_doublet_flag:
-       {
-         // set doublet input flag
-         elevator_doublet = true;
-         
-         // read in doublet angle in degrees and convert
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_doublet_angle = token_value * DEG_TO_RAD;
-         
-         // read in doublet start time
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_doublet_startTime = token_value;
-         
-         // read in doublet duration
-         if (check_float(linetoken5))
-           token5 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         elevator_doublet_duration = token_value;
-         break;
-       }
+        {
+          // set doublet input flag
+          elevator_doublet = true;
+          
+          // read in doublet angle in degrees and convert
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_doublet_angle = token_value * DEG_TO_RAD;
+          
+          // read in doublet start time
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_doublet_startTime = token_value;
+          
+          // read in doublet duration
+          if (check_float(linetoken5))
+            token5 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          elevator_doublet_duration = token_value;
+          break;
+        }
       case elevator_input_flag:
-       {
-         elevator_input = true;
-         elevator_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(elevator_input_file,
-                               elevator_input_timeArray,
-                               elevator_input_deArray,
-                               elevator_input_ntime);
-         token6 >> token_value;
-         elevator_input_startTime = token_value;
-         break;
-       }
+        {
+          elevator_input = true;
+          elevator_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(elevator_input_file,
+                                elevator_input_timeArray,
+                                elevator_input_deArray,
+                                elevator_input_ntime);
+          token6 >> token_value;
+          elevator_input_startTime = token_value;
+          break;
+        }
       case aileron_input_flag:
-       {
-         aileron_input = true;
-         aileron_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(aileron_input_file,
-                               aileron_input_timeArray,
-                               aileron_input_daArray,
-                               aileron_input_ntime);
-         token6 >> token_value;
-         aileron_input_startTime = token_value;
-         break;
-       }
+        {
+          aileron_input = true;
+          aileron_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(aileron_input_file,
+                                aileron_input_timeArray,
+                                aileron_input_daArray,
+                                aileron_input_ntime);
+          token6 >> token_value;
+          aileron_input_startTime = token_value;
+          break;
+        }
       case rudder_input_flag:
-       {
-         rudder_input = true;
-         rudder_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(rudder_input_file,
-                               rudder_input_timeArray,
-                               rudder_input_drArray,
-                               rudder_input_ntime);
-         token6 >> token_value;
-         rudder_input_startTime = token_value;
-         break;
-       }
+        {
+          rudder_input = true;
+          rudder_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(rudder_input_file,
+                                rudder_input_timeArray,
+                                rudder_input_drArray,
+                                rudder_input_ntime);
+          token6 >> token_value;
+          rudder_input_startTime = token_value;
+          break;
+        }
       case flap_pos_input_flag:
-       {
-         flap_pos_input = true;
-         flap_pos_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(flap_pos_input_file,
-                               flap_pos_input_timeArray,
-                               flap_pos_input_dfArray,
-                               flap_pos_input_ntime);
-         token6 >> token_value;
-         flap_pos_input_startTime = token_value;
-         break;
-       }
+        {
+          flap_pos_input = true;
+          flap_pos_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(flap_pos_input_file,
+                                flap_pos_input_timeArray,
+                                flap_pos_input_dfArray,
+                                flap_pos_input_ntime);
+          token6 >> token_value;
+          flap_pos_input_startTime = token_value;
+          break;
+        }
       case pilot_elev_no_flag:
-       {
-         pilot_elev_no_check = true;
-         break;
-       }
+        {
+          pilot_elev_no_check = true;
+          break;
+        }
       case pilot_ail_no_flag:
-       {
-         pilot_ail_no_check = true;
-         break;
-       }
+        {
+          pilot_ail_no_check = true;
+          break;
+        }
       case pilot_rud_no_flag:
-       {
-         pilot_rud_no_check = true;
-         break;
-       }
+        {
+          pilot_rud_no_check = true;
+          break;
+        }
       case flap_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_flaps = true;
-         flap_max = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_flaps = true;
+          flap_max = token_value;
+          break;
+        }
       case flap_rate_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_flaps = true;
-         flap_rate = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_flaps = true;
+          flap_rate = token_value;
+          break;
+        }
       case spoiler_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_spoilers = true;
-         spoiler_max = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_spoilers = true;
+          spoiler_max = token_value;
+          break;
+        }
       case spoiler_rate_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_spoilers = true;
-         spoiler_rate = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_spoilers = true;
+          spoiler_rate = token_value;
+          break;
+        }
       case aileron_sas_KP_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         aileron_sas_KP = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          aileron_sas_KP = token_value;
+          break;
+        }
       case aileron_sas_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         aileron_sas_max = token_value;
-         use_aileron_sas_max = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          aileron_sas_max = token_value;
+          use_aileron_sas_max = true;
+          break;
+        }
       case aileron_stick_gain_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         aileron_stick_gain = token_value;
-         use_aileron_stick_gain = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          aileron_stick_gain = token_value;
+          use_aileron_stick_gain = true;
+          break;
+        }
       case elevator_sas_KQ_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         elevator_sas_KQ = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          elevator_sas_KQ = token_value;
+          break;
+        }
       case elevator_sas_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         elevator_sas_max = token_value;
-         use_elevator_sas_max = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          elevator_sas_max = token_value;
+          use_elevator_sas_max = true;
+          break;
+        }
       case elevator_sas_min_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         elevator_sas_min = token_value;
-         use_elevator_sas_min = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          elevator_sas_min = token_value;
+          use_elevator_sas_min = true;
+          break;
+        }
       case elevator_stick_gain_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         elevator_stick_gain = token_value;
-         use_elevator_stick_gain = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          elevator_stick_gain = token_value;
+          use_elevator_stick_gain = true;
+          break;
+        }
       case rudder_sas_KR_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         rudder_sas_KR = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          rudder_sas_KR = token_value;
+          break;
+        }
       case rudder_sas_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         rudder_sas_max = token_value;
-         use_rudder_sas_max = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          rudder_sas_max = token_value;
+          use_rudder_sas_max = true;
+          break;
+        }
       case rudder_stick_gain_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         rudder_stick_gain = token_value;
-         use_rudder_stick_gain = true;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          rudder_stick_gain = token_value;
+          use_rudder_stick_gain = true;
+          break;
+        }
       case use_aileron_sas_type1_flag:
-       {
-         use_aileron_sas_type1 = true;
-         break;
-       }
+        {
+          use_aileron_sas_type1 = true;
+          break;
+        }
       case use_elevator_sas_type1_flag:
-       {
-         use_elevator_sas_type1 = true;
-         break;
-       }
+        {
+          use_elevator_sas_type1 = true;
+          break;
+        }
       case use_rudder_sas_type1_flag:
-       {
-         use_rudder_sas_type1 = true;
-         break;
-       }
+        {
+          use_rudder_sas_type1 = true;
+          break;
+        }
       case ap_pah_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         ap_pah_start_time=token_value;
-         ap_pah_on = 1;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          ap_pah_start_time=token_value;
+          ap_pah_on = 1;
+          break;
+        }
       case ap_alh_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         ap_alh_start_time=token_value;
-         ap_alh_on = 1;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          ap_alh_start_time=token_value;
+          ap_alh_on = 1;
+          break;
+        }
       case ap_rah_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         ap_rah_start_time=token_value;
-         ap_rah_on = 1;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          ap_rah_start_time=token_value;
+          ap_rah_on = 1;
+          break;
+        }
       case ap_hh_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         ap_hh_start_time=token_value;
-         ap_hh_on = 1;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          ap_hh_start_time=token_value;
+          ap_hh_on = 1;
+          break;
+        }
       case ap_Theta_ref_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         token4 >> token_value_convert1;
-         convert_y = uiuc_convert(token_value_convert1);
-
-         ap_Theta_ref_rad = token_value * convert_y;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          token4 >> token_value_convert1;
+          convert_y = uiuc_convert(token_value_convert1);
+
+          ap_Theta_ref_rad = token_value * convert_y;
+          break;
+        }
       case ap_alt_ref_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-
-         ap_alt_ref_ft = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+
+          ap_alt_ref_ft = token_value;
+          break;
+        }
       case ap_Phi_ref_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         token4 >> token_value_convert1;
-         convert_y = uiuc_convert(token_value_convert1);
-
-         ap_Phi_ref_rad = token_value * convert_y;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          token4 >> token_value_convert1;
+          convert_y = uiuc_convert(token_value_convert1);
+
+          ap_Phi_ref_rad = token_value * convert_y;
+          break;
+        }
       case ap_Psi_ref_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         token4 >> token_value_convert1;
-         convert_y = uiuc_convert(token_value_convert1);
-
-         ap_Psi_ref_rad = token_value * convert_y;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          token4 >> token_value_convert1;
+          convert_y = uiuc_convert(token_value_convert1);
+
+          ap_Psi_ref_rad = token_value * convert_y;
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index df56e2f457ebf973b9b4fe86c02d7afcb7fb0479..f3049515780039de8e6e63f96b8298129897233e 100644 (file)
@@ -14,9 +14,9 @@
 void parse_controlSurface( const string& linetoken2, const string& linetoken3,
                            const string& linetoken4, const string& linetoken5,
                            const string& linetoken6, const string& linetoken7, 
-                          const string& linetoken8, const string& linetoken9,
-                          const string& linetoken10, 
-                          const string& aircraft_directory, 
-                          LIST command_line );
+                           const string& linetoken8, const string& linetoken9,
+                           const string& linetoken10, 
+                           const string& aircraft_directory, 
+                           LIST command_line );
 
 #endif //_MENU_CONTROLSURFACE_H_
index 96ede0e3650378f8d3cf1e5a6d755558ea046246..d2b1e431a6365e28db01138afd79ecadc3361422 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_engine( const string& linetoken2, const string& linetoken3,
-                  const string& linetoken4, const string& linetoken5, 
-                  const string& linetoken6, const string& linetoken7, 
-                  const string& linetoken8, const string& linetoken9,
-                  const string& linetoken10,const string& aircraft_directory,
-                  LIST command_line ) {
+                   const string& linetoken4, const string& linetoken5, 
+                   const string& linetoken6, const string& linetoken7, 
+                   const string& linetoken8, const string& linetoken9,
+                   const string& linetoken10,const string& aircraft_directory,
+                   LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2;
     istringstream token3(linetoken3.c_str());
@@ -107,375 +107,375 @@ void parse_engine( const string& linetoken2, const string& linetoken3,
     switch(engine_map[linetoken2])
       {
       case simpleSingle_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         simpleSingleMaxThrust = token_value; 
-         engineParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          simpleSingleMaxThrust = token_value; 
+          engineParts -> storeCommands (*command_line);
+          break;
+        }
       case simpleSingleModel_flag:
-       {
-         simpleSingleModel = true;
-         /* input the thrust at zero speed */
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         t_v0 = token_value; 
-         /* input slope of thrust at speed for which thrust is zero */
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         dtdv_t0 = token_value; 
-         /* input speed at which thrust is zero */
-         if (check_float(linetoken5))
-           token5 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         v_t0 = token_value; 
-         dtdvvt = -dtdv_t0 * v_t0 / t_v0;
-         engineParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          simpleSingleModel = true;
+          /* input the thrust at zero speed */
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          t_v0 = token_value; 
+          /* input slope of thrust at speed for which thrust is zero */
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          dtdv_t0 = token_value; 
+          /* input speed at which thrust is zero */
+          if (check_float(linetoken5))
+            token5 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          v_t0 = token_value; 
+          dtdvvt = -dtdv_t0 * v_t0 / t_v0;
+          engineParts -> storeCommands (*command_line);
+          break;
+        }
       case c172_flag:
-       {
-         engineParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          engineParts -> storeCommands (*command_line);
+          break;
+        }
       case cherokee_flag:
-       {
-         engineParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          engineParts -> storeCommands (*command_line);
+          break;
+        }
       case Throttle_pct_input_flag:
-       {
-         Throttle_pct_input = true;
-         Throttle_pct_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(Throttle_pct_input_file,
-                               Throttle_pct_input_timeArray,
-                               Throttle_pct_input_dTArray,
-                               Throttle_pct_input_ntime);
-         token6 >> token_value;
-         Throttle_pct_input_startTime = token_value;
-         break;
-       }
+        {
+          Throttle_pct_input = true;
+          Throttle_pct_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(Throttle_pct_input_file,
+                                Throttle_pct_input_timeArray,
+                                Throttle_pct_input_dTArray,
+                                Throttle_pct_input_ntime);
+          token6 >> token_value;
+          Throttle_pct_input_startTime = token_value;
+          break;
+        }
       case gyroForce_Q_body_flag:
-       {
-         /* include gyroscopic forces due to pitch */
-         gyroForce_Q_body = true;
-         break;
-       }
+        {
+          /* include gyroscopic forces due to pitch */
+          gyroForce_Q_body = true;
+          break;
+        }
       case gyroForce_R_body_flag:
-       {
-         /* include gyroscopic forces due to yaw */
-         gyroForce_R_body = true;
-         break;
-       }
+        {
+          /* include gyroscopic forces due to yaw */
+          gyroForce_R_body = true;
+          break;
+        }
 
       case slipstream_effects_flag:
-       {
-       // include slipstream effects
-         b_slipstreamEffects = true;
-         if (!simpleSingleModel)
-           uiuc_warnings_errors(3, *command_line);
-         break;
-       }
+        {
+        // include slipstream effects
+          b_slipstreamEffects = true;
+          if (!simpleSingleModel)
+            uiuc_warnings_errors(3, *command_line);
+          break;
+        }
       case propDia_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         propDia = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          propDia = token_value;
+          break;
+        }
       case eta_q_Cm_q_flag:
-       {
-       // include slipstream effects due to Cm_q
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cm_q_fac = token_value;
-         if (eta_q_Cm_q_fac == 0.0) {eta_q_Cm_q_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cm_q
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cm_q_fac = token_value;
+          if (eta_q_Cm_q_fac == 0.0) {eta_q_Cm_q_fac = 1.0;}
+          break;
+        }
       case eta_q_Cm_adot_flag:
-       {
-       // include slipstream effects due to Cm_adot
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cm_adot_fac = token_value;
-         if (eta_q_Cm_adot_fac == 0.0) {eta_q_Cm_adot_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cm_adot
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cm_adot_fac = token_value;
+          if (eta_q_Cm_adot_fac == 0.0) {eta_q_Cm_adot_fac = 1.0;}
+          break;
+        }
       case eta_q_Cmfade_flag:
-       {
-       // include slipstream effects due to Cmfade
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cmfade_fac = token_value;
-         if (eta_q_Cmfade_fac == 0.0) {eta_q_Cmfade_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cmfade
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cmfade_fac = token_value;
+          if (eta_q_Cmfade_fac == 0.0) {eta_q_Cmfade_fac = 1.0;}
+          break;
+        }
       case eta_q_Cm_de_flag:
-       {
-       // include slipstream effects due to Cmfade
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cm_de_fac = token_value;
-         if (eta_q_Cm_de_fac == 0.0) {eta_q_Cm_de_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cmfade
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cm_de_fac = token_value;
+          if (eta_q_Cm_de_fac == 0.0) {eta_q_Cm_de_fac = 1.0;}
+          break;
+        }
       case eta_q_Cl_beta_flag:
-       {
-       // include slipstream effects due to Cl_beta
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cl_beta_fac = token_value;
-         if (eta_q_Cl_beta_fac == 0.0) {eta_q_Cl_beta_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cl_beta
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cl_beta_fac = token_value;
+          if (eta_q_Cl_beta_fac == 0.0) {eta_q_Cl_beta_fac = 1.0;}
+          break;
+        }
       case eta_q_Cl_p_flag:
-       {
-       // include slipstream effects due to Cl_p
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cl_p_fac = token_value;
-         if (eta_q_Cl_p_fac == 0.0) {eta_q_Cl_p_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cl_p
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cl_p_fac = token_value;
+          if (eta_q_Cl_p_fac == 0.0) {eta_q_Cl_p_fac = 1.0;}
+          break;
+        }
       case eta_q_Cl_r_flag:
-       {
-       // include slipstream effects due to Cl_r
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cl_r_fac = token_value;
-         if (eta_q_Cl_r_fac == 0.0) {eta_q_Cl_r_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cl_r
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cl_r_fac = token_value;
+          if (eta_q_Cl_r_fac == 0.0) {eta_q_Cl_r_fac = 1.0;}
+          break;
+        }
       case eta_q_Cl_dr_flag:
-       {
-       // include slipstream effects due to Cl_dr
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cl_dr_fac = token_value;
-         if (eta_q_Cl_dr_fac == 0.0) {eta_q_Cl_dr_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cl_dr
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cl_dr_fac = token_value;
+          if (eta_q_Cl_dr_fac == 0.0) {eta_q_Cl_dr_fac = 1.0;}
+          break;
+        }
       case eta_q_CY_beta_flag:
-       {
-       // include slipstream effects due to CY_beta
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_CY_beta_fac = token_value;
-         if (eta_q_CY_beta_fac == 0.0) {eta_q_CY_beta_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to CY_beta
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_CY_beta_fac = token_value;
+          if (eta_q_CY_beta_fac == 0.0) {eta_q_CY_beta_fac = 1.0;}
+          break;
+        }
       case eta_q_CY_p_flag:
-       {
-       // include slipstream effects due to CY_p
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_CY_p_fac = token_value;
-         if (eta_q_CY_p_fac == 0.0) {eta_q_CY_p_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to CY_p
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_CY_p_fac = token_value;
+          if (eta_q_CY_p_fac == 0.0) {eta_q_CY_p_fac = 1.0;}
+          break;
+        }
       case eta_q_CY_r_flag:
-       {
-       // include slipstream effects due to CY_r
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_CY_r_fac = token_value;
-         if (eta_q_CY_r_fac == 0.0) {eta_q_CY_r_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to CY_r
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_CY_r_fac = token_value;
+          if (eta_q_CY_r_fac == 0.0) {eta_q_CY_r_fac = 1.0;}
+          break;
+        }
       case eta_q_CY_dr_flag:
-       {
-       // include slipstream effects due to CY_dr
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_CY_dr_fac = token_value;
-         if (eta_q_CY_dr_fac == 0.0) {eta_q_CY_dr_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to CY_dr
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_CY_dr_fac = token_value;
+          if (eta_q_CY_dr_fac == 0.0) {eta_q_CY_dr_fac = 1.0;}
+          break;
+        }
       case eta_q_Cn_beta_flag:
-       {
-       // include slipstream effects due to Cn_beta
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cn_beta_fac = token_value;
-         if (eta_q_Cn_beta_fac == 0.0) {eta_q_Cn_beta_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cn_beta
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cn_beta_fac = token_value;
+          if (eta_q_Cn_beta_fac == 0.0) {eta_q_Cn_beta_fac = 1.0;}
+          break;
+        }
       case eta_q_Cn_p_flag:
-       {
-       // include slipstream effects due to Cn_p
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cn_p_fac = token_value;
-         if (eta_q_Cn_p_fac == 0.0) {eta_q_Cn_p_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cn_p
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cn_p_fac = token_value;
+          if (eta_q_Cn_p_fac == 0.0) {eta_q_Cn_p_fac = 1.0;}
+          break;
+        }
       case eta_q_Cn_r_flag:
-       {
-       // include slipstream effects due to Cn_r
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cn_r_fac = token_value;
-         if (eta_q_Cn_r_fac == 0.0) {eta_q_Cn_r_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cn_r
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cn_r_fac = token_value;
+          if (eta_q_Cn_r_fac == 0.0) {eta_q_Cn_r_fac = 1.0;}
+          break;
+        }
       case eta_q_Cn_dr_flag:
-       {
-       // include slipstream effects due to Cn_dr
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         eta_q_Cn_dr_fac = token_value;
-         if (eta_q_Cn_dr_fac == 0.0) {eta_q_Cn_dr_fac = 1.0;}
-         break;
-       }
+        {
+        // include slipstream effects due to Cn_dr
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          eta_q_Cn_dr_fac = token_value;
+          if (eta_q_Cn_dr_fac == 0.0) {eta_q_Cn_dr_fac = 1.0;}
+          break;
+        }
 
       case omega_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         minOmega = token_value; 
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         maxOmega = token_value; 
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          minOmega = token_value; 
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          maxOmega = token_value; 
+          break;
+        }
       case omegaRPM_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         minOmegaRPM = token_value; 
-         minOmega    = minOmegaRPM * 2.0 * LS_PI / 60;
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         maxOmegaRPM = token_value; 
-         maxOmega    = maxOmegaRPM * 2.0 * LS_PI / 60;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          minOmegaRPM = token_value; 
+          minOmega    = minOmegaRPM * 2.0 * LS_PI / 60;
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          maxOmegaRPM = token_value; 
+          maxOmega    = maxOmegaRPM * 2.0 * LS_PI / 60;
+          break;
+        }
       case polarInertia_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         polarInertia = token_value; 
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          polarInertia = token_value; 
+          break;
+        }
       case forcemom_flag:
-       {
-         engineParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          engineParts -> storeCommands (*command_line);
+          break;
+        }
       case Xp_input_flag:
-       {
-         Xp_input = true;
-         Xp_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(Xp_input_file,
-                               Xp_input_timeArray,
-                               Xp_input_XpArray,
-                               Xp_input_ntime);
-         token6 >> token_value;
-         Xp_input_startTime = token_value;
-         break;
-       }
+        {
+          Xp_input = true;
+          Xp_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(Xp_input_file,
+                                Xp_input_timeArray,
+                                Xp_input_XpArray,
+                                Xp_input_ntime);
+          token6 >> token_value;
+          Xp_input_startTime = token_value;
+          break;
+        }
       case Zp_input_flag:
-       {
-         Zp_input = true;
-         Zp_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(Zp_input_file,
-                               Zp_input_timeArray,
-                               Zp_input_ZpArray,
-                               Zp_input_ntime);
-         token6 >> token_value;
-         Zp_input_startTime = token_value;
-         break;
-       }
+        {
+          Zp_input = true;
+          Zp_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(Zp_input_file,
+                                Zp_input_timeArray,
+                                Zp_input_ZpArray,
+                                Zp_input_ntime);
+          token6 >> token_value;
+          Zp_input_startTime = token_value;
+          break;
+        }
       case Mp_input_flag:
-       {
-         Mp_input = true;
-         Mp_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(Mp_input_file,
-                               Mp_input_timeArray,
-                               Mp_input_MpArray,
-                               Mp_input_ntime);
-         token6 >> token_value;
-         Mp_input_startTime = token_value;
-         break;
-       }
+        {
+          Mp_input = true;
+          Mp_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(Mp_input_file,
+                                Mp_input_timeArray,
+                                Mp_input_MpArray,
+                                Mp_input_ntime);
+          token6 >> token_value;
+          Mp_input_startTime = token_value;
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 3d9d5bfda8c3d8a955a445b9322ae5e59c0cdf65..92fe247b5112f27001a2b84343a8d557882dbf9c 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_engine( const string& linetoken2, const string& linetoken3,
-                  const string& linetoken4, const string& linetoken5, 
-                  const string& linetoken6, const string& linetoken7, 
-                  const string& linetoken8, const string& linetoken9,
-                  const string& linetoken10,const string& aircraft_directory,
-                  LIST command_line );
+                   const string& linetoken4, const string& linetoken5, 
+                   const string& linetoken6, const string& linetoken7, 
+                   const string& linetoken8, const string& linetoken9,
+                   const string& linetoken10,const string& aircraft_directory,
+                   LIST command_line );
 
 #endif //_MENU_ENGINE_H_
index a8e7c395cea7e3369ec34ca8c3a5b133d2a4e40f..5e931e997794144b568921fdb88cf8b1a93a2145 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_fog( const string& linetoken2, const string& linetoken3,
-               const string& linetoken4, const string& linetoken5, 
-               const string& linetoken6, const string& linetoken7, 
-               const string& linetoken8, const string& linetoken9,
-               const string& linetoken10, const string& aircraft_directory,
-               LIST command_line ) {
+                const string& linetoken4, const string& linetoken5, 
+                const string& linetoken6, const string& linetoken7, 
+                const string& linetoken8, const string& linetoken9,
+                const string& linetoken10, const string& aircraft_directory,
+                LIST command_line ) {
   double token_value;
   int token_value_convert1;
   istringstream token3(linetoken3.c_str());
@@ -107,63 +107,63 @@ void parse_fog( const string& linetoken2, const string& linetoken3,
     switch(fog_map[linetoken2])
       {
       case fog_segments_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value_convert1;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         if (token_value_convert1 < 1 || token_value_convert1 > 100)
-           uiuc_warnings_errors(1, *command_line);
-         
-         fog_field = true;
-         fog_point_index = 0;
-         delete[] fog_time;
-         delete[] fog_value;
-         fog_segments = token_value_convert1;
-         fog_time = new double[fog_segments+1];
-         fog_time[0] = 0.0;
-         fog_value = new int[fog_segments+1];
-         fog_value[0] = 0;
-         
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value_convert1;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          if (token_value_convert1 < 1 || token_value_convert1 > 100)
+            uiuc_warnings_errors(1, *command_line);
+          
+          fog_field = true;
+          fog_point_index = 0;
+          delete[] fog_time;
+          delete[] fog_value;
+          fog_segments = token_value_convert1;
+          fog_time = new double[fog_segments+1];
+          fog_time[0] = 0.0;
+          fog_value = new int[fog_segments+1];
+          fog_value[0] = 0;
+          
+          break;
+        }
       case fog_point_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         if (token_value < 0.1)
-           uiuc_warnings_errors(1, *command_line);
-         
-         if (check_float(linetoken4))
-           token4 >> token_value_convert1;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         if (token_value_convert1 < -1000 || token_value_convert1 > 1000)
-           uiuc_warnings_errors(1, *command_line);
-         
-         if (fog_point_index == fog_segments || fog_point_index == -1)
-           uiuc_warnings_errors(1, *command_line);
-         
-         fog_point_index++;
-         fog_time[fog_point_index] = token_value;
-         fog_value[fog_point_index] = token_value_convert1;
-         
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          if (token_value < 0.1)
+            uiuc_warnings_errors(1, *command_line);
+          
+          if (check_float(linetoken4))
+            token4 >> token_value_convert1;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          if (token_value_convert1 < -1000 || token_value_convert1 > 1000)
+            uiuc_warnings_errors(1, *command_line);
+          
+          if (fog_point_index == fog_segments || fog_point_index == -1)
+            uiuc_warnings_errors(1, *command_line);
+          
+          fog_point_index++;
+          fog_time[fog_point_index] = token_value;
+          fog_value[fog_point_index] = token_value_convert1;
+          
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 2e33ff5d6626201ac801640cfb1042d35c6202e2..f2c079d46464b7212dbb8e80304a964af327c423 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_fog( const string& linetoken2, const string& linetoken3,
-               const string& linetoken4, const string& linetoken5, 
-               const string& linetoken6, const string& linetoken7, 
-               const string& linetoken8, const string& linetoken9,
-               const string& linetoken10, const string& aircraft_directory,
-               LIST command_line );
+                const string& linetoken4, const string& linetoken5, 
+                const string& linetoken6, const string& linetoken7, 
+                const string& linetoken8, const string& linetoken9,
+                const string& linetoken10, const string& aircraft_directory,
+                LIST command_line );
 
 #endif //_MENU_FOG_H_
index a1160495a72df27b9e2c86e2ae6093d5d9042976..6e88453928e4deb184b13b96551149382c79a97a 100644 (file)
@@ -80,9 +80,9 @@ void d_2_to_3( double array2D[100][100], double array3D[][100][100], int index3D
   for (register int i=0; i<=99; i++)
     {
       for (register int j=1; j<=99; j++)
-       {
-         array3D[index3D][i][j]=array2D[i][j];
-       }
+        {
+          array3D[index3D][i][j]=array2D[i][j];
+        }
     }
 }
 
index 7b1a9de83414f7944d4672b72f443d0846996080..2d55960a909f80e5fc89bb28a205fbaef50f9814 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_gear( const string& linetoken2, const string& linetoken3,
-                const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory, 
-                LIST command_line ) {
+                 const string& linetoken4, const string& linetoken5, 
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory, 
+                 LIST command_line ) {
     double token_value;
     istringstream token3(linetoken3.c_str());
     istringstream token4(linetoken4.c_str());
@@ -106,134 +106,134 @@ void parse_gear( const string& linetoken2, const string& linetoken3,
     switch(gear_map[linetoken2])
       {
       case Dx_gear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         D_gear_v[index][0] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          D_gear_v[index][0] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case Dy_gear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         D_gear_v[index][1] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          D_gear_v[index][1] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case Dz_gear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         D_gear_v[index][2] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          D_gear_v[index][2] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case cgear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         cgear[index] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          cgear[index] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case kgear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         kgear[index] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          kgear[index] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case muGear_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         muGear[index] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          muGear[index] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case strutLength_flag:
-       {
-         int index;
-         token3 >> index;
-         if (index < 0 || index >= 16)
-           uiuc_warnings_errors(1, *command_line);
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         strutLength[index] = token_value;
-         gear_model[index] = true;
-         break;
-       }
+        {
+          int index;
+          token3 >> index;
+          if (index < 0 || index >= 16)
+            uiuc_warnings_errors(1, *command_line);
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          strutLength[index] = token_value;
+          gear_model[index] = true;
+          break;
+        }
       case gear_max_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_gear = true;
-         gear_max = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_gear = true;
+          gear_max = token_value;
+          break;
+        }
       case gear_rate_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         use_gear = true;
-         gear_rate = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          use_gear = true;
+          gear_rate = token_value;
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 381f7d1ef06e72b6d876d41511be1a2b8a991474..a8d984290e91c129cb730084857b747769ae3e2d 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_gear( const string& linetoken2, const string& linetoken3,
-                const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory, 
-                LIST command_line );
+                 const string& linetoken4, const string& linetoken5, 
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory, 
+                 LIST command_line );
 
 #endif //_MENU_GEAR_H_
index e9050e81f42d3236c12daa3eb4926ccb2d732018..1dca82c3f6b61b2b3903421ae741786f9b7e7d99 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_geometry( const string& linetoken2, const string& linetoken3,
-                    const string& linetoken4, const string& linetoken5, 
-                    const string& linetoken6, const string& linetoken7, 
-                    const string& linetoken8, const string& linetoken9,
-                    const string& linetoken10, 
-                    const string& aircraft_directory, LIST command_line ) {
+                     const string& linetoken4, const string& linetoken5, 
+                     const string& linetoken6, const string& linetoken7, 
+                     const string& linetoken8, const string& linetoken9,
+                     const string& linetoken10, 
+                     const string& aircraft_directory, LIST command_line ) {
     double token_value;
     istringstream token3(linetoken3.c_str());
     istringstream token4(linetoken4.c_str());
@@ -106,91 +106,91 @@ void parse_geometry( const string& linetoken2, const string& linetoken3,
     switch(geometry_map[linetoken2])
       {
       case bw_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         bw = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          bw = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case cbar_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         cbar = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          cbar = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case Sw_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Sw = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Sw = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case ih_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         ih = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          ih = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case bh_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         bh = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          bh = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case ch_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         chord_h = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          chord_h = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       case Sh_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Sh = token_value;
-         geometryParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Sh = token_value;
+          geometryParts -> storeCommands (*command_line);
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 9402e016ae86f0f9bf58200fa8cd066540cfa3a7..9e834ca922f56a406628fa59248e2fc16f7c19d3 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_geometry( const string& linetoken2, const string& linetoken3,
-                    const string& linetoken4, const string& linetoken5, 
-                    const string& linetoken6, const string& linetoken7, 
-                    const string& linetoken8, const string& linetoken9,
-                    const string& linetoken10, 
-                    const string& aircraft_directory, LIST command_line );
+                     const string& linetoken4, const string& linetoken5, 
+                     const string& linetoken6, const string& linetoken7, 
+                     const string& linetoken8, const string& linetoken9,
+                     const string& linetoken10, 
+                     const string& aircraft_directory, LIST command_line );
 
 #endif //_MENU_GEOMETRY_H_
index f51929e6ac29f5081ff223b670650f26e8554956..55528b02dab7c2b26eb74c1545db86ca9f55ffd9 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -89,10 +89,10 @@ using std::exit;
 
 void parse_ice( const string& linetoken2, const string& linetoken3,
                 const string& linetoken4, const string& linetoken5,
-               const string& linetoken6, const string& linetoken7, 
-               const string& linetoken8, const string& linetoken9,
-               const string& linetoken10, const string& aircraft_directory,
-               LIST command_line ) {
+                const string& linetoken6, const string& linetoken7, 
+                const string& linetoken8, const string& linetoken9,
+                const string& linetoken10, const string& aircraft_directory,
+                LIST command_line ) {
     double token_value;
     int token_value_convert1, token_value_convert2, token_value_convert3;
     int token_value_convert4;
@@ -114,1251 +114,1251 @@ void parse_ice( const string& linetoken2, const string& linetoken3,
     switch(ice_map[linetoken2])
       {
       case iceTime_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         ice_model = true;
-         iceTime = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          ice_model = true;
+          iceTime = token_value;
+          break;
+        }
       case transientTime_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         transientTime = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          transientTime = token_value;
+          break;
+        }
       case eta_ice_final_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         eta_ice_final = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          eta_ice_final = token_value;
+          break;
+        }
       case beta_probe_wing_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         beta_model = true;
-         x_probe_wing = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          beta_model = true;
+          x_probe_wing = token_value;
+          break;
+        }
       case beta_probe_tail_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         beta_model = true;
-         x_probe_tail = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          beta_model = true;
+          x_probe_tail = token_value;
+          break;
+        }
       case kCDo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCDo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCDo = token_value;
+          break;
+        }
       case kCDK_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCDK = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCDK = token_value;
+          break;
+        }
       case kCD_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCD_a = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCD_a = token_value;
+          break;
+        }
       case kCD_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCD_adot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCD_adot = token_value;
+          break;
+        }
       case kCD_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCD_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCD_q = token_value;
+          break;
+        }
       case kCD_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCD_de = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCD_de = token_value;
+          break;
+        }
       case kCXo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCXo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCXo = token_value;
+          break;
+        }
       case kCXK_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCXK = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCXK = token_value;
+          break;
+        }
       case kCX_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_a = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_a = token_value;
+          break;
+        }
       case kCX_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_a2 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_a2 = token_value;
+          break;
+        }
       case kCX_a3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_a3 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_a3 = token_value;
+          break;
+        }
       case kCX_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_adot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_adot = token_value;
+          break;
+        }
       case kCX_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_q = token_value;
+          break;
+        }
       case kCX_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_de = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_de = token_value;
+          break;
+        }
       case kCX_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_dr = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_dr = token_value;
+          break;
+        }
       case kCX_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_df = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_df = token_value;
+          break;
+        }
       case kCX_adf_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCX_adf = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCX_adf = token_value;
+          break;
+        }
       case kCLo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCLo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCLo = token_value;
+          break;
+        }
       case kCL_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCL_a = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCL_a = token_value;
+          break;
+        }
       case kCL_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCL_adot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCL_adot = token_value;
+          break;
+        }
       case kCL_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCL_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCL_q = token_value;
+          break;
+        }
       case kCL_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCL_de = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCL_de = token_value;
+          break;
+        }
       case kCZo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZo = token_value;
+          break;
+        }
       case kCZ_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_a = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_a = token_value;
+          break;
+        }
       case kCZ_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_a2 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_a2 = token_value;
+          break;
+        }
       case kCZ_a3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_a3 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_a3 = token_value;
+          break;
+        }
       case kCZ_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_adot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_adot = token_value;
+          break;
+        }
       case kCZ_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_q = token_value;
+          break;
+        }
       case kCZ_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_de = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_de = token_value;
+          break;
+        }
       case kCZ_deb2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_deb2 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_deb2 = token_value;
+          break;
+        }
       case kCZ_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_df = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_df = token_value;
+          break;
+        }
       case kCZ_adf_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCZ_adf = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCZ_adf = token_value;
+          break;
+        }
       case kCmo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCmo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCmo = token_value;
+          break;
+        }
       case kCm_a_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_a = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_a = token_value;
+          break;
+        }
       case kCm_a2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_a2 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_a2 = token_value;
+          break;
+        }
       case kCm_adot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_adot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_adot = token_value;
+          break;
+        }
       case kCm_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_q = token_value;
+          break;
+        }
       case kCm_de_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_de = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_de = token_value;
+          break;
+        }
       case kCm_b2_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_b2 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_b2 = token_value;
+          break;
+        }
       case kCm_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_r = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_r = token_value;
+          break;
+        }
       case kCm_df_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCm_df = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCm_df = token_value;
+          break;
+        }
       case kCYo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCYo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCYo = token_value;
+          break;
+        }
       case kCY_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_beta = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_beta = token_value;
+          break;
+        }
       case kCY_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_p = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_p = token_value;
+          break;
+        }
       case kCY_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_r = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_r = token_value;
+          break;
+        }
       case kCY_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_da = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_da = token_value;
+          break;
+        }
       case kCY_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_dr = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_dr = token_value;
+          break;
+        }
       case kCY_dra_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_dra = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_dra = token_value;
+          break;
+        }
       case kCY_bdot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCY_bdot = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCY_bdot = token_value;
+          break;
+        }
       case kClo_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kClo = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kClo = token_value;
+          break;
+        }
       case kCl_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_beta = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_beta = token_value;
+          break;
+        }
       case kCl_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_p = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_p = token_value;
+          break;
+        }
       case kCl_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_r = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_r = token_value;
+          break;
+        }
       case kCl_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_da = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_da = token_value;
+          break;
+        }
       case kCl_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_dr = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_dr = token_value;
+          break;
+        }
       case kCl_daa_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCl_daa = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCl_daa = token_value;
+          break;
+        }
       case kCno_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCno = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCno = token_value;
+          break;
+        }
       case kCn_beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_beta = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_beta = token_value;
+          break;
+        }
       case kCn_p_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_p = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_p = token_value;
+          break;
+        }
       case kCn_r_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_r = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_r = token_value;
+          break;
+        }
       case kCn_da_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_da = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_da = token_value;
+          break;
+        }
       case kCn_dr_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_dr = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_dr = token_value;
+          break;
+        }
       case kCn_q_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_q = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_q = token_value;
+          break;
+        }
       case kCn_b3_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         kCn_b3 = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          kCn_b3 = token_value;
+          break;
+        }
       case bootTime_flag:
-       {
-         int index;
-         if (check_float(linetoken4))
-           token4 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         token3 >> index;
-         if (index < 0 || index >= 20)
-           uiuc_warnings_errors(1, *command_line);
-         bootTime[index] = token_value;
-         bootTrue[index] = true;
-         break;
-       }  
+        {
+          int index;
+          if (check_float(linetoken4))
+            token4 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          token3 >> index;
+          if (index < 0 || index >= 20)
+            uiuc_warnings_errors(1, *command_line);
+          bootTime[index] = token_value;
+          bootTrue[index] = true;
+          break;
+        }  
       case eta_wing_left_input_flag:
-       {
-         eta_from_file = true;
-         eta_wing_left_input = true;
-         eta_wing_left_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(eta_wing_left_input_file,
-                               eta_wing_left_input_timeArray,
-                               eta_wing_left_input_daArray,
-                               eta_wing_left_input_ntime);
-         token6 >> token_value;
-         eta_wing_left_input_startTime = token_value;
-         break;
-       }
+        {
+          eta_from_file = true;
+          eta_wing_left_input = true;
+          eta_wing_left_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(eta_wing_left_input_file,
+                                eta_wing_left_input_timeArray,
+                                eta_wing_left_input_daArray,
+                                eta_wing_left_input_ntime);
+          token6 >> token_value;
+          eta_wing_left_input_startTime = token_value;
+          break;
+        }
       case eta_wing_right_input_flag:
-       {
-         eta_from_file = true;
-         eta_wing_right_input = true;
-         eta_wing_right_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(eta_wing_right_input_file,
-                               eta_wing_right_input_timeArray,
-                               eta_wing_right_input_daArray,
-                               eta_wing_right_input_ntime);
-         token6 >> token_value;
-         eta_wing_right_input_startTime = token_value;
-         break;
-       }
+        {
+          eta_from_file = true;
+          eta_wing_right_input = true;
+          eta_wing_right_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(eta_wing_right_input_file,
+                                eta_wing_right_input_timeArray,
+                                eta_wing_right_input_daArray,
+                                eta_wing_right_input_ntime);
+          token6 >> token_value;
+          eta_wing_right_input_startTime = token_value;
+          break;
+        }
       case eta_tail_input_flag:
-       {
-         eta_from_file = true;
-         eta_tail_input = true;
-         eta_tail_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(eta_tail_input_file,
-                               eta_tail_input_timeArray,
-                               eta_tail_input_daArray,
-                               eta_tail_input_ntime);
-         token6 >> token_value;
-         eta_tail_input_startTime = token_value;
-         break;
-       }
+        {
+          eta_from_file = true;
+          eta_tail_input = true;
+          eta_tail_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(eta_tail_input_file,
+                                eta_tail_input_timeArray,
+                                eta_tail_input_daArray,
+                                eta_tail_input_ntime);
+          token6 >> token_value;
+          eta_tail_input_startTime = token_value;
+          break;
+        }
       case nonlin_ice_case_flag:
-       {
-         token3 >> nonlin_ice_case;
-         break;
-       }
+        {
+          token3 >> nonlin_ice_case;
+          break;
+        }
       case eta_tail_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
 
-         eta_tail = token_value;
-         break;
-       }
+          eta_tail = token_value;
+          break;
+        }
       case eta_wing_left_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
 
-         eta_wing_left = token_value;
-         break;
-       }
+          eta_wing_left = token_value;
+          break;
+        }
       case eta_wing_right_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
 
-         eta_wing_right = token_value;
-         break;
-       }
+          eta_wing_right = token_value;
+          break;
+        }
       case demo_eps_alpha_max_flag:
-       {
-         demo_eps_alpha_max = true;
-         demo_eps_alpha_max_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_alpha_max_file,
-                               demo_eps_alpha_max_timeArray,
-                               demo_eps_alpha_max_daArray,
-                               demo_eps_alpha_max_ntime);
-         token6 >> token_value;
-         demo_eps_alpha_max_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_alpha_max = true;
+          demo_eps_alpha_max_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_alpha_max_file,
+                                demo_eps_alpha_max_timeArray,
+                                demo_eps_alpha_max_daArray,
+                                demo_eps_alpha_max_ntime);
+          token6 >> token_value;
+          demo_eps_alpha_max_startTime = token_value;
+          break;
+        }
       case demo_eps_pitch_max_flag:
-       {
-         demo_eps_pitch_max = true;
-         demo_eps_pitch_max_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_pitch_max_file,
-                               demo_eps_pitch_max_timeArray,
-                               demo_eps_pitch_max_daArray,
-                               demo_eps_pitch_max_ntime);
-         token6 >> token_value;
-         demo_eps_pitch_max_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_pitch_max = true;
+          demo_eps_pitch_max_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_pitch_max_file,
+                                demo_eps_pitch_max_timeArray,
+                                demo_eps_pitch_max_daArray,
+                                demo_eps_pitch_max_ntime);
+          token6 >> token_value;
+          demo_eps_pitch_max_startTime = token_value;
+          break;
+        }
       case demo_eps_pitch_min_flag:
-       {
-         demo_eps_pitch_min = true;
-         demo_eps_pitch_min_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_pitch_min_file,
-                               demo_eps_pitch_min_timeArray,
-                               demo_eps_pitch_min_daArray,
-                               demo_eps_pitch_min_ntime);
-         token6 >> token_value;
-         demo_eps_pitch_min_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_pitch_min = true;
+          demo_eps_pitch_min_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_pitch_min_file,
+                                demo_eps_pitch_min_timeArray,
+                                demo_eps_pitch_min_daArray,
+                                demo_eps_pitch_min_ntime);
+          token6 >> token_value;
+          demo_eps_pitch_min_startTime = token_value;
+          break;
+        }
       case demo_eps_roll_max_flag:
-       {
-         demo_eps_roll_max = true;
-         demo_eps_roll_max_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_roll_max_file,
-                               demo_eps_roll_max_timeArray,
-                               demo_eps_roll_max_daArray,
-                               demo_eps_roll_max_ntime);
-         token6 >> token_value;
-         demo_eps_roll_max_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_roll_max = true;
+          demo_eps_roll_max_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_roll_max_file,
+                                demo_eps_roll_max_timeArray,
+                                demo_eps_roll_max_daArray,
+                                demo_eps_roll_max_ntime);
+          token6 >> token_value;
+          demo_eps_roll_max_startTime = token_value;
+          break;
+        }
       case demo_eps_thrust_min_flag:
-       {
-         demo_eps_thrust_min = true;
-         demo_eps_thrust_min_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_thrust_min_file,
-                               demo_eps_thrust_min_timeArray,
-                               demo_eps_thrust_min_daArray,
-                               demo_eps_thrust_min_ntime);
-         token6 >> token_value;
-         demo_eps_thrust_min_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_thrust_min = true;
+          demo_eps_thrust_min_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_thrust_min_file,
+                                demo_eps_thrust_min_timeArray,
+                                demo_eps_thrust_min_daArray,
+                                demo_eps_thrust_min_ntime);
+          token6 >> token_value;
+          demo_eps_thrust_min_startTime = token_value;
+          break;
+        }
       case demo_eps_airspeed_max_flag:
-       {
-         demo_eps_airspeed_max = true;
-         demo_eps_airspeed_max_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_airspeed_max_file,
-                               demo_eps_airspeed_max_timeArray,
-                               demo_eps_airspeed_max_daArray,
-                               demo_eps_airspeed_max_ntime);
-         token6 >> token_value;
-         demo_eps_airspeed_max_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_airspeed_max = true;
+          demo_eps_airspeed_max_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_airspeed_max_file,
+                                demo_eps_airspeed_max_timeArray,
+                                demo_eps_airspeed_max_daArray,
+                                demo_eps_airspeed_max_ntime);
+          token6 >> token_value;
+          demo_eps_airspeed_max_startTime = token_value;
+          break;
+        }
       case demo_eps_airspeed_min_flag:
-       {
-         demo_eps_airspeed_min = true;
-         demo_eps_airspeed_min_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_airspeed_min_file,
-                               demo_eps_airspeed_min_timeArray,
-                               demo_eps_airspeed_min_daArray,
-                               demo_eps_airspeed_min_ntime);
-         token6 >> token_value;
-         demo_eps_airspeed_min_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_airspeed_min = true;
+          demo_eps_airspeed_min_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_airspeed_min_file,
+                                demo_eps_airspeed_min_timeArray,
+                                demo_eps_airspeed_min_daArray,
+                                demo_eps_airspeed_min_ntime);
+          token6 >> token_value;
+          demo_eps_airspeed_min_startTime = token_value;
+          break;
+        }
       case demo_eps_flap_max_flag:
-       {
-         demo_eps_flap_max = true;
-         demo_eps_flap_max_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_flap_max_file,
-                               demo_eps_flap_max_timeArray,
-                               demo_eps_flap_max_daArray,
-                               demo_eps_flap_max_ntime);
-         token6 >> token_value;
-         demo_eps_flap_max_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_flap_max = true;
+          demo_eps_flap_max_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_flap_max_file,
+                                demo_eps_flap_max_timeArray,
+                                demo_eps_flap_max_daArray,
+                                demo_eps_flap_max_ntime);
+          token6 >> token_value;
+          demo_eps_flap_max_startTime = token_value;
+          break;
+        }
       case demo_boot_cycle_tail_flag:
-       {
-         demo_boot_cycle_tail = true;
-         demo_boot_cycle_tail_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_boot_cycle_tail_file,
-                               demo_boot_cycle_tail_timeArray,
-                               demo_boot_cycle_tail_daArray,
-                               demo_boot_cycle_tail_ntime);
-         token6 >> token_value;
-         demo_boot_cycle_tail_startTime = token_value;
-         break;
-       }
+        {
+          demo_boot_cycle_tail = true;
+          demo_boot_cycle_tail_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_boot_cycle_tail_file,
+                                demo_boot_cycle_tail_timeArray,
+                                demo_boot_cycle_tail_daArray,
+                                demo_boot_cycle_tail_ntime);
+          token6 >> token_value;
+          demo_boot_cycle_tail_startTime = token_value;
+          break;
+        }
       case demo_boot_cycle_wing_left_flag:
-       {
-         demo_boot_cycle_wing_left = true;
-         demo_boot_cycle_wing_left_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_boot_cycle_wing_left_file,
-                               demo_boot_cycle_wing_left_timeArray,
-                               demo_boot_cycle_wing_left_daArray,
-                               demo_boot_cycle_wing_left_ntime);
-         token6 >> token_value;
-         demo_boot_cycle_wing_left_startTime = token_value;
-         break;
-       }
+        {
+          demo_boot_cycle_wing_left = true;
+          demo_boot_cycle_wing_left_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_boot_cycle_wing_left_file,
+                                demo_boot_cycle_wing_left_timeArray,
+                                demo_boot_cycle_wing_left_daArray,
+                                demo_boot_cycle_wing_left_ntime);
+          token6 >> token_value;
+          demo_boot_cycle_wing_left_startTime = token_value;
+          break;
+        }
       case demo_boot_cycle_wing_right_flag:
-       {
-         demo_boot_cycle_wing_right = true;
-         demo_boot_cycle_wing_right_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_boot_cycle_wing_right_file,
-                               demo_boot_cycle_wing_right_timeArray,
-                               demo_boot_cycle_wing_right_daArray,
-                               demo_boot_cycle_wing_right_ntime);
-         token6 >> token_value;
-         demo_boot_cycle_wing_right_startTime = token_value;
-         break;
-       }
+        {
+          demo_boot_cycle_wing_right = true;
+          demo_boot_cycle_wing_right_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_boot_cycle_wing_right_file,
+                                demo_boot_cycle_wing_right_timeArray,
+                                demo_boot_cycle_wing_right_daArray,
+                                demo_boot_cycle_wing_right_ntime);
+          token6 >> token_value;
+          demo_boot_cycle_wing_right_startTime = token_value;
+          break;
+        }
       case demo_eps_pitch_input_flag:
-       {
-         demo_eps_pitch_input = true;
-         demo_eps_pitch_input_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_eps_pitch_input_file,
-                               demo_eps_pitch_input_timeArray,
-                               demo_eps_pitch_input_daArray,
-                               demo_eps_pitch_input_ntime);
-         token6 >> token_value;
-         demo_eps_pitch_input_startTime = token_value;
-         break;
-       }
+        {
+          demo_eps_pitch_input = true;
+          demo_eps_pitch_input_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_eps_pitch_input_file,
+                                demo_eps_pitch_input_timeArray,
+                                demo_eps_pitch_input_daArray,
+                                demo_eps_pitch_input_ntime);
+          token6 >> token_value;
+          demo_eps_pitch_input_startTime = token_value;
+          break;
+        }
       case demo_ap_pah_on_flag:
-       {
-         demo_ap_pah_on = true;
-         demo_ap_pah_on_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_pah_on_file,
-                               demo_ap_pah_on_timeArray,
-                               demo_ap_pah_on_daArray,
-                               demo_ap_pah_on_ntime);
-         token6 >> token_value;
-         demo_ap_pah_on_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_pah_on = true;
+          demo_ap_pah_on_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_pah_on_file,
+                                demo_ap_pah_on_timeArray,
+                                demo_ap_pah_on_daArray,
+                                demo_ap_pah_on_ntime);
+          token6 >> token_value;
+          demo_ap_pah_on_startTime = token_value;
+          break;
+        }
       case demo_ap_alh_on_flag:
-       {
-         demo_ap_alh_on = true;
-         demo_ap_alh_on_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_alh_on_file,
-                               demo_ap_alh_on_timeArray,
-                               demo_ap_alh_on_daArray,
-                               demo_ap_alh_on_ntime);
-         token6 >> token_value;
-         demo_ap_alh_on_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_alh_on = true;
+          demo_ap_alh_on_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_alh_on_file,
+                                demo_ap_alh_on_timeArray,
+                                demo_ap_alh_on_daArray,
+                                demo_ap_alh_on_ntime);
+          token6 >> token_value;
+          demo_ap_alh_on_startTime = token_value;
+          break;
+        }
       case demo_ap_rah_on_flag:
-       {
-         demo_ap_rah_on = true;
-         demo_ap_rah_on_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_rah_on_file,
-                               demo_ap_rah_on_timeArray,
-                               demo_ap_rah_on_daArray,
-                               demo_ap_rah_on_ntime);
-         token6 >> token_value;
-         demo_ap_rah_on_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_rah_on = true;
+          demo_ap_rah_on_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_rah_on_file,
+                                demo_ap_rah_on_timeArray,
+                                demo_ap_rah_on_daArray,
+                                demo_ap_rah_on_ntime);
+          token6 >> token_value;
+          demo_ap_rah_on_startTime = token_value;
+          break;
+        }
        case demo_ap_hh_on_flag:
-       {
-         demo_ap_hh_on = true;
-         demo_ap_hh_on_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_hh_on_file,
-                               demo_ap_hh_on_timeArray,
-                               demo_ap_hh_on_daArray,
-                               demo_ap_hh_on_ntime);
-         token6 >> token_value;
-         demo_ap_hh_on_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_hh_on = true;
+          demo_ap_hh_on_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_hh_on_file,
+                                demo_ap_hh_on_timeArray,
+                                demo_ap_hh_on_daArray,
+                                demo_ap_hh_on_ntime);
+          token6 >> token_value;
+          demo_ap_hh_on_startTime = token_value;
+          break;
+        }
      case demo_ap_Theta_ref_flag:
-       {
-         demo_ap_Theta_ref = true;
-         demo_ap_Theta_ref_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_Theta_ref_file,
-                               demo_ap_Theta_ref_timeArray,
-                               demo_ap_Theta_ref_daArray,
-                               demo_ap_Theta_ref_ntime);
-         token6 >> token_value;
-         demo_ap_Theta_ref_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_Theta_ref = true;
+          demo_ap_Theta_ref_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_Theta_ref_file,
+                                demo_ap_Theta_ref_timeArray,
+                                demo_ap_Theta_ref_daArray,
+                                demo_ap_Theta_ref_ntime);
+          token6 >> token_value;
+          demo_ap_Theta_ref_startTime = token_value;
+          break;
+        }
       case demo_ap_alt_ref_flag:
-       {
-         demo_ap_alt_ref = true;
-         demo_ap_alt_ref_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_alt_ref_file,
-                               demo_ap_alt_ref_timeArray,
-                               demo_ap_alt_ref_daArray,
-                               demo_ap_alt_ref_ntime);
-         token6 >> token_value;
-         demo_ap_alt_ref_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_alt_ref = true;
+          demo_ap_alt_ref_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_alt_ref_file,
+                                demo_ap_alt_ref_timeArray,
+                                demo_ap_alt_ref_daArray,
+                                demo_ap_alt_ref_ntime);
+          token6 >> token_value;
+          demo_ap_alt_ref_startTime = token_value;
+          break;
+        }
       case demo_ap_Phi_ref_flag:
-       {
-         demo_ap_Phi_ref = true;
-         demo_ap_Phi_ref_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_Phi_ref_file,
-                               demo_ap_Phi_ref_timeArray,
-                               demo_ap_Phi_ref_daArray,
-                               demo_ap_Phi_ref_ntime);
-         token6 >> token_value;
-         demo_ap_Phi_ref_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_Phi_ref = true;
+          demo_ap_Phi_ref_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_Phi_ref_file,
+                                demo_ap_Phi_ref_timeArray,
+                                demo_ap_Phi_ref_daArray,
+                                demo_ap_Phi_ref_ntime);
+          token6 >> token_value;
+          demo_ap_Phi_ref_startTime = token_value;
+          break;
+        }
       case demo_ap_Psi_ref_flag:
-       {
-         demo_ap_Psi_ref = true;
-         demo_ap_Psi_ref_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ap_Psi_ref_file,
-                               demo_ap_Psi_ref_timeArray,
-                               demo_ap_Psi_ref_daArray,
-                               demo_ap_Psi_ref_ntime);
-         token6 >> token_value;
-         demo_ap_Psi_ref_startTime = token_value;
-         break;
-       }
+        {
+          demo_ap_Psi_ref = true;
+          demo_ap_Psi_ref_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ap_Psi_ref_file,
+                                demo_ap_Psi_ref_timeArray,
+                                demo_ap_Psi_ref_daArray,
+                                demo_ap_Psi_ref_ntime);
+          token6 >> token_value;
+          demo_ap_Psi_ref_startTime = token_value;
+          break;
+        }
       case tactilefadef_flag:
-       {
-         int tactilefadef_index, i;
-         string tactilefadef_file;
-         double flap_value;
-         tactilefadef = true;
-         tactilefadef_file = aircraft_directory + linetoken3;
-         token4 >> tactilefadef_index;
-         if (tactilefadef_index < 0 || tactilefadef_index >= 30)
-           uiuc_warnings_errors(1, *command_line);
-         if (tactilefadef_index > tactilefadef_nf)
-           tactilefadef_nf = tactilefadef_index;
-         token5 >> flap_value;
-         token6 >> token_value_convert1;
-         token7 >> token_value_convert2;
-         token8 >> token_value_convert3;
-         token9 >> token_value_convert4;
-         token10 >> tactilefadef_nice;
-         convert_z = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         convert_y = uiuc_convert(token_value_convert3);
-         convert_f = uiuc_convert(token_value_convert4);
-         tactilefadef_fArray[tactilefadef_index] = flap_value * convert_f;
-         /* call 2D File Reader with file name (tactilefadef_file) and 
-            conversion factors; function returns array of 
-            elevator deflections (deArray) and corresponding 
-            alpha (aArray) and delta CZ (CZArray) values and 
-            max number of terms in alpha arrays (nAlphaArray) 
-            and delfection array (nde) */
-         uiuc_2DdataFileReader(tactilefadef_file,
-                               datafile_xArray,
-                               datafile_yArray,
-                               datafile_zArray,
-                               datafile_nxArray,
-                               datafile_ny);
-         d_2_to_3(datafile_xArray, tactilefadef_aArray, tactilefadef_index);
-         d_1_to_2(datafile_yArray, tactilefadef_deArray, tactilefadef_index);
-         d_2_to_3(datafile_zArray, tactilefadef_tactileArray, tactilefadef_index);
-         i_1_to_2(datafile_nxArray, tactilefadef_nAlphaArray, tactilefadef_index);
-         tactilefadef_nde[tactilefadef_index] = datafile_ny;
-         if (tactilefadef_first==true)
-           {
-             if (tactilefadef_nice == 1)
-               {
-                 tactilefadef_na_nice = datafile_nxArray[1];
-                 tactilefadef_nde_nice = datafile_ny;
-                 d_1_to_1(datafile_yArray, tactilefadef_deArray_nice);
-                 for (i=1; i<=tactilefadef_na_nice; i++)
-                   tactilefadef_aArray_nice[i] = datafile_xArray[1][i];
-               }
-             tactilefadef_first=false;
-           }
-         break;
-       }
+        {
+          int tactilefadef_index, i;
+          string tactilefadef_file;
+          double flap_value;
+          tactilefadef = true;
+          tactilefadef_file = aircraft_directory + linetoken3;
+          token4 >> tactilefadef_index;
+          if (tactilefadef_index < 0 || tactilefadef_index >= 30)
+            uiuc_warnings_errors(1, *command_line);
+          if (tactilefadef_index > tactilefadef_nf)
+            tactilefadef_nf = tactilefadef_index;
+          token5 >> flap_value;
+          token6 >> token_value_convert1;
+          token7 >> token_value_convert2;
+          token8 >> token_value_convert3;
+          token9 >> token_value_convert4;
+          token10 >> tactilefadef_nice;
+          convert_z = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          convert_y = uiuc_convert(token_value_convert3);
+          convert_f = uiuc_convert(token_value_convert4);
+          tactilefadef_fArray[tactilefadef_index] = flap_value * convert_f;
+          /* call 2D File Reader with file name (tactilefadef_file) and 
+             conversion factors; function returns array of 
+             elevator deflections (deArray) and corresponding 
+             alpha (aArray) and delta CZ (CZArray) values and 
+             max number of terms in alpha arrays (nAlphaArray) 
+             and delfection array (nde) */
+          uiuc_2DdataFileReader(tactilefadef_file,
+                                datafile_xArray,
+                                datafile_yArray,
+                                datafile_zArray,
+                                datafile_nxArray,
+                                datafile_ny);
+          d_2_to_3(datafile_xArray, tactilefadef_aArray, tactilefadef_index);
+          d_1_to_2(datafile_yArray, tactilefadef_deArray, tactilefadef_index);
+          d_2_to_3(datafile_zArray, tactilefadef_tactileArray, tactilefadef_index);
+          i_1_to_2(datafile_nxArray, tactilefadef_nAlphaArray, tactilefadef_index);
+          tactilefadef_nde[tactilefadef_index] = datafile_ny;
+          if (tactilefadef_first==true)
+            {
+              if (tactilefadef_nice == 1)
+                {
+                  tactilefadef_na_nice = datafile_nxArray[1];
+                  tactilefadef_nde_nice = datafile_ny;
+                  d_1_to_1(datafile_yArray, tactilefadef_deArray_nice);
+                  for (i=1; i<=tactilefadef_na_nice; i++)
+                    tactilefadef_aArray_nice[i] = datafile_xArray[1][i];
+                }
+              tactilefadef_first=false;
+            }
+          break;
+        }
       case tactile_pitch_flag:
-       {
-         tactile_pitch = 1;
-         break;
-       }
+        {
+          tactile_pitch = 1;
+          break;
+        }
       case demo_tactile_flag:
-       {
-         demo_tactile = true;
-         demo_tactile_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_tactile_file,
-                               demo_tactile_timeArray,
-                               demo_tactile_daArray,
-                               demo_tactile_ntime);
-         token6 >> token_value;
-         demo_tactile_startTime = token_value;
-         break;
-       }
+        {
+          demo_tactile = true;
+          demo_tactile_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_tactile_file,
+                                demo_tactile_timeArray,
+                                demo_tactile_daArray,
+                                demo_tactile_ntime);
+          token6 >> token_value;
+          demo_tactile_startTime = token_value;
+          break;
+        }
       case demo_ice_tail_flag:
-       {
-         demo_ice_tail = true;
-         demo_ice_tail_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ice_tail_file,
-                               demo_ice_tail_timeArray,
-                               demo_ice_tail_daArray,
-                               demo_ice_tail_ntime);
-         token6 >> token_value;
-         demo_ice_tail_startTime = token_value;
-         break;
-       }
+        {
+          demo_ice_tail = true;
+          demo_ice_tail_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ice_tail_file,
+                                demo_ice_tail_timeArray,
+                                demo_ice_tail_daArray,
+                                demo_ice_tail_ntime);
+          token6 >> token_value;
+          demo_ice_tail_startTime = token_value;
+          break;
+        }
       case demo_ice_left_flag:
-       {
-         demo_ice_left = true;
-         demo_ice_left_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ice_left_file,
-                               demo_ice_left_timeArray,
-                               demo_ice_left_daArray,
-                               demo_ice_left_ntime);
-         token6 >> token_value;
-         demo_ice_left_startTime = token_value;
-         break;
-       }
+        {
+          demo_ice_left = true;
+          demo_ice_left_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ice_left_file,
+                                demo_ice_left_timeArray,
+                                demo_ice_left_daArray,
+                                demo_ice_left_ntime);
+          token6 >> token_value;
+          demo_ice_left_startTime = token_value;
+          break;
+        }
       case demo_ice_right_flag:
-       {
-         demo_ice_right = true;
-         demo_ice_right_file = aircraft_directory + linetoken3;
-         token4 >> token_value_convert1;
-         token5 >> token_value_convert2;
-         convert_y = uiuc_convert(token_value_convert1);
-         convert_x = uiuc_convert(token_value_convert2);
-         uiuc_1DdataFileReader(demo_ice_right_file,
-                               demo_ice_right_timeArray,
-                               demo_ice_right_daArray,
-                               demo_ice_right_ntime);
-         token6 >> token_value;
-         demo_ice_right_startTime = token_value;
-         break;
-       }
+        {
+          demo_ice_right = true;
+          demo_ice_right_file = aircraft_directory + linetoken3;
+          token4 >> token_value_convert1;
+          token5 >> token_value_convert2;
+          convert_y = uiuc_convert(token_value_convert1);
+          convert_x = uiuc_convert(token_value_convert2);
+          uiuc_1DdataFileReader(demo_ice_right_file,
+                                demo_ice_right_timeArray,
+                                demo_ice_right_daArray,
+                                demo_ice_right_ntime);
+          token6 >> token_value;
+          demo_ice_right_startTime = token_value;
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index de411bbfb32d64d2f018658ed5ce10893e97f78f..6d996b1c10372cacae89e717e4c0363716ff710b 100644 (file)
@@ -13,9 +13,9 @@
 
 void parse_ice( const string& linetoken2, const string& linetoken3,
                 const string& linetoken4, const string& linetoken5,
-               const string& linetoken6, const string& linetoken7, 
-               const string& linetoken8, const string& linetoken9,
-               const string& linetoken10, const string& aircraft_directory,
-               LIST command_line );
+                const string& linetoken6, const string& linetoken7, 
+                const string& linetoken8, const string& linetoken9,
+                const string& linetoken10, const string& aircraft_directory,
+                LIST command_line );
 
 #endif //_MENU_ICE_H_
index 889ef2eb488ea12f5e574fdafdf07e3ad3f36a5e..bda8e7f7fe68bd98da4d71786a72caf9080742e8 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -90,10 +90,10 @@ using std::exit;
 
 void parse_init( const string& linetoken2, const string& linetoken3,
                  const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory,
-                LIST command_line ) {
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory,
+                 LIST command_line ) {
     double token_value;
     istringstream token3(linetoken3.c_str());
     istringstream token4(linetoken4.c_str());
@@ -108,386 +108,386 @@ void parse_init( const string& linetoken2, const string& linetoken3,
     switch(init_map[linetoken2])
       {
       case Dx_pilot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dx_pilot = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dx_pilot = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Dy_pilot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dy_pilot = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dy_pilot = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Dz_pilot_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dz_pilot = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dz_pilot = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Dx_cg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dx_cg = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dx_cg = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Dy_cg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dy_cg = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dy_cg = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Dz_cg_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Dz_cg = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Dz_cg = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Altitude_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Altitude = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Altitude = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case V_north_flag:
-       {
-         if (check_float(linetoken3)) 
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         V_north = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3)) 
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          V_north = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case V_east_flag:
-       {
-         initParts -> storeCommands (*command_line);
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         V_east = token_value;
-         break;
-       }
+        {
+          initParts -> storeCommands (*command_line);
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          V_east = token_value;
+          break;
+        }
       case V_down_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         V_down = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          V_down = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case P_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         P_body_init_true = true;
-         P_body_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          P_body_init_true = true;
+          P_body_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Q_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Q_body_init_true = true;
-         Q_body_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Q_body_init_true = true;
+          Q_body_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case R_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         R_body_init_true = true;
-         R_body_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          R_body_init_true = true;
+          R_body_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Phi_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Phi_init_true = true;
-         Phi_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Phi_init_true = true;
+          Phi_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Theta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Theta_init_true = true;
-         Theta_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Theta_init_true = true;
+          Theta_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Psi_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Psi_init_true = true;
-         Psi_init = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Psi_init_true = true;
+          Psi_init = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case Long_trim_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Long_trim = token_value;
-         initParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Long_trim = token_value;
+          initParts -> storeCommands (*command_line);
+          break;
+        }
       case recordRate_flag:
-       {
-         //can't use check_float since variable is integer
-         token3 >> token_value_recordRate;
-         recordRate = 120 / token_value_recordRate;
-         break;
-       }
+        {
+          //can't use check_float since variable is integer
+          token3 >> token_value_recordRate;
+          recordRate = 120 / token_value_recordRate;
+          break;
+        }
       case recordStartTime_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         recordStartTime = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          recordStartTime = token_value;
+          break;
+        }
       case use_V_rel_wind_2U_flag:
-       {
-         use_V_rel_wind_2U = true;
-         break;
-       }
+        {
+          use_V_rel_wind_2U = true;
+          break;
+        }
       case nondim_rate_V_rel_wind_flag:
-       {
-         nondim_rate_V_rel_wind = true;
-         break;
-       }
+        {
+          nondim_rate_V_rel_wind = true;
+          break;
+        }
       case use_abs_U_body_2U_flag:
-       {
-         use_abs_U_body_2U = true;
-         break;
-       }
+        {
+          use_abs_U_body_2U = true;
+          break;
+        }
       case dyn_on_speed_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         dyn_on_speed = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          dyn_on_speed = token_value;
+          break;
+        }
       case dyn_on_speed_zero_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         dyn_on_speed_zero = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          dyn_on_speed_zero = token_value;
+          break;
+        }
       case use_dyn_on_speed_curve1_flag:
-       {
-         use_dyn_on_speed_curve1 = true;
-         break;
-       }
+        {
+          use_dyn_on_speed_curve1 = true;
+          break;
+        }
       case use_Alpha_dot_on_speed_flag:
-       {
-         use_Alpha_dot_on_speed = true;
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         Alpha_dot_on_speed = token_value;
-         break;
-       }
+        {
+          use_Alpha_dot_on_speed = true;
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          Alpha_dot_on_speed = token_value;
+          break;
+        }
       case use_gamma_horiz_on_speed_flag:
-       {
-         use_gamma_horiz_on_speed = true;
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         gamma_horiz_on_speed = token_value;
-         break;
-       }
+        {
+          use_gamma_horiz_on_speed = true;
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          gamma_horiz_on_speed = token_value;
+          break;
+        }
       case downwashMode_flag:
-       {
-         b_downwashMode = true;
-         token3 >> downwashMode;
-         if (downwashMode==100)
-           ;
-         // compute downwash using downwashCoef, do nothing here
-         else
-           uiuc_warnings_errors(4, *command_line); 
-         break;
-       }
+        {
+          b_downwashMode = true;
+          token3 >> downwashMode;
+          if (downwashMode==100)
+            ;
+          // compute downwash using downwashCoef, do nothing here
+          else
+            uiuc_warnings_errors(4, *command_line); 
+          break;
+        }
       case downwashCoef_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         downwashCoef = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          downwashCoef = token_value;
+          break;
+        }
       case Alpha_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Alpha_init_true = true;
-         Alpha_init = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Alpha_init_true = true;
+          Alpha_init = token_value;
+          break;
+        }
       case Beta_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Beta_init_true = true;
-         Beta_init = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Beta_init_true = true;
+          Beta_init = token_value;
+          break;
+        }
       case U_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         U_body_init_true = true;
-         U_body_init = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          U_body_init_true = true;
+          U_body_init = token_value;
+          break;
+        }
       case V_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         V_body_init_true = true;
-         V_body_init = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          V_body_init_true = true;
+          V_body_init = token_value;
+          break;
+        }
       case W_body_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         W_body_init_true = true;
-         W_body_init = token_value;
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          W_body_init_true = true;
+          W_body_init = token_value;
+          break;
+        }
       case ignore_unknown_keywords_flag:
-       {
-         ignore_unknown_keywords=true;
-         break;
-       }
+        {
+          ignore_unknown_keywords=true;
+          break;
+        }
       case trim_case_2_flag:
-       {
-         trim_case_2 = true;
-         break;
-       }
+        {
+          trim_case_2 = true;
+          break;
+        }
       case use_uiuc_network_flag:
-       {
-         use_uiuc_network = true;
-         server_IP = linetoken3;
-         token4 >> port_num;
-         break;
-       }
+        {
+          use_uiuc_network = true;
+          server_IP = linetoken3;
+          token4 >> port_num;
+          break;
+        }
       case icing_demo_flag:
-       {
-         icing_demo = true;
-         break;
-       }
+        {
+          icing_demo = true;
+          break;
+        }
       case outside_control_flag:
-       {
-         outside_control = true;
-         break;
-       }
+        {
+          outside_control = true;
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords){
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords){
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index 62a407d3c052973c8b6df0082c477ac0628a6335..6b793eae9e461aacf5f30d7bbc60b98d9ce0e66b 100644 (file)
@@ -13,9 +13,9 @@
 
 void parse_init( const string& linetoken2, const string& linetoken3,
                  const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory,
-                LIST command_line );
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory,
+                 LIST command_line );
 
 #endif //_MENU_INIT_H_
index e956b6180854e34ec44f5ca6b47bf5d14a734c43..f1f3115a136c89d2ed76daf2768fd1b75691f032 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -89,10 +89,10 @@ using std::exit;
 
 void parse_mass( const string& linetoken2, const string& linetoken3,
                  const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory,
-                LIST command_line ) {
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory,
+                 LIST command_line ) {
     double token_value;
     istringstream token3(linetoken3.c_str());
     istringstream token4(linetoken4.c_str());
@@ -106,169 +106,169 @@ void parse_mass( const string& linetoken2, const string& linetoken3,
     switch(mass_map[linetoken2])
       {
       case Weight_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Weight = token_value;
-         Mass = Weight * INVG;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Weight = token_value;
+          Mass = Weight * INVG;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case Mass_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Mass = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Mass = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_xx_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_xx = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_xx = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_yy_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_yy = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_yy = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_zz_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_zz = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_zz = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_xz_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_xz = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_xz = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case Mass_appMass_ratio_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Mass_appMass_ratio = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Mass_appMass_ratio = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_xx_appMass_ratio_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_xx_appMass_ratio = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_xx_appMass_ratio = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_yy_appMass_ratio_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_yy_appMass_ratio = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_yy_appMass_ratio = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_zz_appMass_ratio_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_zz_appMass_ratio = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_zz_appMass_ratio = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case Mass_appMass_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         Mass_appMass = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          Mass_appMass = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_xx_appMass_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_xx_appMass = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_xx_appMass = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_yy_appMass_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_yy_appMass = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_yy_appMass = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       case I_zz_appMass_flag:
-       {
-         if (check_float(linetoken3))
-           token3 >> token_value;
-         else
-           uiuc_warnings_errors(1, *command_line);
-         
-         I_zz_appMass = token_value;
-         massParts -> storeCommands (*command_line);
-         break;
-       }
+        {
+          if (check_float(linetoken3))
+            token3 >> token_value;
+          else
+            uiuc_warnings_errors(1, *command_line);
+          
+          I_zz_appMass = token_value;
+          massParts -> storeCommands (*command_line);
+          break;
+        }
       default:
-       {
-         if (ignore_unknown_keywords) {
-           // do nothing
-         } else {
-           // print error message
-           uiuc_warnings_errors(2, *command_line);
-         }
-         break;
-       }
+        {
+          if (ignore_unknown_keywords) {
+            // do nothing
+          } else {
+            // print error message
+            uiuc_warnings_errors(2, *command_line);
+          }
+          break;
+        }
       };
 }
index fb0d1ad55547bc32f92672ac67c0ed4b10c6473a..9ec697ecf195ccf399759a697bdcafebf659a8e2 100644 (file)
@@ -13,9 +13,9 @@
 
 void parse_mass( const string& linetoken2, const string& linetoken3,
                  const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10,const string& aircraft_directory,
-                LIST command_line );
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10,const string& aircraft_directory,
+                 LIST command_line );
 
 #endif //_MENU_MASS_H_
index 2817d24a1c5516f3a80a3f62724c848b0383c6d9..58db1c53aa95d6ce512f9b7bdeb470e0e18b8d2d 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -88,11 +88,11 @@ using std::exit;
 #endif
 
 void parse_misc( const string& linetoken2, const string& linetoken3,
-                const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory, 
-                LIST command_line ) {
+                 const string& linetoken4, const string& linetoken5, 
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory, 
+                 LIST command_line ) {
   double token_value;
   istringstream token3(linetoken3.c_str());
   istringstream token4(linetoken4.c_str());
@@ -107,55 +107,55 @@ void parse_misc( const string& linetoken2, const string& linetoken3,
     {
     case simpleHingeMomentCoef_flag:
       {
-       if (check_float(linetoken3))
-         token3 >> token_value;
-       else
-         uiuc_warnings_errors(1, *command_line);
-       
-       simpleHingeMomentCoef = token_value;
-       break;
+        if (check_float(linetoken3))
+          token3 >> token_value;
+        else
+          uiuc_warnings_errors(1, *command_line);
+        
+        simpleHingeMomentCoef = token_value;
+        break;
       }
       //case dfTimefdf_flag:
       //{
       //dfTimefdf = linetoken3;
-       /* call 1D File Reader with file name (dfTimefdf);
-          function returns array of dfs (dfArray) and 
-          corresponding time values (TimeArray) and max 
-          number of terms in arrays (ndf) */
-       //uiuc_1DdataFileReader(dfTimefdf,
-       //                    dfTimefdf_dfArray,
-       //                    dfTimefdf_TimeArray,
-       //                    dfTimefdf_ndf);
-       //break;
+        /* call 1D File Reader with file name (dfTimefdf);
+           function returns array of dfs (dfArray) and 
+           corresponding time values (TimeArray) and max 
+           number of terms in arrays (ndf) */
+        //uiuc_1DdataFileReader(dfTimefdf,
+        //                      dfTimefdf_dfArray,
+        //                      dfTimefdf_TimeArray,
+        //                      dfTimefdf_ndf);
+        //break;
       //}
     case flapper_flag:
       {
-       string flap_file;
-       
-       flap_file = aircraft_directory + "flap.dat";
-       flapper_model = true;
-       flapper_data = new FlapData(flap_file.c_str());
-       break;
+        string flap_file;
+        
+        flap_file = aircraft_directory + "flap.dat";
+        flapper_model = true;
+        flapper_data = new FlapData(flap_file.c_str());
+        break;
       }
     case flapper_phi_init_flag:
       {
-       if (check_float(linetoken3))
-         token3 >> token_value;
-       else
-         uiuc_warnings_errors(1, *command_line);
-       
-       flapper_phi_init = token_value*DEG_TO_RAD;
-       break;
+        if (check_float(linetoken3))
+          token3 >> token_value;
+        else
+          uiuc_warnings_errors(1, *command_line);
+        
+        flapper_phi_init = token_value*DEG_TO_RAD;
+        break;
       }
     default:
       {
-       if (ignore_unknown_keywords) {
-         // do nothing
-       } else {
-         // print error message
-         uiuc_warnings_errors(2, *command_line);
-       }
-       break;
+        if (ignore_unknown_keywords) {
+          // do nothing
+        } else {
+          // print error message
+          uiuc_warnings_errors(2, *command_line);
+        }
+        break;
       }
     };
 }
index c011921b5ae8635eef28c877c4642702e4a09ffe..27870ae6de0e378376d1821bd0d2c03abdce2f7b 100644 (file)
 #include "uiuc_flapdata.h"
 
 void parse_misc( const string& linetoken2, const string& linetoken3,
-                const string& linetoken4, const string& linetoken5, 
-                const string& linetoken6, const string& linetoken7, 
-                const string& linetoken8, const string& linetoken9,
-                const string& linetoken10, const string& aircraft_directory, 
-                LIST command_line );
+                 const string& linetoken4, const string& linetoken5, 
+                 const string& linetoken6, const string& linetoken7, 
+                 const string& linetoken8, const string& linetoken9,
+                 const string& linetoken10, const string& aircraft_directory, 
+                 LIST command_line );
 
 #endif //_MENU_MISC_H_
index 12701c9a8e7cece62c15f92b191d539d087289f7..d64188a13fee630dffe5d5b4caad7e8018c22ed2 100644 (file)
 ----------------------------------------------------------------------
 
  CALLS TO:     check_float() if needed
-              d_2_to_3() if needed
-              d_1_to_2() if needed
-              i_1_to_2() if needed
-              d_1_to_1() if needed
+               d_2_to_3() if needed
+               d_1_to_2() if needed
+               i_1_to_2() if needed
+               d_1_to_1() if needed
 
  ----------------------------------------------------------------------
 
@@ -91,11 +91,11 @@ using std::exit;
 #endif
 
 void parse_record( const string& linetoken2, const string& linetoken3,
-                  const string& linetoken4, const string& linetoken5, 
-                  const string& linetoken6, const string& linetoken7, 
-                  const string& linetoken8, const string& linetoken9,
-                  const string& linetoken10, const string& aircraft_directory,
-                  LIST command_line ) {
+                   const string& linetoken4, const string& linetoken5, 
+                   const string& linetoken6, const string& linetoken7, 
+                   const string& linetoken8, const string& linetoken9,
+                   const string& linetoken10, const string& aircraft_directory,
+                   LIST command_line ) {
 
   istringstream token3(linetoken3.c_str());
   istringstream token4(linetoken4.c_str());
index bf4d8048989d5e2b44d40e0be9a9794d67d81a43..ae2bb892e74cd51ee458fdb0e8c6e19ff08d30b9 100644 (file)
 #include <FDM/LaRCsim/ls_constants.h>  /* INVG defined */
 
 void parse_record( const string& linetoken2, const string& linetoken3,
-                  const string& linetoken4, const string& linetoken5, 
-                  const string& linetoken6, const string& linetoken7, 
-                  const string& linetoken8, const string& linetoken9,
-                  const string& linetoken10, const string& aircraft_directory,
-                  LIST command_line );
+                   const string& linetoken4, const string& linetoken5, 
+                   const string& linetoken6, const string& linetoken7, 
+                   const string& linetoken8, const string& linetoken9,
+                   const string& linetoken10, const string& aircraft_directory,
+                   LIST command_line );
 
 #endif //_MENU_RECORD_H_
index 84e4f915c606d63037a0aee4bf5f3fe9007edc4f..a39e54cd41fec23fd68d6d1b50b66d047d149717 100644 (file)
@@ -45,7 +45,7 @@
 #include "uiuc_pah_ap.h"
 //#include <stdio.h>
 double pah_ap(double pitch, double pitchrate, double pitch_ref, double V,
-             double sample_time, int init)
+              double sample_time, int init)
 {
   // changes by RD so function keeps previous values
   static double u2prev;
@@ -84,10 +84,10 @@ double pah_ap(double pitch, double pitchrate, double pitch_ref, double V,
   // the following is using the actuator dynamics given in Beaver.
   // the actuator dynamics for Twin Otter are still unavailable.
   x1 = x1prev +(-10.951*x1prev + 7.2721*x2prev + 20.7985*x3prev +
-               25.1568*totalU)*sample_time;
+                25.1568*totalU)*sample_time;
   x2 = x2prev + x3prev*sample_time;
   x3 = x3prev + (7.3446*x1prev - 668.6713*x2prev - 16.8697*x3prev +
-                5.8694*totalU)*sample_time;
+                 5.8694*totalU)*sample_time;
   deltae = 57.2958*x2;
   //deltae = x2;
   //printf("x1prev=%f\n",x1prev);
@@ -102,7 +102,7 @@ double pah_ap(double pitch, double pitchrate, double pitch_ref, double V,
   //printf("deltae=%f\n",deltae);
   return deltae;
 } 
-                       
+                        
 
-               
+                
 
index 1fa67ac08f65f22a4c55853d12ea4c08d40eea29..ad0dd35e03167f4106dbf88d061ed4b27ecac4ed 100644 (file)
@@ -3,6 +3,6 @@
 #define _PAH_AP_H_
 
 double pah_ap(double pitch, double pitchrate, double pitch_ref, double V,
-             double sample_t, int init);
+              double sample_t, int init);
 
 #endif //_PAH_AP_H_
index 0858aa39ae342e1bb534e3c49f3473dcb99b106a..69040a22d4f6aad32c2f105301ca52e52edb6eb9 100644 (file)
@@ -86,16 +86,16 @@ void ParseFile :: removeComments(string& inputLine)
   if (pos != inputLine.npos) // a "#" exists in the line 
   {
         if (inputLine.find_first_not_of(DELIMITERS) == pos)
-         {
-           inputLine = ""; // Complete line a comment
-         }
+          {
+            inputLine = ""; // Complete line a comment
+          }
         else
           {
-           inputLine = inputLine.substr(0,pos); //Truncate the comment from the line
-           // append zeros to the input line after stripping off the comments
-           // mss added from Bipin email of 9/3/02
-           //      inputLine += " 0 0 0 0 0 0";
-         }
+            inputLine = inputLine.substr(0,pos); //Truncate the comment from the line
+            // append zeros to the input line after stripping off the comments
+            // mss added from Bipin email of 9/3/02
+            //            inputLine += " 0 0 0 0 0 0";
+          }
   }
 }
 
@@ -156,7 +156,7 @@ void ParseFile :: storeCommands(string inputLine)
 //     removeComments(line);
 //     if (line.find_first_not_of(DELIMITERS) != line.npos) // strip off blank lines
 //     {
-//             line += "     0 0 0 0 0";
+//             line += "     0 0 0 0 0";
 //          storeCommands(line);
 //     }
 //    }
@@ -170,12 +170,12 @@ void ParseFile :: readFile()
     {
       removeComments(line);
       if (line.find_first_not_of(DELIMITERS) != line.npos) // strip off blank lines
-       {
-         line += "     ";
-         // append some zeros, but this is doing something strange!
-         //              line += "  0 0 0 0 0   ";
-         storeCommands(line);
-       }
+        {
+          line += "     ";
+          // append some zeros, but this is doing something strange!
+          //                    line += "  0 0 0 0 0   ";
+          storeCommands(line);
+        }
     }
 }
 stack ParseFile :: getCommands()
index ac4404e9d4368d61ea78a464805adff5ad10f60a..1e60411444405522054b6e695fb2b73db8b51e51 100644 (file)
@@ -56,8 +56,8 @@
 // (RD) changed float to double
 
 void rah_ap(double phi, double phirate, double phi_ref, double V,
-           double sample_time, double b, double yawrate, double ctr_defl[2],
-           int init)
+            double sample_time, double b, double yawrate, double ctr_defl[2],
+            int init)
 {
 
   static double u2prev;
@@ -79,45 +79,45 @@ void rah_ap(double phi, double phirate, double phi_ref, double V,
       x6prev = 0;
     }
 
-       double Kphi;
-       double Kr;
-       double Ki;
-       double drr;
-       double dar;
-       double deltar;
-       double deltaa;
-       double x1, x2, x3, x4, x5, x6;
-       Kphi = 0.000975*V*V - 0.108*V + 2.335625;
-       Kr = -4;
-       Ki = 0.25;
-       dar = 0.165;
-       drr = -0.000075*V*V + 0.0095*V -0.4606;
-       double u1,u2,u3,u4,u5,u6,u7,ubar,udbar;
-       u1 = Kphi*(phi_ref-phi);
-       u2 = u2prev + Ki*Kphi*(phi_ref-phi)*sample_time;
-       u3 = dar*yawrate;
-       u4 = u1 + u2 + u3;
-       u2prev = u2;
-       double K1,K2;
-       K1 = Kr*9.8*sin(phi)/V;
-       K2 = drr - Kr;
-       u5 = K2*yawrate;
-       u6 = K1*phi;
-       u7 = u5 + u6; 
-       ubar = phirate*b/(2*V);
-       udbar = yawrate*b/(2*V);
+        double Kphi;
+        double Kr;
+        double Ki;
+        double drr;
+        double dar;
+        double deltar;
+        double deltaa;
+        double x1, x2, x3, x4, x5, x6;
+        Kphi = 0.000975*V*V - 0.108*V + 2.335625;
+        Kr = -4;
+        Ki = 0.25;
+        dar = 0.165;
+        drr = -0.000075*V*V + 0.0095*V -0.4606;
+        double u1,u2,u3,u4,u5,u6,u7,ubar,udbar;
+        u1 = Kphi*(phi_ref-phi);
+        u2 = u2prev + Ki*Kphi*(phi_ref-phi)*sample_time;
+        u3 = dar*yawrate;
+        u4 = u1 + u2 + u3;
+        u2prev = u2;
+        double K1,K2;
+        K1 = Kr*9.8*sin(phi)/V;
+        K2 = drr - Kr;
+        u5 = K2*yawrate;
+        u6 = K1*phi;
+        u7 = u5 + u6; 
+        ubar = phirate*b/(2*V);
+        udbar = yawrate*b/(2*V);
 // the following is using the actuator dynamics to get the aileron 
 // angle, given in Beaver.
 // the actuator dynamics for Twin Otter are still unavailable.
-       x1 = x1prev +(-10.6*x1prev - 2.64*x2prev -7.58*x3prev +
+        x1 = x1prev +(-10.6*x1prev - 2.64*x2prev -7.58*x3prev +
 27.46*u4 -0.0008*ubar)*sample_time;
-       x2 = x2prev + x3prev*sample_time;
-       x3 = x3prev + (1.09*x1prev - 558.86*x2prev - 23.35*x3prev +
+        x2 = x2prev + x3prev*sample_time;
+        x3 = x3prev + (1.09*x1prev - 558.86*x2prev - 23.35*x3prev +
 3.02*u4 - 0.164*ubar)*sample_time;
-       deltaa = 57.3*x2;
-       x1prev = x1;
-       x2prev = x2;
-       x3prev = x3;
+        deltaa = 57.3*x2;
+        x1prev = x1;
+        x2prev = x2;
+        x3prev = x3;
 
 // the following is using the actuator dynamics to get the rudder
 // angle, given in Beaver.
@@ -132,6 +132,6 @@ void rah_ap(double phi, double phirate, double phi_ref, double V,
         x5prev = x5;
         x6prev = x6;
         ctr_defl[0] = deltaa;
-       ctr_defl[1] = deltar;
+        ctr_defl[1] = deltar;
 return;
 } 
index 047fda53e0c7922093825210a13c7d51a6c72087..33f3eed1bb04466e817818c7784df5e513aeea7f 100644 (file)
@@ -6,7 +6,7 @@
 #include <cmath>
 
 void rah_ap(double phi, double phirate, double phi_ref, double V,
-           double sample_time, double b, double yawrate, double ctr_defl[2],
-           int init);
+            double sample_time, double b, double yawrate, double ctr_defl[2],
+            int init);
 
 #endif //_RAH_AP_H_
index 3264ad184af86601dc755d01f133f39276b2ab3b..b620daf9c02e07c73778257cfa9204fb8236a8e6 100644 (file)
                             and rudder inputs to record map
                04/24/2000   (JS) added rest of variables in 
                             ls_generic.h
-              07/06/2001   (RD) changed Flap handle output
-              07/20/2001   (RD) fixed Lat_control and Rudder_pedal
+               07/06/2001   (RD) changed Flap handle output
+               07/20/2001   (RD) fixed Lat_control and Rudder_pedal
                10/25/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (Cxfxxf0I)
+                            linear Twin Otter model at zero flaps
+                            (Cxfxxf0I)
                11/12/2001   (RD) Added new variables needed for the non-
-                           linear Twin Otter model at zero flaps
-                           (CxfxxfI).  Removed zero flap variables.
-                           Added flap_pos and flap_cmd_deg.
-              02/13/2002   (RD) Added variables so linear aero model
-                           values can be recorded
+                            linear Twin Otter model at zero flaps
+                            (CxfxxfI).  Removed zero flap variables.
+                            Added flap_pos and flap_cmd_deg.
+               02/13/2002   (RD) Added variables so linear aero model
+                            values can be recorded
                03/03/2003   (RD) Added flap_cmd_record
                03/16/2003   (RD) Added trigger record variables
                07/17/2003   (RD) Added error checking code (default
@@ -48,7 +48,7 @@
 
  AUTHOR(S):    Jeff Scott         http://www.jeffscott.net/
                Robert Deters      <rdeters@uiuc.edu>
-              Michael Selig      <m-selig@uiuc.edu>
+               Michael Selig      <m-selig@uiuc.edu>
 ----------------------------------------------------------------------
 
  VARIABLES:
@@ -98,7 +98,7 @@
 
 #include "uiuc_recorder.h"
 
-using std::endl;               // -dw
+using std::endl;                // -dw
 
 void uiuc_recorder( double dt )
 {
@@ -397,11 +397,11 @@ void uiuc_recorder( double dt )
                 fout << V_down << " ";
                 break;
               }
-           case V_down_fpm_record:
-             {
-               fout << V_down * 60 << " ";
-               break;
-             }
+            case V_down_fpm_record:
+              {
+                fout << V_down * 60 << " ";
+                break;
+              }
             case V_north_rel_ground_record:
               {
                 fout << V_north_rel_ground << " ";
@@ -847,11 +847,11 @@ void uiuc_recorder( double dt )
                 fout << elevator * RAD_TO_DEG << " ";
                 break;
               }
-           case elevator_sas_deg_record:
-             {
-               fout << elevator_sas * RAD_TO_DEG << " ";
-               break;
-             }
+            case elevator_sas_deg_record:
+              {
+                fout << elevator_sas * RAD_TO_DEG << " ";
+                break;
+              }
             case Lat_control_record:
               {
                 fout << Lat_control << " ";
@@ -867,11 +867,11 @@ void uiuc_recorder( double dt )
                 fout << aileron * RAD_TO_DEG << " ";
                 break;
               }
-           case aileron_sas_deg_record:
-             {
-               fout << aileron_sas * RAD_TO_DEG << " ";
-               break;
-             }
+            case aileron_sas_deg_record:
+              {
+                fout << aileron_sas * RAD_TO_DEG << " ";
+                break;
+              }
             case Rudder_pedal_record:
               {
                 fout << Rudder_pedal << " ";
@@ -887,11 +887,11 @@ void uiuc_recorder( double dt )
                 fout << rudder * RAD_TO_DEG << " ";
                 break;
               }
-           case rudder_sas_deg_record:
-             {
-               fout << rudder_sas * RAD_TO_DEG << " ";
-               break;
-             }
+            case rudder_sas_deg_record:
+              {
+                fout << rudder_sas * RAD_TO_DEG << " ";
+                break;
+              }
             case Flap_handle_record:
               {
                 fout << Flap_handle << " ";
@@ -1182,7 +1182,7 @@ void uiuc_recorder( double dt )
                 break;
               }
             case CZfabetafI_record:
-             {
+              {
                 fout << CZfabetafI << " ";
                 break;
               }
@@ -1406,71 +1406,71 @@ void uiuc_recorder( double dt )
                 fout << CYfbetadrI << " ";
                 break;
               }
-           case CYfabetafI_record:
-             {
-               fout << CYfabetafI << " ";
-               break;
-             }
-           case CYfadafI_record:
-             {
-               fout << CYfadafI << " ";
-               break;
-             }
-           case CYfadrfI_record:
-             {
-               fout << CYfadrfI << " ";
-               break;
-             }
-           case CYfapfI_record:
-             {
-               fout << CYfapfI << " ";
-               break;
-             }
-           case CYfarfI_record:
-             {
-               fout << CYfarfI << " ";
-               break;
-             }
-           case CYo_save_record:
-             {
-               fout << CYo_save << " ";
-               break;
-             }
-           case CY_beta_save_record:
-             {
-               fout << CY_beta_save << " ";
-               break;
-             }
-           case CY_p_save_record:
-             {
-               fout << CY_p_save << " ";
-               break;
-             }
-           case CY_r_save_record:
-             {
-               fout << CY_r_save << " ";
-               break;
-             }
-           case CY_da_save_record:
-             {
-               fout << CY_da_save << " ";
-               break;
-             }
-           case CY_dr_save_record:
-             {
-               fout << CY_dr_save << " ";
-               break;
-             }
-           case CY_dra_save_record:
-             {
-               fout << CY_dra_save << " ";
-               break;
-             }
-           case CY_bdot_save_record:
-             {
-               fout << CY_bdot_save << " ";
-               break;
-             }
+            case CYfabetafI_record:
+              {
+                fout << CYfabetafI << " ";
+                break;
+              }
+            case CYfadafI_record:
+              {
+                fout << CYfadafI << " ";
+                break;
+              }
+            case CYfadrfI_record:
+              {
+                fout << CYfadrfI << " ";
+                break;
+              }
+            case CYfapfI_record:
+              {
+                fout << CYfapfI << " ";
+                break;
+              }
+            case CYfarfI_record:
+              {
+                fout << CYfarfI << " ";
+                break;
+              }
+            case CYo_save_record:
+              {
+                fout << CYo_save << " ";
+                break;
+              }
+            case CY_beta_save_record:
+              {
+                fout << CY_beta_save << " ";
+                break;
+              }
+            case CY_p_save_record:
+              {
+                fout << CY_p_save << " ";
+                break;
+              }
+            case CY_r_save_record:
+              {
+                fout << CY_r_save << " ";
+                break;
+              }
+            case CY_da_save_record:
+              {
+                fout << CY_da_save << " ";
+                break;
+              }
+            case CY_dr_save_record:
+              {
+                fout << CY_dr_save << " ";
+                break;
+              }
+            case CY_dra_save_record:
+              {
+                fout << CY_dra_save << " ";
+                break;
+              }
+            case CY_bdot_save_record:
+              {
+                fout << CY_bdot_save << " ";
+                break;
+              }
             case Cl_record:
               {
                 fout << Cl << " ";
@@ -1486,66 +1486,66 @@ void uiuc_recorder( double dt )
                 fout << ClfbetadrI << " ";
                 break;
               }
-           case ClfabetafI_record:
-             {
-               fout << ClfabetafI << " ";
-               break;
-             }
-           case ClfadafI_record:
-             {
-               fout << ClfadafI << " ";
-               break;
-             }
-           case ClfadrfI_record:
-             {
-               fout << ClfadrfI << " ";
-               break;
-             }
-           case ClfapfI_record:
-             {
-               fout << ClfapfI << " ";
-               break;
-             }
-           case ClfarfI_record:
-             {
-               fout << ClfarfI << " ";
-               break;
-             }
-           case Clo_save_record:
-             {
-               fout << Clo_save << " ";
-               break;
-             }
-           case Cl_beta_save_record:
-             {
-               fout << Cl_beta_save << " ";
-               break;
-             }
-           case Cl_p_save_record:
-             {
-               fout << Cl_p_save << " ";
-               break;
-             }
-           case Cl_r_save_record:
-             {
-               fout << Cl_r_save << " ";
-               break;
-             }
-           case Cl_da_save_record:
-             {
-               fout << Cl_da_save << " ";
-               break;
-             }
-           case Cl_dr_save_record:
-             {
-               fout << Cl_dr_save << " ";
-               break;
-             }
-           case Cl_daa_save_record:
-             {
-               fout << Cl_daa_save << " ";
-               break;
-             }
+            case ClfabetafI_record:
+              {
+                fout << ClfabetafI << " ";
+                break;
+              }
+            case ClfadafI_record:
+              {
+                fout << ClfadafI << " ";
+                break;
+              }
+            case ClfadrfI_record:
+              {
+                fout << ClfadrfI << " ";
+                break;
+              }
+            case ClfapfI_record:
+              {
+                fout << ClfapfI << " ";
+                break;
+              }
+            case ClfarfI_record:
+              {
+                fout << ClfarfI << " ";
+                break;
+              }
+            case Clo_save_record:
+              {
+                fout << Clo_save << " ";
+                break;
+              }
+            case Cl_beta_save_record:
+              {
+                fout << Cl_beta_save << " ";
+                break;
+              }
+            case Cl_p_save_record:
+              {
+                fout << Cl_p_save << " ";
+                break;
+              }
+            case Cl_r_save_record:
+              {
+                fout << Cl_r_save << " ";
+                break;
+              }
+            case Cl_da_save_record:
+              {
+                fout << Cl_da_save << " ";
+                break;
+              }
+            case Cl_dr_save_record:
+              {
+                fout << Cl_dr_save << " ";
+                break;
+              }
+            case Cl_daa_save_record:
+              {
+                fout << Cl_daa_save << " ";
+                break;
+              }
             case Cn_record:
               {
                 fout << Cn << " ";
@@ -1561,123 +1561,123 @@ void uiuc_recorder( double dt )
                 fout << CnfbetadrI << " ";
                 break;
               }
-           case CnfabetafI_record:
-             {
-               fout << CnfabetafI << " ";
-               break;
-             }
-           case CnfadafI_record:
-             {
-               fout << CnfadafI << " ";
-               break;
-             }
-           case CnfadrfI_record:
-             {
-               fout << CnfadrfI << " ";
-               break;
-             }
-           case CnfapfI_record:
-             {
-               fout << CnfapfI << " ";
-               break;
-             }
-           case CnfarfI_record:
-             {
-               fout << CnfarfI << " ";
-               break;
-             }
-           case Cno_save_record:
-             {
-               fout << Cno_save << " ";
-               break;
-             }
-           case Cn_beta_save_record:
-             {
-               fout << Cn_beta_save << " ";
-               break;
-             }
-           case Cn_p_save_record:
-             {
-               fout << Cn_p_save << " ";
-               break;
-             }
-           case Cn_r_save_record:
-             {
-               fout << Cn_r_save << " ";
-               break;
-             }
-           case Cn_da_save_record:
-             {
-               fout << Cn_da_save << " ";
-               break;
-             }
-           case Cn_dr_save_record:
-             {
-               fout << Cn_dr_save << " ";
-               break;
-             }
-           case Cn_q_save_record:
-             {
-               fout << Cn_q_save << " ";
-               break;
-             }
-           case Cn_b3_save_record:
-             {
-               fout << Cn_b3_save << " ";
-               break;
-             }
+            case CnfabetafI_record:
+              {
+                fout << CnfabetafI << " ";
+                break;
+              }
+            case CnfadafI_record:
+              {
+                fout << CnfadafI << " ";
+                break;
+              }
+            case CnfadrfI_record:
+              {
+                fout << CnfadrfI << " ";
+                break;
+              }
+            case CnfapfI_record:
+              {
+                fout << CnfapfI << " ";
+                break;
+              }
+            case CnfarfI_record:
+              {
+                fout << CnfarfI << " ";
+                break;
+              }
+            case Cno_save_record:
+              {
+                fout << Cno_save << " ";
+                break;
+              }
+            case Cn_beta_save_record:
+              {
+                fout << Cn_beta_save << " ";
+                break;
+              }
+            case Cn_p_save_record:
+              {
+                fout << Cn_p_save << " ";
+                break;
+              }
+            case Cn_r_save_record:
+              {
+                fout << Cn_r_save << " ";
+                break;
+              }
+            case Cn_da_save_record:
+              {
+                fout << Cn_da_save << " ";
+                break;
+              }
+            case Cn_dr_save_record:
+              {
+                fout << Cn_dr_save << " ";
+                break;
+              }
+            case Cn_q_save_record:
+              {
+                fout << Cn_q_save << " ";
+                break;
+              }
+            case Cn_b3_save_record:
+              {
+                fout << Cn_b3_save << " ";
+                break;
+              }
 
               /******************** Ice Detection ********************/
-           case CL_clean_record:
-             {
-               fout << CL_clean << " ";
-               break;
-             }
-           case CL_iced_record:
-             {
-               fout << CL_iced << " ";
-               break;
-             }
-           case CD_clean_record:
-             {
-               fout << CD_clean << " ";
-               break;
-             }
-           case CD_iced_record:
-             {
-               fout << CD_iced << " ";
-               break;
-             }
-           case Cm_clean_record:
-             {
-               fout << Cm_clean << " ";
-               break;
-             }
-           case Cm_iced_record:
-             {
-               fout << Cm_iced << " ";
-               break;
-             }
-           case Ch_clean_record:
-             {
-               fout << Ch_clean << " ";
-               break;
-             }
-           case Ch_iced_record:
-             {
-               fout << Ch_iced << " ";
-               break;
-             }
-           case Cl_clean_record:
-             {
-               fout << Cl_clean << " ";
-               break;
-             }
-           case Cl_iced_record:
-             {
-               fout << Cl_iced << " ";
-               break;
-             }
+            case CL_clean_record:
+              {
+                fout << CL_clean << " ";
+                break;
+              }
+            case CL_iced_record:
+              {
+                fout << CL_iced << " ";
+                break;
+              }
+            case CD_clean_record:
+              {
+                fout << CD_clean << " ";
+                break;
+              }
+            case CD_iced_record:
+              {
+                fout << CD_iced << " ";
+                break;
+              }
+            case Cm_clean_record:
+              {
+                fout << Cm_clean << " ";
+                break;
+              }
+            case Cm_iced_record:
+              {
+                fout << Cm_iced << " ";
+                break;
+              }
+            case Ch_clean_record:
+              {
+                fout << Ch_clean << " ";
+                break;
+              }
+            case Ch_iced_record:
+              {
+                fout << Ch_iced << " ";
+                break;
+              }
+            case Cl_clean_record:
+              {
+                fout << Cl_clean << " ";
+                break;
+              }
+            case Cl_iced_record:
+              {
+                fout << Cl_iced << " ";
+                break;
+              }
             case CLclean_wing_record:
               {
                 fout << CLclean_wing << " ";
@@ -1848,183 +1848,183 @@ void uiuc_recorder( double dt )
                 fout << pct_beta_flow_tail << " ";
                 break;
               }
-           case eta_ice_record:
-             {
-               fout << eta_ice << " ";
-               break;
-             }
-           case eta_wing_left_record:
-             {
-               fout << eta_wing_left << " ";
-               break;
-             }
-           case eta_wing_right_record:
-             {
-               fout << eta_wing_right << " ";
-               break;
-             }
-           case eta_tail_record:
-             {
-               fout << eta_tail << " ";
-               break;
-             }
-           case delta_CL_record:
-             {
-               fout << delta_CL << " ";
-               break;
-             }
-           case delta_CD_record:
-             {
-               fout << delta_CD << " ";
-               break;
-             }
-           case delta_Cm_record:
-             {
-               fout << delta_Cm << " ";
-               break;
-             }
-           case delta_Cl_record:
-             {
-               fout << delta_Cl << " ";
-               break;
-             }
-           case delta_Cn_record:
-             {
-               fout << delta_Cn << " ";
-               break;
-             }
-           case boot_cycle_tail_record:
-             {
-               fout << boot_cycle_tail << " ";
-               break;
-             }
-           case boot_cycle_wing_left_record:
-             {
-               fout << boot_cycle_wing_left << " ";
-               break;
-             }
-           case boot_cycle_wing_right_record:
-             {
-               fout << boot_cycle_wing_right << " ";
-               break;
-             }
-           case autoIPS_tail_record:
-             {
-               fout << autoIPS_tail << " ";
-               break;
-             }
-           case autoIPS_wing_left_record:
-             {
-               fout << autoIPS_wing_left << " ";
-               break;
-             }
-           case autoIPS_wing_right_record:
-             {
-               fout << autoIPS_wing_right << " ";
-               break;
-             }
-           case eps_pitch_input_record:
-             {
-               fout << eps_pitch_input << " ";
-               break;
-             }
-           case eps_alpha_max_record:
-             {
-               fout << eps_alpha_max << " ";
-               break;
-             }
-           case eps_pitch_max_record:
-             {
-               fout << eps_pitch_max << " ";
-               break;
-             }
-           case eps_pitch_min_record:
-             {
-               fout << eps_pitch_min << " ";
-               break;
-             }
-           case eps_roll_max_record:
-             {
-               fout << eps_roll_max << " ";
-               break;
-             }
-           case eps_thrust_min_record:
-             {
-               fout << eps_thrust_min << " ";
-               break;
-             }
-           case eps_flap_max_record:
-             {
-               fout << eps_flap_max << " ";
-               break;
-             }
-           case eps_airspeed_max_record:
-             {
-               fout << eps_airspeed_max << " ";
-               break;
-             }
-           case eps_airspeed_min_record:
-             {
-               fout << eps_airspeed_min << " ";
-               break;
-             }
+            case eta_ice_record:
+              {
+                fout << eta_ice << " ";
+                break;
+              }
+            case eta_wing_left_record:
+              {
+                fout << eta_wing_left << " ";
+                break;
+              }
+            case eta_wing_right_record:
+              {
+                fout << eta_wing_right << " ";
+                break;
+              }
+            case eta_tail_record:
+              {
+                fout << eta_tail << " ";
+                break;
+              }
+            case delta_CL_record:
+              {
+                fout << delta_CL << " ";
+                break;
+              }
+            case delta_CD_record:
+              {
+                fout << delta_CD << " ";
+                break;
+              }
+            case delta_Cm_record:
+              {
+                fout << delta_Cm << " ";
+                break;
+              }
+            case delta_Cl_record:
+              {
+                fout << delta_Cl << " ";
+                break;
+              }
+            case delta_Cn_record:
+              {
+                fout << delta_Cn << " ";
+                break;
+              }
+            case boot_cycle_tail_record:
+              {
+                fout << boot_cycle_tail << " ";
+                break;
+              }
+            case boot_cycle_wing_left_record:
+              {
+                fout << boot_cycle_wing_left << " ";
+                break;
+              }
+            case boot_cycle_wing_right_record:
+              {
+                fout << boot_cycle_wing_right << " ";
+                break;
+              }
+            case autoIPS_tail_record:
+              {
+                fout << autoIPS_tail << " ";
+                break;
+              }
+            case autoIPS_wing_left_record:
+              {
+                fout << autoIPS_wing_left << " ";
+                break;
+              }
+            case autoIPS_wing_right_record:
+              {
+                fout << autoIPS_wing_right << " ";
+                break;
+              }
+            case eps_pitch_input_record:
+              {
+                fout << eps_pitch_input << " ";
+                break;
+              }
+            case eps_alpha_max_record:
+              {
+                fout << eps_alpha_max << " ";
+                break;
+              }
+            case eps_pitch_max_record:
+              {
+                fout << eps_pitch_max << " ";
+                break;
+              }
+            case eps_pitch_min_record:
+              {
+                fout << eps_pitch_min << " ";
+                break;
+              }
+            case eps_roll_max_record:
+              {
+                fout << eps_roll_max << " ";
+                break;
+              }
+            case eps_thrust_min_record:
+              {
+                fout << eps_thrust_min << " ";
+                break;
+              }
+            case eps_flap_max_record:
+              {
+                fout << eps_flap_max << " ";
+                break;
+              }
+            case eps_airspeed_max_record:
+              {
+                fout << eps_airspeed_max << " ";
+                break;
+              }
+            case eps_airspeed_min_record:
+              {
+                fout << eps_airspeed_min << " ";
+                break;
+              }
 
-             /****************** Autopilot **************************/
-           case ap_pah_on_record:
-             {
-               fout << ap_pah_on << " ";
-               break;
-             }
-           case ap_alh_on_record:
-             {
-               fout << ap_alh_on << " ";
-               break;
-             }
-           case ap_rah_on_record:
-             {
-               fout << ap_rah_on << " ";
-               break;
-             }
-           case ap_hh_on_record:
-             {
-               fout << ap_hh_on << " ";
-               break;
-             }
-           case ap_Theta_ref_deg_record:
-             {
-               fout << ap_Theta_ref_rad*RAD_TO_DEG << " ";
-               break;
-             }
-           case ap_Theta_ref_rad_record:
-             {
-               fout << ap_Theta_ref_rad << " ";
-               break;
-             }
-           case ap_alt_ref_ft_record:
-             {
-               fout << ap_alt_ref_ft << " ";
-               break;
-             }
-           case ap_Phi_ref_deg_record:
-             {
-               fout << ap_Phi_ref_rad*RAD_TO_DEG << " ";
-               break;
-             }
-           case ap_Phi_ref_rad_record:
-             {
-               fout << ap_Phi_ref_rad << " ";
-               break;
-             }
-           case ap_Psi_ref_deg_record:
-             {
-               fout << ap_Psi_ref_rad*RAD_TO_DEG << " ";
-               break;
-             }
-           case ap_Psi_ref_rad_record:
-             {
-               fout << ap_Psi_ref_rad << " ";
-               break;
-             }
+              /****************** Autopilot **************************/
+            case ap_pah_on_record:
+              {
+                fout << ap_pah_on << " ";
+                break;
+              }
+            case ap_alh_on_record:
+              {
+                fout << ap_alh_on << " ";
+                break;
+              }
+            case ap_rah_on_record:
+              {
+                fout << ap_rah_on << " ";
+                break;
+              }
+            case ap_hh_on_record:
+              {
+                fout << ap_hh_on << " ";
+                break;
+              }
+            case ap_Theta_ref_deg_record:
+              {
+                fout << ap_Theta_ref_rad*RAD_TO_DEG << " ";
+                break;
+              }
+            case ap_Theta_ref_rad_record:
+              {
+                fout << ap_Theta_ref_rad << " ";
+                break;
+              }
+            case ap_alt_ref_ft_record:
+              {
+                fout << ap_alt_ref_ft << " ";
+                break;
+              }
+            case ap_Phi_ref_deg_record:
+              {
+                fout << ap_Phi_ref_rad*RAD_TO_DEG << " ";
+                break;
+              }
+            case ap_Phi_ref_rad_record:
+              {
+                fout << ap_Phi_ref_rad << " ";
+                break;
+              }
+            case ap_Psi_ref_deg_record:
+              {
+                fout << ap_Psi_ref_rad*RAD_TO_DEG << " ";
+                break;
+              }
+            case ap_Psi_ref_rad_record:
+              {
+                fout << ap_Psi_ref_rad << " ";
+                break;
+              }
 
               /************************ Forces ***********************/
             case F_X_wind_record:
@@ -2196,283 +2196,283 @@ void uiuc_recorder( double dt )
               }
 
               /********************* flapper *********************/
-           case flapper_freq_record:
-             {
-               fout << flapper_freq << " ";
-               break;
-             }
-           case flapper_phi_record:
-             {
-               fout << flapper_phi << " ";
-               break;
-             }
-           case flapper_phi_deg_record:
-             {
-               fout << flapper_phi*RAD_TO_DEG << " ";
-               break;
-             }
-           case flapper_Lift_record:
-             {
-               fout << flapper_Lift << " ";
-               break;
-             }
-           case flapper_Thrust_record:
-             {
-               fout << flapper_Thrust << " ";
-               break;
-             }
-           case flapper_Inertia_record:
-             {
-               fout << flapper_Inertia << " ";
-               break;
-             }
-           case flapper_Moment_record:
-             {
-               fout << flapper_Moment << " ";
-               break;
-             }
-             /****************Other Variables*******************/
-           case gyroMomentQ_record:
-             {
-               fout << polarInertia * engineOmega * Q_body << " ";
-               break;
-             }
-           case gyroMomentR_record:
-             {
-               fout << -polarInertia * engineOmega * R_body << " ";
-               break;
-             }
-           case eta_q_record:
-             {
-               fout << eta_q << " ";
-               break;
-             }
-           case rpm_record:
-             {
-               fout << (engineOmega * 60 / (2 * LS_PI)) << " ";
-               break;
-             }
-           case w_induced_record:
-             {
-               fout << w_induced << " ";
-               break;
-             }
-           case downwashAngle_deg_record:
-             {
-               fout << downwashAngle * RAD_TO_DEG << " ";
-               break;
-             }
-           case alphaTail_deg_record:
-             {
-               fout << alphaTail * RAD_TO_DEG << " ";
-               break;
-             }
-           case gammaWing_record:
-             {
-               fout << gammaWing << " ";
-               break;
-             }
-           case LD_record:
-             {
-               fout << V_ground_speed/V_down_rel_ground  << " ";
-               break;
-             }
-           case gload_record:
-             {
-               fout << -A_Z_cg/32.174 << " ";
-               break;
-             }
+            case flapper_freq_record:
+              {
+                fout << flapper_freq << " ";
+                break;
+              }
+            case flapper_phi_record:
+              {
+                fout << flapper_phi << " ";
+                break;
+              }
+            case flapper_phi_deg_record:
+              {
+                fout << flapper_phi*RAD_TO_DEG << " ";
+                break;
+              }
+            case flapper_Lift_record:
+              {
+                fout << flapper_Lift << " ";
+                break;
+              }
+            case flapper_Thrust_record:
+              {
+                fout << flapper_Thrust << " ";
+                break;
+              }
+            case flapper_Inertia_record:
+              {
+                fout << flapper_Inertia << " ";
+                break;
+              }
+            case flapper_Moment_record:
+              {
+                fout << flapper_Moment << " ";
+                break;
+              }
+              /****************Other Variables*******************/
+            case gyroMomentQ_record:
+              {
+                fout << polarInertia * engineOmega * Q_body << " ";
+                break;
+              }
+            case gyroMomentR_record:
+              {
+                fout << -polarInertia * engineOmega * R_body << " ";
+                break;
+              }
+            case eta_q_record:
+              {
+                fout << eta_q << " ";
+                break;
+              }
+            case rpm_record:
+              {
+                fout << (engineOmega * 60 / (2 * LS_PI)) << " ";
+                break;
+              }
+            case w_induced_record:
+              {
+                fout << w_induced << " ";
+                break;
+              }
+            case downwashAngle_deg_record:
+              {
+                fout << downwashAngle * RAD_TO_DEG << " ";
+                break;
+              }
+            case alphaTail_deg_record:
+              {
+                fout << alphaTail * RAD_TO_DEG << " ";
+                break;
+              }
+            case gammaWing_record:
+              {
+                fout << gammaWing << " ";
+                break;
+              }
+            case LD_record:
+              {
+                fout << V_ground_speed/V_down_rel_ground  << " ";
+                break;
+              }
+            case gload_record:
+              {
+                fout << -A_Z_cg/32.174 << " ";
+                break;
+              }
             case tactilefadefI_record:
               {
                 fout << tactilefadefI << " ";
                 break;
               }
-             /****************Trigger Variables*******************/
-           case trigger_on_record:
-             {
-               fout << trigger_on << " ";
-               break;
-             }
-           case trigger_num_record:
-             {
-               fout << trigger_num << " ";
-               break;
-             }
-           case trigger_toggle_record:
-             {
-               fout << trigger_toggle << " ";
-               break;
-             }
-           case trigger_counter_record:
-             {
-               fout << trigger_counter << " ";
-               break;
-             }
-             /*********local to body transformation matrix********/
-           case T_local_to_body_11_record:
-             {
-               fout << T_local_to_body_11 << " ";
-               break;
-             }
-           case T_local_to_body_12_record:
-             {
-               fout << T_local_to_body_12 << " ";
-               break;
-             }
-           case T_local_to_body_13_record:
-             {
-               fout << T_local_to_body_13 << " ";
-               break;
-             }
-           case T_local_to_body_21_record:
-             {
-               fout << T_local_to_body_21 << " ";
-               break;
-             }
-           case T_local_to_body_22_record:
-             {
-               fout << T_local_to_body_22 << " ";
-               break;
-             }
-           case T_local_to_body_23_record:
-             {
-               fout << T_local_to_body_23 << " ";
-               break;
-             }
-           case T_local_to_body_31_record:
-             {
-               fout << T_local_to_body_31 << " ";
-               break;
-             }
-           case T_local_to_body_32_record:
-             {
-               fout << T_local_to_body_32 << " ";
-               break;
-             }
-           case T_local_to_body_33_record:
-             {
-               fout << T_local_to_body_33 << " ";
-               break;
-             }
+              /****************Trigger Variables*******************/
+            case trigger_on_record:
+              {
+                fout << trigger_on << " ";
+                break;
+              }
+            case trigger_num_record:
+              {
+                fout << trigger_num << " ";
+                break;
+              }
+            case trigger_toggle_record:
+              {
+                fout << trigger_toggle << " ";
+                break;
+              }
+            case trigger_counter_record:
+              {
+                fout << trigger_counter << " ";
+                break;
+              }
+               /*********local to body transformation matrix********/
+            case T_local_to_body_11_record:
+              {
+                fout << T_local_to_body_11 << " ";
+                break;
+              }
+            case T_local_to_body_12_record:
+              {
+                fout << T_local_to_body_12 << " ";
+                break;
+              }
+            case T_local_to_body_13_record:
+              {
+                fout << T_local_to_body_13 << " ";
+                break;
+              }
+            case T_local_to_body_21_record:
+              {
+                fout << T_local_to_body_21 << " ";
+                break;
+              }
+            case T_local_to_body_22_record:
+              {
+                fout << T_local_to_body_22 << " ";
+                break;
+              }
+            case T_local_to_body_23_record:
+              {
+                fout << T_local_to_body_23 << " ";
+                break;
+              }
+            case T_local_to_body_31_record:
+              {
+                fout << T_local_to_body_31 << " ";
+                break;
+              }
+            case T_local_to_body_32_record:
+              {
+                fout << T_local_to_body_32 << " ";
+                break;
+              }
+            case T_local_to_body_33_record:
+              {
+                fout << T_local_to_body_33 << " ";
+                break;
+              }
     
              /********* MSS debug and other data *******************/
               /* debug variables for use in probing data            */
               /* comment out old lines, and add new                 */
               /* only remove code that you have written             */
-           case debug1_record:
-             {
-               // eta_q term check
-               // fout << eta_q_Cm_q_fac << " ";
-               // fout << eta_q_Cm_adot_fac << " ";
-               // fout << eta_q_Cmfade_fac << " ";
-               // fout << eta_q_Cl_dr_fac << " ";
-               // fout << eta_q_Cm_de_fac << " ";
-               // eta on tail
-               // fout << eta_q  << " ";
-               // engine RPM
-               // fout << engineOmega * 60 / (2 * LS_PI)<< " ";
-               // vertical climb rate in fpm
-               fout << V_down * 60 << " ";
-               // vertical climb rate in fps
-               // fout << V_down << " ";
-               // w_induced downwash at tail due to wing
-               // fout << gammaWing   << " ";
-               //fout << outside_control << " ";
-               break;
-             }
-           case debug2_record:
-             {
-               // Lift to drag ratio 
-               // fout <<  V_ground_speed/V_down_rel_ground << " ";
-               // g's through the c.g. of the aircraft
-               fout << (-A_Z_cg/32.174) << " ";
-               // L/D via forces (used in 201 class for L/D)
-               // fout << (F_Z_wind/F_X_wind) << " ";
-               // gyroscopic moment (see uiuc_wrapper.cpp)
-               // fout << (polarInertia * engineOmega * Q_body) << " ";
-               // downwashAngle at tail
-               // fout << downwashAngle * 57.29 << " ";
-               // w_induced from engine
-               // fout << w_induced << " ";
-               break;
-             }
-           case debug3_record:
-             {
-               // die off function for eta_q
-               // fout << (Cos_alpha * Cos_alpha)       << " ";
-               // gyroscopic moment (see uiuc_wrapper.cpp)
-               // fout << (-polarInertia * engineOmega * R_body) << " ";
-               // eta on tail
-               // fout << eta_q << " ";
-               // flapper cycle percentage
-               fout << (sin(flapper_phi - 3 * LS_PI / 2)) << " ";
-               break;
-             }
+            case debug1_record:
+              {
+                // eta_q term check
+                // fout << eta_q_Cm_q_fac << " ";
+                // fout << eta_q_Cm_adot_fac << " ";
+                // fout << eta_q_Cmfade_fac << " ";
+                // fout << eta_q_Cl_dr_fac << " ";
+                // fout << eta_q_Cm_de_fac << " ";
+                // eta on tail
+                // fout << eta_q  << " ";
+                // engine RPM
+                // fout << engineOmega * 60 / (2 * LS_PI)<< " ";
+                // vertical climb rate in fpm
+                fout << V_down * 60 << " ";
+                // vertical climb rate in fps
+                // fout << V_down << " ";
+                // w_induced downwash at tail due to wing
+                // fout << gammaWing   << " ";
+                //fout << outside_control << " ";
+                break;
+              }
+            case debug2_record:
+              {
+                // Lift to drag ratio 
+                // fout <<  V_ground_speed/V_down_rel_ground << " ";
+                 // g's through the c.g. of the aircraft
+                fout << (-A_Z_cg/32.174) << " ";
+                // L/D via forces (used in 201 class for L/D)
+                // fout << (F_Z_wind/F_X_wind) << " ";
+                // gyroscopic moment (see uiuc_wrapper.cpp)
+                // fout << (polarInertia * engineOmega * Q_body) << " ";
+                // downwashAngle at tail
+                // fout << downwashAngle * 57.29 << " ";
+                // w_induced from engine
+                // fout << w_induced << " ";
+                break;
+              }
+            case debug3_record:
+              {
+                // die off function for eta_q
+                // fout << (Cos_alpha * Cos_alpha)       << " ";
+                // gyroscopic moment (see uiuc_wrapper.cpp)
+                // fout << (-polarInertia * engineOmega * R_body) << " ";
+                // eta on tail
+                // fout << eta_q << " ";
+                // flapper cycle percentage
+                fout << (sin(flapper_phi - 3 * LS_PI / 2)) << " ";
+                break;
+              }
               /********* RD debug and other data *******************/
               /* debug variables for use in probing data            */
               /* comment out old lines, and add new                 */
               /* only remove code that you have written             */
-           case debug4_record:
-             {
-               // flapper F_X_aero_flapper
-               //fout << F_X_aero_flapper << " ";
-               //ap_pah_on
-               //fout << ap_pah_on << " ";
-               //D_cg_north1 = Radius_to_rwy*(Latitude - lat1);
-               //fout << D_cg_north1 << " ";
-               break;
-             }
-           case debug5_record:
-             {
-               // flapper F_Z_aero_flapper
-               //fout << F_Z_aero_flapper << " ";
-               // gear_rate
-               //D_cg_east1 = Radius_to_rwy*cos(lat1)*(Longitude - long1);
-               //fout << D_cg_east1 << " ";
-               break;
-             }
-           case debug6_record:
-             {
-               //gear_max
-               //fout << gear_max << " ";
-               //fout << sqrt(D_cg_north1*D_cg_north1+D_cg_east1*D_cg_east1) << " ";
-               break;
-             }
-           case debug7_record:
-             {
-               //Debug7
-               fout << debug7 << " ";
-               break;
-             }
-           case debug8_record:
-             {
-               //Debug8
-               fout << debug8 << " ";
-               break;
-             }
-           case debug9_record:
-             {
-               //Debug9
-               fout << debug9 << " ";
-               break;
-             }
-           case debug10_record:
-             {
-               //Debug10
-               fout << debug10 << " ";
-               break;
-             }
-           default:
-             {
-               if (ignore_unknown_keywords) {
-                 // do nothing
-               } else {
-                 // print error message
-                 uiuc_warnings_errors(2, *command_line);
-               }
-               break;
-             }
-           };
+            case debug4_record:
+              {
+                // flapper F_X_aero_flapper
+                //fout << F_X_aero_flapper << " ";
+                //ap_pah_on
+                //fout << ap_pah_on << " ";
+                //D_cg_north1 = Radius_to_rwy*(Latitude - lat1);
+                //fout << D_cg_north1 << " ";
+                break;
+              }
+            case debug5_record:
+              {
+                // flapper F_Z_aero_flapper
+                //fout << F_Z_aero_flapper << " ";
+                // gear_rate
+                //D_cg_east1 = Radius_to_rwy*cos(lat1)*(Longitude - long1);
+                //fout << D_cg_east1 << " ";
+                break;
+              }
+            case debug6_record:
+              {
+                //gear_max
+                //fout << gear_max << " ";
+                //fout << sqrt(D_cg_north1*D_cg_north1+D_cg_east1*D_cg_east1) << " ";
+                break;
+              }
+            case debug7_record:
+              {
+                //Debug7
+                fout << debug7 << " ";
+                break;
+              }
+            case debug8_record:
+              {
+                //Debug8
+                fout << debug8 << " ";
+                break;
+              }
+            case debug9_record:
+              {
+                //Debug9
+                fout << debug9 << " ";
+                break;
+              }
+            case debug10_record:
+              {
+                //Debug10
+                fout << debug10 << " ";
+                break;
+              }
+            default:
+              {
+                if (ignore_unknown_keywords) {
+                  // do nothing
+                } else {
+                  // print error message
+                  uiuc_warnings_errors(2, *command_line);
+                }
+                break;
+              }
+            };
         } // end record map
     }
   recordStep++;
index 55dbf4ca832a5194b51cd5d4aac1f317a99b2a41..fd3fcf8ea4dda17acb42bde5c793394b216a7cf7 100644 (file)
  HISTORY:      01/26/2000   initial release
                03/09/2001   (DPM) added support for gear
                06/18/2001   (RD) Made uiuc_recorder its own routine.
-              07/19/2001   (RD) Added uiuc_vel_init() to initialize
-                           the velocities.
-              08/27/2001   (RD) Added uiuc_initial_init() to help
-                           in starting an A/C at an initial condition
-              02/24/2002   (GD) Added uiuc_network_routine()
-              03/27/2002   (RD) Changed how forces are calculated when
-                           body-axis is used
+               07/19/2001   (RD) Added uiuc_vel_init() to initialize
+                            the velocities.
+               08/27/2001   (RD) Added uiuc_initial_init() to help
+                            in starting an A/C at an initial condition
+               02/24/2002   (GD) Added uiuc_network_routine()
+               03/27/2002   (RD) Changed how forces are calculated when
+                            body-axis is used
                12/11/2002   (RD) Divided uiuc_network_routine into
                             uiuc_network_recv_routine and
                             uiuc_network_send_routine
@@ -36,7 +36,7 @@
  
  AUTHOR(S):    Bipin Sehgal       <bsehgal@uiuc.edu>
                Robert Deters      <rdeters@uiuc.edu>
-              Glen Dimock        <dimock@uiuc.edu>
+               Glen Dimock        <dimock@uiuc.edu>
                David Megginson    <david@megginson.com>
  
 ----------------------------------------------------------------------