Skip to content

Commit

Permalink
Terminal Guidance correctness bug
Browse files Browse the repository at this point in the history
This seems a bit useless/dangerous to me.

We explicitly catch all the cases when we should exit terminal
guidance above here.  While this will potentially blow up if we
ever call it and grab a zero-dV stage or small ullage stage that
is below minDV and isn't part of the solution.

It seems like we should just loop and wait for the stage and/or
solution to update to something that agrees, or else loop until
one of the explicit conditions at the top handles exiting
properly.

Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
  • Loading branch information
lamont-granquist committed May 28, 2023
1 parent a208bbf commit 4cde5c3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions MechJeb2/MechJebModuleGuidanceController.cs
Expand Up @@ -162,10 +162,7 @@ private void HandleTerminal()

int solutionIndex = Solution.IndexForKSPStage(vessel.currentStage);
if (solutionIndex < 0)
{
Done();
return;
}

// Only enter terminal guidance within 10 seconds of the current stage
if (Solution.Tgo(vesselState.time, solutionIndex) > 10)
Expand Down

0 comments on commit 4cde5c3

Please sign in to comment.