]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/UIUCModel/uiuc_1Dinterpolation.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / UIUCModel / uiuc_1Dinterpolation.cpp
index b5613a07577056d4b729bd8a56cb8cc280925829..0d4293934bc1f20e99db140340366badea90e7be 100644 (file)
@@ -6,7 +6,7 @@
 
  DESCRIPTION:  reads in the yData and xData arrays and the value of x 
                to be interpolated on; performs 1D interpolation, 
-              i.e. y=f(x)
+               i.e. y=f(x)
 
 ----------------------------------------------------------------------
 
@@ -16,9 +16,9 @@
 
  REFERENCES:   syntax based on interp function in c172_aero.c
                mathematics based on linear interpolation functions 
-              found in
-              Kreyszig, Erwin. Advanced Engineering Mathematics, 
-              7th ed. NY: John Wiley & Sons, 1993.
+               found in
+               Kreyszig, Erwin. Advanced Engineering Mathematics, 
+               7th ed. NY: John Wiley & Sons, 1993.
 
 ----------------------------------------------------------------------
 
@@ -70,6 +70,7 @@
  USA or view http://www.gnu.org/copyleft/gpl.html.
 
 **********************************************************************/
+#include <simgear/compiler.h>    // MSVC: to disable C4244 d to f warning
 
 #include "uiuc_1Dinterpolation.h"
 
@@ -93,13 +94,13 @@ double uiuc_1Dinterpolation( double xData[100], double yData[100], int xmax, dou
   else                       //x between xmax and x min
     {
       /*loop increases i until x is less than a known x, 
-       e.g. Alpha from LaRCsim less than Alpha given in 
-       tabulated data; once this value is found, i becomes 
-       the upper bound and i-1 the lower bound*/
+        e.g. Alpha from LaRCsim less than Alpha given in 
+        tabulated data; once this value is found, i becomes 
+        the upper bound and i-1 the lower bound*/
       while (xData[i] <= x)    //bracket upper bound
-       {
-         i++;
-       }
+        {
+          i++;
+        }
       x2 = xData[i];          //set upper bounds
       y2 = yData[i];
       x1 = xData[i-1];        //set lower bounds