]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGInertial.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGInertial.cpp
index 1475a6b93a3b416b6b1e9457c41880626b6ee4f3..b3d3f598954c2d4658d48525bd44b5a5e077b94c 100644 (file)
@@ -125,6 +125,28 @@ bool FGInertial::LoadInertial(FGConfigFile* AC_cfg)
   return true;
 }
 
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGInertial::bind(void)
+{
+  typedef double (FGInertial::*PMF)(int) const;
+  PropertyManager->Tie("forces/fbx-inertial-lbs", this,1,
+                       (PMF)&FGInertial::GetForces);
+  PropertyManager->Tie("forces/fby-inertial-lbs", this,2,
+                       (PMF)&FGInertial::GetForces);
+  PropertyManager->Tie("forces/fbz-inertial-lbs", this,3,
+                       (PMF)&FGInertial::GetForces);
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGInertial::unbind(void)
+{
+  PropertyManager->Untie("forces/fbx-inertial-lbs");
+  PropertyManager->Untie("forces/fby-inertial-lbs");
+  PropertyManager->Untie("forces/fbz-inertial-lbs");
+}
+
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 //    The bitmasked value choices are as follows:
 //    unset: In this case (the default) JSBSim would only print
@@ -171,17 +193,3 @@ void FGInertial::Debug(int from)
   }
 }
 
-void FGInertial::bind(void){
-  PropertyManager->Tie("forces/fbx-inertial-lbs", this,1,
-                       &FGInertial::GetForces);
-  PropertyManager->Tie("forces/fby-inertial-lbs", this,2,
-                       &FGInertial::GetForces);
-  PropertyManager->Tie("forces/fbz-inertial-lbs", this,3,
-                       &FGInertial::GetForces);
-}
-
-void FGInertial::unbind(void){
-  PropertyManager->Untie("forces/fbx-inertial-lbs");
-  PropertyManager->Untie("forces/fby-inertial-lbs");
-  PropertyManager->Untie("forces/fbz-inertial-lbs");
-}