]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFCS.cpp
Typo
[flightgear.git] / src / FDM / JSBSim / FGFCS.cpp
index cfeb2d5716fa61fc5175c6d2c23e731cd566b6d2..29fd534f32b247a60bad5182c383fb21a30d025d 100644 (file)
@@ -37,6 +37,10 @@ HISTORY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include "FGFCS.h"
 #include "FGFDMExec.h"
 #include "FGPropertyManager.h"
@@ -420,7 +424,7 @@ double FGFCS::GetBrake(FGLGear::BrakeGroup bg)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGFCS::GetComponentStrings(void)
+string FGFCS::GetComponentStrings(string delimeter)
 {
   unsigned int comp;
   string CompStrings = "";
@@ -428,14 +432,14 @@ string FGFCS::GetComponentStrings(void)
 
   for (comp = 0; comp < FCSComponents.size(); comp++) {
     if (firstime) firstime = false;
-    else          CompStrings += ", ";
+    else          CompStrings += delimeter;
 
     CompStrings += FCSComponents[comp]->GetName();
   }
 
   for (comp = 0; comp < APComponents.size(); comp++)
   {
-    CompStrings += ", ";
+    CompStrings += delimeter;
     CompStrings += APComponents[comp]->GetName();
   }
 
@@ -444,7 +448,7 @@ string FGFCS::GetComponentStrings(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGFCS::GetComponentValues(void)
+string FGFCS::GetComponentValues(string delimeter)
 {
   unsigned int comp;
   string CompValues = "";
@@ -453,14 +457,14 @@ string FGFCS::GetComponentValues(void)
 
   for (comp = 0; comp < FCSComponents.size(); comp++) {
     if (firstime) firstime = false;
-    else          CompValues += ", ";
+    else          CompValues += delimeter;
 
     sprintf(buffer, "%9.6f", FCSComponents[comp]->GetOutput());
     CompValues += string(buffer);
   }
 
   for (comp = 0; comp < APComponents.size(); comp++) {
-    sprintf(buffer, ", %9.6f", APComponents[comp]->GetOutput());
+    sprintf(buffer, "%s%9.6f", delimeter.c_str(), APComponents[comp]->GetOutput());
     CompValues += string(buffer);
   }
 
@@ -828,6 +832,15 @@ void FGFCS::unbind(FGPropertyManager *node)
   }
 }
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGFCS::convert(void)
+{
+  for (int i=0; i<FCSComponents.size(); i++) {
+    FCSComponents[i]->convert();
+  }
+}
+
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //    The bitmasked value choices are as follows:
 //    unset: In this case (the default) JSBSim would only print