File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -512,15 +512,18 @@ void FGPropagate::ComputeOrbitalParameters(void)
512512 else {
513513 RightAscension = 0.0 ;
514514 N = {1 ., 0 ., 0 .};
515+ PerigeeArgument = 0.0 ;
515516 }
516517 R.Normalize ();
517518 double vr = DotProduct (R, VState.vInertialVelocity );
518519 FGColumnVector3 eVector = (VState.vInertialVelocity *angularMomentum/in.GM - R);
519520 Eccentricity = eVector.Magnitude ();
520521 if (Eccentricity > 1E-8 ) {
521522 eVector /= Eccentricity;
522- PerigeeArgument = acos (DotProduct (N, eVector))*radtodeg;
523- if (eVector (eZ) < 0 ) PerigeeArgument = 360 . - PerigeeArgument;
523+ if (abs (Inclination) > 1E-8 ) {
524+ PerigeeArgument = acos (DotProduct (N, eVector)) * radtodeg;
525+ if (eVector (eZ) < 0 ) PerigeeArgument = 360 . - PerigeeArgument;
526+ }
524527 }
525528 else
526529 {
You can’t perform that action at this time.
0 commit comments