]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGJSBBase.h
Encapsulate the interpolstion version of FGEnvironment and fix some bugs
[flightgear.git] / src / FDM / JSBSim / FGJSBBase.h
index 7515b92195392705f476be4f167145d8c0988ce0..9f05b313f66e180bc5a16681a369dd9afc201502 100644 (file)
@@ -79,8 +79,8 @@ using std::max;
 
 static char *gcvt(double number, size_t ndigit, char *buf)
 {
-     sprintf(buf, "%f", number);
-     return buf;
+  sprintf(buf, "%f", number);
+  return buf;
 }
 #endif
 
@@ -94,10 +94,7 @@ DEFINITIONS
 FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-
-/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+namespace JSBSim {
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
@@ -112,8 +109,6 @@ CLASS DOCUMENTATION
 CLASS DECLARATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-namespace JSBSim {
-
 class FGJSBBase {
 public:
   /// Constructor for FGJSBBase.
@@ -216,6 +211,15 @@ public:
   
   void disableHighLighting(void);
 
+  static short debug_lvl;
+  double KelvinToFahrenheit (double kelvin) {
+    return 1.8*kelvin - 459.4;
+  }
+
+  double RankineToCelsius (double rankine) {
+    return (rankine - 491.67)/1.8;
+  }
+
 protected:
   static Message localMsg;
   
@@ -223,7 +227,6 @@ protected:
 
   virtual void Debug(int from) {};
 
-  static short debug_lvl;
   static unsigned int frame;
   static unsigned int messageId;
   
@@ -235,7 +238,7 @@ protected:
   static const double ktstofps;
   static const double inchtoft;
   static const double in3tom3;
-  static const double Reng;         // Specific Gas Constant,ft^2/(sec^2*R)
+  static double Reng;         // Specific Gas Constant,ft^2/(sec^2*R)
   static const double SHRatio;
   static const string needed_cfg_version;
   static const string JSBSim_version;