]> git.mxchange.org Git - flightgear.git/commitdiff
Do not run the HoldDown code until after the aircraft is trimmed to prevent a devide...
authorErik Hofman <erik@ehofman.com>
Thu, 2 Apr 2015 18:31:17 +0000 (20:31 +0200)
committerErik Hofman <erik@ehofman.com>
Thu, 2 Apr 2015 18:31:17 +0000 (20:31 +0200)
src/FDM/JSBSim/models/FGAccelerations.cpp

index cdb01fcec3ec7cc886d43657757806d306a3ae52..0638eb97d530e11a697e62723ab87c6c2e07cf36 100644 (file)
@@ -157,7 +157,7 @@ void FGAccelerations::CalculatePQRdot(void)
   // Compute body frame rotational accelerations based on the current body
   // moments and the total inertial angular velocity expressed in the body
   // frame.
-  if (HoldDown) {
+  if (HoldDown && !FDMExec->GetTrimStatus()) {
     // The rotational acceleration in ECI is calculated so that the rotational
     // acceleration is zero in the body frame.
     vPQRdot.InitMatrix();
@@ -201,7 +201,7 @@ void FGAccelerations::CalculateQuatdot(void)
 
 void FGAccelerations::CalculateUVWdot(void)
 {
-  if (HoldDown)
+  if (HoldDown && !FDMExec->GetTrimStatus())
     vBodyAccel.InitMatrix();
   else
     vBodyAccel = in.Force / in.Mass;