INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
#include "FGFCS.h"
#include "FGFDMExec.h"
#include "FGPropertyManager.h"
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGFCS::GetComponentStrings(void)
+string FGFCS::GetComponentStrings(string delimeter)
{
unsigned int comp;
string CompStrings = "";
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();
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGFCS::GetComponentValues(void)
+string FGFCS::GetComponentValues(string delimeter)
{
unsigned int comp;
string CompValues = "";
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);
}
}
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+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