]> git.mxchange.org Git - flightgear.git/commitdiff
JSBSim sync.
authorcurt <curt>
Mon, 3 Dec 2001 22:17:03 +0000 (22:17 +0000)
committercurt <curt>
Mon, 3 Dec 2001 22:17:03 +0000 (22:17 +0000)
src/FDM/JSBSim/FGForce.h
src/FDM/JSBSim/FGPropeller.cpp
src/FDM/JSBSim/FGPropulsion.cpp

index e2f0e1e7340b8489a2858cbec183a3b6caef403b..61a97f45327913344d59563773a175bd32b975d4 100644 (file)
@@ -260,6 +260,10 @@ public:
   inline void SetLocationY(double y) {vXYZn(2) = y;}
   inline void SetLocationZ(double z) {vXYZn(3) = z;}
   inline void SetLocation(FGColumnVector3 vv) { vXYZn = vv; }
+  
+  inline double GetLocationX( void ) { return vXYZn(1);}
+  inline double GetLocationY( void ) { return vXYZn(2);}
+  inline double GetLocationZ( void ) { return vXYZn(3);}
   FGColumnVector3& GetLocation(void) { return vXYZn; }
 
   //these angles are relative to body axes, not earth!!!!!
index e77de012373ed148a4532ddc1a16733e5cea0e4d..e2080e3889bc009b47cdcdb1e5b9e2756be1491f 100644 (file)
@@ -158,8 +158,8 @@ double FGPropeller::Calculate(double PowerAvailable)
   if (P_Factor > 0.0001) {
     alpha = fdmex->GetTranslation()->Getalpha();
     beta  = fdmex->GetTranslation()->Getbeta();
-    SetLocationY(P_Factor*alpha*fabs(Sense)/Sense);
-    SetLocationZ(P_Factor*beta*fabs(Sense)/Sense);
+    SetLocationY( GetLocationY() + P_Factor*alpha*fabs(Sense)/Sense);
+    SetLocationZ( GetLocationZ() + P_Factor*beta*fabs(Sense)/Sense);
   } else if (P_Factor < 0.000) {
     cerr << "P-Factor value in config file must be greater than zero" << endl;
   }
index 0dcaf9010a93d43cff6a2acecff911da636127af..33c6594f25c0c1e6b030042fefa833817db9d903 100644 (file)
@@ -125,6 +125,7 @@ bool FGPropulsion::GetSteadyState(void)
       Engines[i]->SetTrimMode(true);
       Thrusters[i]->SetdeltaT(dt*rate);
       steady=false;
+      steady_count=0;
       while (!steady && j < 6000) {
         PowerAvailable = Engines[i]->Calculate(Thrusters[i]->GetPowerRequired());
         lastThrust = currentThrust;