Merged
Conversation
Only reset to 1x warp if in on-rails timewarp.
Roll was included when determining if the craft had settled down, but since it was deliberately left uncontrolled, the roll rate would never decrease; this prevented the node executor from going to warp unless 'kicked' (when timewarp removes all angular momemtum). Fixes #1981.
It sometimes takes a few ticks before the base game updates the vessel's situation. This means that `VerticalHeadingTo` will disable the actuation controls during this time. If the vessel switches from `VERTICAL_ASCENT` to `GRAVITY_TURN` before the situation changes, the actuation controls never get re-enabled (`VerticalHeadingTo` never gets called while, according to the game, the vessel has lifted off). This can happen if the pitch start velocity is very small, for example if the auto-turn velocity slider is all the way to the left. This change makes sure that the actuation controls also get enabled properly while in the `GRAVITY_TURN` phase of flight, by enabling the actuation controls at the same time as the axis controls in the `AttitudeTo` method. Fixes the root cause of the problem in #2025.
When no exception occurred in the optimizer, PSG prints "Null" to the debug log every second. This commit reduces this log spam; now it only prints the exception if an exception actually occured.
Also clean up the 'SetAxisControl' toggles a bit; the axis control settings were set the same in three different places. Now it's done only once.
If a stage has ullage motors that light at the same time as the main engine, then hotstaging the _next_ stage does not work properly. Since both the ullage motors and the "regular" engine have the same KSP stage number, hotstaging starts when the ullage motors have less than `HotStagingLeadTime` seconds left to burn, even if the main engine burn time is much longer. With this change, all burn times with the same KSP stage are added up to calculate the `LastNonZeroDVStageBurnTime`.
rescued from #2025 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
And make the tests green. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
The bug occurs when using the autoascent feature for negative inclination orbits. Namely, the circularization burn was explicitly trying to achieve the _abs(inclination)_ instead of the target. The bug was fixed by removing the `Math.Abs()` from the OrbitalManeuverCalculator.DeltaVToChangeInclination input.
It should be between peR and apR (if apR > 0). Also clamp apR to be <0 or >= peR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backporting the fixes in #2097