]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGState.cpp
- fixed fuel-need calculations
[flightgear.git] / src / FDM / JSBSim / FGState.cpp
index c36af44e8ad5057e2b1f7a0423622933a758b915..2dc11a08e6508d1623fc093245484a0a2c31cda5 100644 (file)
@@ -140,6 +140,8 @@ FGState::FGState(FGFDMExec* fdex)
   RegisterVariable(FG_ACTIVE_ENGINE,  " active_engine "  );
   RegisterVariable(FG_HOVERB,         " height/span "    );
   RegisterVariable(FG_PITCH_TRIM_CMD, " pitch_trim_cmd " );
+  RegisterVariable(FG_YAW_TRIM_CMD,   " yaw_trim_cmd " );
+  RegisterVariable(FG_ROLL_TRIM_CMD,  " roll_trim_cmd " );
   RegisterVariable(FG_LEFT_BRAKE_CMD, " left_brake_cmd " );
   RegisterVariable(FG_RIGHT_BRAKE_CMD," right_brake_cmd ");
   RegisterVariable(FG_CENTER_BRAKE_CMD," center_brake_cmd ");
@@ -292,6 +294,10 @@ double FGState::GetParameter(eParam val_idx) {
     return Position->GetHOverBMAC();
   case FG_PITCH_TRIM_CMD:
     return FCS->GetPitchTrimCmd();
+  case FG_YAW_TRIM_CMD:
+    return FCS->GetYawTrimCmd();
+  case FG_ROLL_TRIM_CMD:
+    return FCS->GetRollTrimCmd();
   case FG_GEAR_CMD:
     return FCS->GetGearCmd();
   case FG_GEAR_POS:
@@ -320,7 +326,7 @@ eParam FGState::GetParameterIndex(string val_string)
 
 void FGState::SetParameter(eParam val_idx, double val)
 {
-  int i;
+  unsigned i;
 
   switch(val_idx) {
   case FG_ELEVATOR_POS:
@@ -477,10 +483,12 @@ bool FGState::Reset(string path, string acname, string fname)
     cerr << "The reset file " << resetDef
          << " does not appear to be a reset file" << endl;
     return false;
+  } else {
+    resetfile.GetNextConfigLine();
+    resetfile >> token;
+    cout << "Resetting using: " << token << endl << endl;
   }
   
-  resetfile.GetNextConfigLine();
-  resetfile >> token;
   while (token != string("/initialize") && token != string("EOF")) {
     if (token == "UBODY") resetfile >> U;
     if (token == "VBODY") resetfile >> V;
@@ -880,5 +888,12 @@ void FGState::Debug(int from)
   }
   if (debug_lvl & 16) { // Sanity checking
   }
+  if (debug_lvl & 64) {
+    if (from == 0) { // Constructor
+      cout << IdSrc << endl;
+      cout << IdHdr << endl;
+    }
+  }
 }
 
+