]> 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 9c29ab0ebdea85220c1089d8eb199c6a7e5539fb..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
 
@@ -96,10 +96,6 @@ FORWARD DECLARATIONS
 
 namespace JSBSim {
 
-/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -216,6 +212,13 @@ 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;
@@ -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;