Skip to content

BUG: Prevent center-of-mass derivative spikes at ignition and burnout - #1214

Open
zakariyaghazzol wants to merge 1 commit into
RocketPy-Team:developfrom
zakariyaghazzol:tst/ignition-derivative-reproduction
Open

zakariyaghazzol wants to merge 1 commit into
RocketPy-Team:developfrom
zakariyaghazzol:tst/ignition-derivative-reproduction

Conversation

@zakariyaghazzol

@zakariyaghazzol zakariyaghazzol commented Nov 8, 2026 •

Copy link
Copy Markdown

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
.source to 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

  • 64 focused tests passed, including analytical rate checks, delayed
    ignition during flight, and the Defiance burnout regression.
  • On the same combined tree, the broader regression run had 1,647 passes
    and 9 skips. Five slow solver tests and Ruff checks also passed.
  • This was not a full-suite run. Earlier live Open-Elevation mismatches
    were outside this check.

AI assistance was used for implementation and testing.

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