]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGOutput.cpp
Latest JSBSim updates.
[flightgear.git] / src / FDM / JSBSim / FGOutput.cpp
index 77bd0f66388a205e926f9d4a71dfd7a4c972545a..b3b3858088f2c6d0986a541acef77d82397ac8e3 100644 (file)
@@ -98,8 +98,9 @@ bool FGOutput::Run(void)
       } else {
         // Not a valid type of output
       }
-
+         return false;
     } else {
+         return true;
     }
   }
   return false;
@@ -117,7 +118,7 @@ void FGOutput::SetType(string type)
     Type = otSocket;
   } else if (type == "TERMINAL") {
     Type = otTerminal;
-  } else if (type != string("NONE")){
+  } else if (type != string("NONE")) {
     Type = otUnknown;
     cerr << "Unknown type of output specified in config file" << endl;
   }
@@ -148,9 +149,12 @@ void FGOutput::DelimitedOutput(string fname)
       outstream << "Aileron Cmd, ";
       outstream << "Elevator Cmd, ";
       outstream << "Rudder Cmd, ";
-      outstream << "Aileron Pos, ";
+      outstream << "Flap Cmd, ";
+      outstream << "Left Aileron Pos, ";
+      outstream << "Right Aileron Pos, ";
       outstream << "Elevator Pos, ";
-      outstream << "Rudder Pos";
+      outstream << "Rudder Pos, ";
+      outstream << "Flap Pos"; 
     }
     if (SubSystems & ssRates) {
       outstream << ", ";
@@ -169,7 +173,10 @@ void FGOutput::DelimitedOutput(string fname)
       outstream << ", ";
       outstream << "Drag, Side, Lift, ";
       outstream << "L/D, ";
-      outstream << "Xforce, Yforce, Zforce";
+      outstream << "Xforce, Yforce, Zforce, ";
+      outstream << "xGravity, yGravity, zGravity, ";
+      outstream << "xCoriolis, yCoriolis, zCoriolis, ";
+      outstream << "xCentrifugal, yCentrifugal, zCentrifugal";
     }
     if (SubSystems & ssMoments) {
       outstream << ", ";
@@ -204,6 +211,10 @@ void FGOutput::DelimitedOutput(string fname)
       outstream << ", ";
       outstream << Aerodynamics->GetCoefficientStrings();
     }
+    if (SubSystems & ssFCS) {
+      outstream << ", ";
+      outstream << FCS->GetComponentStrings();
+    }
     if (SubSystems & ssGroundReactions) {
       outstream << ", ";
       outstream << GroundReactions->GetGroundReactionStrings();
@@ -225,9 +236,12 @@ void FGOutput::DelimitedOutput(string fname)
     outstream << FCS->GetDaCmd() << ", ";
     outstream << FCS->GetDeCmd() << ", ";
     outstream << FCS->GetDrCmd() << ", ";
-    outstream << FCS->GetDaPos() << ", ";
+    outstream << FCS->GetDfCmd() << ", ";
+    outstream << FCS->GetDaLPos() << ", ";
+    outstream << FCS->GetDaRPos() << ", ";
     outstream << FCS->GetDePos() << ", ";
-    outstream << FCS->GetDrPos();
+    outstream << FCS->GetDrPos() << ", ";
+    outstream << FCS->GetDfPos();
   }
   if (SubSystems & ssRates) {
     outstream << ", ";
@@ -239,14 +253,17 @@ void FGOutput::DelimitedOutput(string fname)
     outstream << Translation->Getqbar() << ", ";
     outstream << Translation->GetVt() << ", ";
     outstream << Translation->GetUVW() << ", ";
-    outstream << Translation->GetvAeroUVW() << ", ";
+    outstream << Translation->GetAeroUVW() << ", ";
     outstream << Position->GetVel();
   }
   if (SubSystems & ssForces) {
     outstream << ", ";
     outstream << Aerodynamics->GetvFs() << ", ";
     outstream << Aerodynamics->GetLoD() << ", ";
-    outstream << Aircraft->GetForces();
+    outstream << Aircraft->GetForces() << ", ";
+    outstream << Inertial->GetGravity() << ", ";
+    outstream << Inertial->GetCoriolis() << ", ";
+    outstream << Inertial->GetCentrifugal();
   }
   if (SubSystems & ssMoments) {
     outstream << ", ";
@@ -281,6 +298,10 @@ void FGOutput::DelimitedOutput(string fname)
     outstream << ", ";
     outstream << Aerodynamics->GetCoefficientValues();
   }
+  if (SubSystems & ssFCS) {
+    outstream << ", ";
+    outstream << FCS->GetComponentValues();
+  }
   if (SubSystems & ssGroundReactions) {
     outstream << ", ";
     outstream << GroundReactions->GetGroundReactionValues();
@@ -342,7 +363,8 @@ void FGOutput::SocketOutput(void)
     socket->Append("M");
     socket->Append("N");
     socket->Append("Throttle Position");
-    socket->Append("Aileron Position");
+    socket->Append("Left Aileron Position");
+    socket->Append("Right Aileron Position");
     socket->Append("Elevator Position");
     socket->Append("Rudder Position");
     sFirstPass = false;
@@ -360,9 +382,9 @@ void FGOutput::SocketOutput(void)
   socket->Append(Translation->GetUVW(eU));
   socket->Append(Translation->GetUVW(eV));
   socket->Append(Translation->GetUVW(eW));
-  socket->Append(Translation->GetvAeroUVW(eU));
-  socket->Append(Translation->GetvAeroUVW(eV));
-  socket->Append(Translation->GetvAeroUVW(eW));
+  socket->Append(Translation->GetAeroUVW(eU));
+  socket->Append(Translation->GetAeroUVW(eV));
+  socket->Append(Translation->GetAeroUVW(eW));
   socket->Append(Position->GetVn());
   socket->Append(Position->GetVe());
   socket->Append(Position->GetVd());
@@ -386,7 +408,8 @@ void FGOutput::SocketOutput(void)
   socket->Append(Aircraft->GetMoments(eM));
   socket->Append(Aircraft->GetMoments(eN));
   socket->Append(FCS->GetThrottlePos(0));
-  socket->Append(FCS->GetDaPos());
+  socket->Append(FCS->GetDaLPos());
+  socket->Append(FCS->GetDaRPos());
   socket->Append(FCS->GetDePos());
   socket->Append(FCS->GetDrPos());
   socket->Send();