Repository navigation
BUG: Prevent center-of-mass derivative spikes at ignition and burnout - #1214
Open
zakariyaghazzol wants to merge 1 commit into
Open
zakariyaghazzol wants to merge 1 commit into
zakariyaghazzol wants to merge 1 commit into
Conversation
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.
Fixes #1185.
Current behavior
The flight solver can sample the center-of-mass offset on both sides of a
slope change at ignition or burnout. That can produce an acceleration
spike that grows as the sample spacing gets smaller.
New behavior
Calculate the offset from the underlying propellant mass and position
functions. Keep derivative samples within one smooth interval. At an
exact boundary, use the rate from the interval immediately after it.
I'd appreciate feedback on that convention. The solver uses that rate,
which doesn’t include an impulse from the sudden change in slope.
The coordinate signs and thrust switching stay the same. The sign
correction in #1196 is a separate thing.
Behavior changes
The offset is now made to be backed by a callable instead of a sampled table.
Public method signatures stay the same, but any code that expects
.sourceto be an array may need to change.The updated Defiance test uses the simulated peak now during powered flight
(88.89 m/s²) in place of the old numerical spike at burnout
(10,400.76 m/s²). The apogee check still uses the same flight
measurement and tolerance.
Testing
ignition during flight, and the Defiance burnout regression.
and 9 skips. Five slow solver tests and Ruff checks also passed.
were outside this check.
AI assistance was used for implementation and testing.