]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropulsion.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGPropulsion.cpp
index 7a31a46aafa53008e3ff71e33b724e62d5e3799d..0b3e2b4f2c320d4d845f299c328b1e4eaf83c5f1 100644 (file)
@@ -59,6 +59,18 @@ INCLUDES
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_PROPULSION;
 
+extern short debug_lvl;
+
+#if defined (__APPLE__)
+/* Not all systems have the gcvt function */
+inline char* gcvt (double value, int ndigits, char *buf) {
+    /* note that this is not exactly what gcvt is supposed to do! */
+    snprintf (buf, ndigits+1, "%f", value);
+    return buf;
+}
+#endif
+
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS IMPLEMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -454,7 +466,7 @@ string FGPropulsion::GetPropulsionValues(void)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-FGColumnVector3& FGPropulsion::GetTanksCG(void)
+FGColumnVector3& FGPropulsion::GetTanksMoment(void)
 {
   iTank = Tanks.begin();
   vXYZtank.InitMatrix();
@@ -550,6 +562,7 @@ double FGPropulsion::GetTanksIxy(const FGColumnVector3& vXYZcg)
 
 void FGPropulsion::bind(void)
 {
+  typedef double (FGPropulsion::*PMF)(int) const;
   /* PropertyManager->Tie("propulsion/num-engines", this,
                        &FGPropulsion::GetNumEngines);
   PropertyManager->Tie("propulsion/num-tanks", this,
@@ -559,17 +572,17 @@ void FGPropulsion::bind(void)
   PropertyManager->Tie("propulsion/num-sel-ox-tanks", this,
                        &FGPropulsion::GetnumSelectedOxiTanks);
   PropertyManager->Tie("forces/fbx-prop-lbs", this,1,
-                       &FGPropulsion::GetForces);
+                       (PMF)&FGPropulsion::GetForces);
   PropertyManager->Tie("forces/fby-prop-lbs", this,2,
-                       &FGPropulsion::GetForces);
+                       (PMF)&FGPropulsion::GetForces);
   PropertyManager->Tie("forces/fbz-prop-lbs", this,3,
-                       &FGPropulsion::GetForces);
+                       (PMF)&FGPropulsion::GetForces);
   PropertyManager->Tie("moments/l-prop-lbsft", this,1,
-                       &FGPropulsion::GetMoments);
+                       (PMF)&FGPropulsion::GetMoments);
   PropertyManager->Tie("moments/m-prop-lbsft", this,2,
-                       &FGPropulsion::GetMoments);
+                       (PMF)&FGPropulsion::GetMoments);
   PropertyManager->Tie("moments/n-prop-lbsft", this,3,
-                       &FGPropulsion::GetMoments);
+                       (PMF)&FGPropulsion::GetMoments);
   //PropertyManager->Tie("propulsion/tanks-weight-lbs", this,
   //                     &FGPropulsion::GetTanksWeight);
 }