Skip to content

Conversation

MDNich
Copy link
Contributor

@MDNich MDNich commented Jul 13, 2025

Add RK6 Calculation method. Follows Butcher Tableau from Table 2 of this article.

Also adds menu options and a table column, as well as a disclaimer tooltip for the RK6 option.

MDNich added 5 commits July 12, 2025 20:03
Introduces RK6SimulationStepper for higher-order Runge-Kutta integration and RKStepperChoice enum to select between RK4 and RK6 methods. Updates simulation engine, options, preferences, and GUI panels to support user selection of RK method for flight computations.
Corrected the reference URL in RK6SimulationStepper to remove duplicate 'https://' and updated the RK6StepperChoice description to clarify its accuracy and performance compared to RK4.
@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

The error was a non-ascii character in the citation of the RK6 Method source.

@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

For developers, see this thread regarding uses and benefits of the RK6 analysis.

@SiboVG
Copy link
Member

SiboVG commented Jul 13, 2025

Very cool, I've been wanting this for a while. Thanks a lot! I currently don't have time to do a code review though...

@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

The code is actually very simple since it's pretty much the same as the RK4 one, except for a change of coefficients and of course adding a couple more. The rest of the additions are simply to add it as a GUI option and as a setting - copying the GeodeticComputationMethod structure that was already implemented.

Copy link
Contributor

@JoePfeiffer JoePfeiffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, meant it to go in the code

@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

Sorry - where can I see your requested changes ? I saw the comment that was edited afterwards, but I'm not following what you had in mind. Thx !

@JoePfeiffer
Copy link
Contributor

Sorry - where can I see your requested changes ? I saw the comment that was edited afterwards, but I'm not following what you had in mind. Thx !

Just ignore the "oops" comment. github doesn't seem to want to let me delete it.

@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

Should be fixed !

@JoePfeiffer
Copy link
Contributor

This is a really nice piece of work, thanks. Now that I've looked at it, I see you've addressed my concern about slowing down the sim by leaving both steppers in place and letting the user decide -- great.

We could use some unit testing on it; just the existing sim tests but with RK6 would do that.

We are right on the verge of the final 24.12 release. I'd like this to go in after that release.

@MDNich
Copy link
Contributor Author

MDNich commented Jul 13, 2025

Sounds great ! I will try to write a couple unit tests - as you suggested. Sounds good on the release - I was never thinking of replacing RK4 for sure, just as another option for high-stakes simulations requiring high-fidelity results etc - possibly may be useful to add also an option to change the default time step as another high-fidelity option.

@JoePfeiffer
Copy link
Contributor

Forgot something -- please have the new option read from/written to the .ork file.

@MDNich
Copy link
Contributor Author

MDNich commented Jul 14, 2025

Great point - didn't think of that. Will do + unit tests.

MDNich added 2 commits July 19, 2025 18:48
Extended SimulationTest and DisableStageTest to include tests using the RK6 Runge-Kutta stepper. These tests verify correct simulation behavior and abort conditions when using the RK6 integrator, ensuring consistency with existing stepper options.
@MDNich MDNich requested a review from JoePfeiffer July 19, 2025 23:09
@MDNich
Copy link
Contributor Author

MDNich commented Jul 19, 2025

Tests have been added cloning the RK4 ones - all pass ! Also added is writing and reading from an ORK file - default for unspecified simulations is RK4.

MDNich added 3 commits July 20, 2025 10:32
Included the <rungekuttamethod>rk4</rungekuttamethod> element in the simulation example to document the specification of the Runge-Kutta integration method.
Copy link
Member

@SiboVG SiboVG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also modify fileformat.txt to reflect the addition of the simulation stepper method. You can add a new version, version 1.11 and add Introduced with OpenRocket 25.XX. as the title (we will replace 'xx' with the release version when time comes.

Updated the XML element and handler from <rungekuttamethod> to <simulationsteppermethod> for clarity and consistency. Also updated fileformat.txt to document the new element in version 1.11.
@MDNich
Copy link
Contributor Author

MDNich commented Aug 3, 2025

Képernyőfotó 2025-08-02 - 21 05 01 Should we also change the label here to be 'Runge Kutta 4/6' or RK4/6 is still fine ?

Renamed RKStepperChoice to SimulationStepperMethod throughout the codebase for clarity and consistency. Updated all references, method names, and UI labels accordingly. Added AdvancedRollControl simulation extension and provider for enhanced roll control functionality.
@MDNich
Copy link
Contributor Author

MDNich commented Aug 3, 2025

All set with the requested changes @SiboVG.

@MDNich MDNich requested a review from SiboVG August 3, 2025 01:15
@SiboVG
Copy link
Member

SiboVG commented Aug 3, 2025

Képernyőfotó 2025-08-02 - 21 05 01 Should we also change the label here to be 'Runge Kutta 4/6' or RK4/6 is still fine ?

RK4 and RK6 is fine; I don't want it to take up too much space in the table.

@SiboVG
Copy link
Member

SiboVG commented Aug 6, 2025

LGTM. I added some small changes in the end, and removed the AdvancedRollControl examples (irrelevant to this PR).

@JoePfeiffer do you still have anything to add for this PR?

@JoePfeiffer JoePfeiffer merged commit 9dad408 into openrocket:unstable Aug 6, 2025
1 check passed
@SiboVG
Copy link
Member

SiboVG commented Aug 6, 2025

Thanks a ton for the contribution @MDNich. See you in the next PR! 😉

@MDNich
Copy link
Contributor Author

MDNich commented Aug 6, 2025

Anytime ! Thank you !

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.

3 participants