Skip to content

PSG: a coast the Solution skips counts as flown once the vessel is past it - #2783

Draft
sarbian wants to merge 1 commit into
devfrom
fix/psg-skipped-coast-passed
Draft

sarbian wants to merge 1 commit into
devfrom
fix/psg-skipped-coast-passed

Conversation

@sarbian

@sarbian sarbian commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

A COAST_BEFORE coast shorter than SKIP_TIME (#2777) was never flown, so HasCoasted stayed false and the coast's flight plan stage was never marked done. Later solves started at that coast, and once one gave it SKIP_TIME or more, CoastDue cut the burning upper stage for a coast and a relight. Guidance now sets HasCoasted and sends COAST_ENDED once the vessel flies a burn after a skipped coast.

Adds SkippedCoastBeforeComingBackDoesNotCutTheBurningStage (failed on dev ef54081).

Not tested: compiled only (MechJebLibTest Release, or MechJeb2.sln Debug). No unit test or flight was run on this branch.

From the review of #2776 and #2777: #2776 (comment)

…st it

A COAST_BEFORE coast shorter than SKIP_TIME (#2777) was never flown, so HasCoasted stayed false and PSGSimulation never marked the coast's flight plan stage done. Every later solve then started at that coast, ahead of the burning upper stage, and once one gave it SKIP_TIME or more, CurrentPhase(false) found no burn before it and CoastDue cut the burning stage for a coast and a relight.

Once the vessel flies a burn after a skipped coast, guidance sets HasCoasted and sends COAST_ENDED, which cancels a solve started with the coast ahead and marks the coast done.

Test: SkippedCoastBeforeComingBackDoesNotCutTheBurningStage, failing on dev ef54081.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant