]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGJSBBase.cpp
Encapsulate the interpolstion version of FGEnvironment and fix some bugs
[flightgear.git] / src / FDM / JSBSim / FGJSBBase.cpp
index acbe1716748e17fcb2fc25fd77cfb5763802586a..3c5b6f8676fa1e561d1800359ffc0ddea45a1528 100644 (file)
@@ -37,6 +37,8 @@ INCLUDES
 
 #include "FGJSBBase.h"
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_JSBBASE;
 
@@ -59,20 +61,22 @@ char FGJSBBase::fgdef[6]    = {27, '[', '3', '9', 'm', '\0' };
 const double FGJSBBase::radtodeg = 57.29578;
 const double FGJSBBase::degtorad = 1.745329E-2;
 const double FGJSBBase::hptoftlbssec = 550.0;
+const double FGJSBBase::psftoinhg = 0.014138;
 const double FGJSBBase::fpstokts = 0.592484;
 const double FGJSBBase::ktstofps = 1.68781;
 const double FGJSBBase::inchtoft = 0.08333333;
-const double FGJSBBase::Reng = 1716.0;
+const double FGJSBBase::in3tom3 = 1.638706E-5;
+double FGJSBBase::Reng = 1716.0;
 const double FGJSBBase::SHRatio = 1.40;
-const string FGJSBBase::needed_cfg_version = "1.57";
-const string FGJSBBase::JSBSim_version = "0.9.1";
+const string FGJSBBase::needed_cfg_version = "1.61";
+const string FGJSBBase::JSBSim_version = "0.9.5";
 
-queue <FGJSBBase::Message*> FGJSBBase::Messages;
+std::queue <FGJSBBase::Message*> FGJSBBase::Messages;
 FGJSBBase::Message FGJSBBase::localMsg;
 unsigned int FGJSBBase::messageId = 0; 
 unsigned int FGJSBBase::frame = 0;
 
-short FGJSBBase::debug_lvl  = 0;
+short FGJSBBase::debug_lvl  = 1;
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -124,7 +128,7 @@ FGJSBBase::Message* FGJSBBase::PutMessage(string text, int iVal)
   msg->messageId = messageId++;
   msg->subsystem = "FDM";
   msg->type = Message::eInteger;
-  msg->bVal = iVal;
+  msg->bVal = (iVal != 0);
   Messages.push(msg);
   return msg;
 }
@@ -138,7 +142,7 @@ FGJSBBase::Message* FGJSBBase::PutMessage(string text, double dVal)
   msg->messageId = messageId++;
   msg->subsystem = "FDM";
   msg->type = Message::eDouble;
-  msg->bVal = dVal;
+  msg->bVal = (dVal != 0.0);
   Messages.push(msg);
   return msg;
 }
@@ -165,3 +169,21 @@ FGJSBBase::Message* FGJSBBase::ProcessMessage(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
+void FGJSBBase::disableHighLighting(void) {
+  highint[0]='\0';
+  halfint[0]='\0';
+  normint[0]='\0';
+  reset[0]='\0';
+  underon[0]='\0';
+  underoff[0]='\0';
+  fgblue[0]='\0';
+  fgcyan[0]='\0';
+  fgred[0]='\0';
+  fggreen[0]='\0';
+  fgdef[0]='\0';
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+} // namespace JSBSim
+