]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGCoefficient.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGCoefficient.cpp
index e2bee88db92f49cf8d45e0b8fc3c3409f95832bc..801571f4f3ef1a73c126d8b01463a092ae132a6c 100644 (file)
@@ -195,7 +195,6 @@ double FGCoefficient::Value(double rVal, double cVal)
   unsigned int midx;
 
   SD = Value = gain*Table->GetValue(rVal, cVal) + bias;
-  
 
   for (midx=0; midx < multipliers.size(); midx++) {
       Value *= multipliers[midx]->getDoubleValue();
@@ -236,31 +235,29 @@ double FGCoefficient::Value(void)
 double FGCoefficient::TotalValue(void)
 {
   switch(type) {
-  case 0:
-    totalValue=-1;
-    return totalValue;
-  case 1:
-    totalValue=Value();
-    return totalValue;
-  case 2:
-    totalValue=Value( LookupR->getDoubleValue() );
-    return totalValue;
-  case 3:
-    totalValue=Value( LookupR->getDoubleValue(),
-                        LookupC->getDoubleValue() );
-    return totalValue;
-  case 4:
-    totalValue=0.0;
-    return totalValue;
-  }
-  return totalValue;
-}
 
-//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+  case UNKNOWN:
+    totalValue = -1;
+    break;
 
-void FGCoefficient::DumpSD(void)
-{
-  cout << "   " << name << ": " << SD << endl;
+  case VALUE:
+    totalValue = Value();
+    break;
+
+  case VECTOR:
+    totalValue = Value( LookupR->getDoubleValue() );
+    break;
+
+  case TABLE:
+    totalValue = Value( LookupR->getDoubleValue(),
+                      LookupC->getDoubleValue() );
+    break;
+
+  case EQUATION:
+    totalValue = 0.0;
+    break;
+  }
+  return totalValue;
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -282,7 +279,7 @@ void FGCoefficient::DisplayCoeffFactors(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGCoefficient::GetCoefficientValues(void)
+string FGCoefficient::GetSDstring(void)
 {
   char buffer[10];
   string value;