Do not run the HoldDown code until after the aircraft is trimmed to prevent a devide by zero and ultimately a segmentation fault
This commit is contained in:
parent
aa63e65122
commit
e10b493421
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue