#include "FGPosition.h"
#include "FGAuxiliary.h"
+static const char *IdSrc = "$Header$";
+static const char *IdHdr = ID_OUTPUT;
+
/*******************************************************************************
************************************ CODE **************************************
*******************************************************************************/
Type = otNone;
Filename = "JSBSim.out";
SubSystems = 0;
+ enabled = true;
#ifdef FG_WITH_JSBSIM_SOCKET
socket = new FGfdmSocket("localhost",1138);
bool FGOutput::Run(void)
{
- if (!FGModel::Run()) {
-
- if (Type == otSocket) {
- SocketOutput();
- } else if (Type == otCSV) {
- if (Filename != "COUT" && Filename != "cout" && Filename.size() > 0) {
- DelimitedOutput(Filename);
+ if (enabled) {
+ if (!FGModel::Run()) {
+
+ if (Type == otSocket) {
+ SocketOutput();
+ } else if (Type == otCSV) {
+ if (Filename != "COUT" && Filename != "cout" && Filename.size() > 0) {
+ DelimitedOutput(Filename);
+ } else {
+ DelimitedOutput();
+ }
+ } else if (Type == otTerminal) {
+ // Not done yet
+ } else if (Type == otNone) {
+ // Do nothing
} else {
- DelimitedOutput();
+ // Not a valid type of output
}
- } else if (Type == otTerminal) {
- // Not done yet
- } else if (Type == otNone) {
- // Do nothing
+
} else {
- // Not a valid type of output
}
-
- } else {
}
-
return false;
}
cout << ", ";
cout << Aircraft->GetCoefficientStrings();
}
+ if (SubSystems & FGAircraft::ssGroundReactions) {
+ cout << ", ";
+ cout << Aircraft->GetGroundReactionStrings();
+ }
cout << endl;
dFirstPass = false;
cout << ", ";
cout << Aircraft->GetCoefficientValues();
}
+ if (SubSystems & FGAircraft::ssGroundReactions) {
+ cout << ", ";
+ cout << Aircraft->GetGroundReactionValues();
+ }
cout << endl;
}
datafile << ", ";
datafile << Aircraft->GetCoefficientStrings();
}
+ if (SubSystems & FGAircraft::ssGroundReactions) {
+ datafile << ", ";
+ datafile << Aircraft->GetGroundReactionStrings();
+ }
datafile << endl;
sFirstPass = false;
}
datafile << ", ";
datafile << Aircraft->GetCoefficientValues();
}
+ if (SubSystems & FGAircraft::ssGroundReactions) {
+ datafile << ", ";
+ datafile << Aircraft->GetGroundReactionValues();
+ }
datafile << endl;
datafile.flush();
}
{
string asciiData;
/*
- if (socket <= 0) return;
+ if (socket == NULL) return;
socket->Clear();
if (sFirstPass) {
{
string asciiData;
- if (socket <= 0) return;
+ if (socket == NULL) return;
socket->Clear();
asciiData = string("<STATUS>") + out_str;