]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGAerodynamics.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGAerodynamics.cpp
index d77ab2f6d4c105cc08827a53c2b2172d5eabd40c..b052fe9230229825d0fd479e79a6255c01961b71 100644 (file)
@@ -50,8 +50,10 @@ static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_AERODYNAMICS;
 
 const unsigned NAxes=6;
-const char* AxisNames[] = { "drag", "side-force", "lift", "rolling-moment",
-                            "pitching-moment","yawing-moment" };
+const char* AxisNames[] = { "drag", "side", "lift", "roll",
+                            "pitch","yaw" };
+const char* AxisNamesUpper[] = { "DRAG", "SIDE", "LIFT", "ROLL",
+                                 "PITCH","YAW" };
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
@@ -220,7 +222,7 @@ bool FGAerodynamics::Load(FGConfigFile* AC_cfg)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGAerodynamics::GetCoefficientStrings(void)
+string FGAerodynamics::GetCoefficientStrings(string delimeter)
 {
   string CoeffStrings = "";
   bool firstime = true;
@@ -231,7 +233,7 @@ string FGAerodynamics::GetCoefficientStrings(void)
       if (firstime) {
         firstime = false;
       } else {
-        CoeffStrings += ", ";
+        CoeffStrings += delimeter;
       }
       CoeffStrings += Coeff[axis][sd]->GetCoefficientName();
     }
@@ -241,7 +243,7 @@ string FGAerodynamics::GetCoefficientStrings(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGAerodynamics::GetCoefficientValues(void)
+string FGAerodynamics::GetCoefficientValues(string delimeter)
 {
   string SDValues = "";
   bool firstime = true;
@@ -251,7 +253,7 @@ string FGAerodynamics::GetCoefficientValues(void)
       if (firstime) {
         firstime = false;
       } else {
-        SDValues += ", ";
+        SDValues += delimeter;
       }
       SDValues += Coeff[axis][sd]->GetSDstring();
     }
@@ -358,6 +360,23 @@ void FGAerodynamics::unbind(void)
   }
 }
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGAerodynamics::convert(void)
+{
+
+  for (int axis=0; axis<6; axis++) {
+    if (Coeff[axis].size()>0) {
+      cout << endl << "        <axis name=\"" << AxisNamesUpper[axis] << "\">" << endl;
+      for (int c=0; c<Coeff[axis].size(); c++) {
+        Coeff[axis][c]->convert();
+      }
+      cout << "        </axis>" << endl;
+    }
+  }
+
+}
+
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //    The bitmasked value choices are as follows:
 //    unset: In this case (the default) JSBSim would only print