Skip to content

ENH: Export Open Rocket Files #270

Open

Description

@giovaniceotto

Flight trajectory simulation is a challenging engineering task. Therefore, we often rely on several different simulators to make sure we did not get anything too wrong.

Furthermore, some university competitions require the submission of a specific format of flight simulation file.

In order to facilitate both of these scenarios, RocketPy should be able to export the current simulation case to an Open Rocket File.

Proposed Milestone

v1.1.0

Activity

  1. added
    OutputsDedicated to visualizations enhancements like prints and plots
    on Nov 5, 2022
  2. added this to the Release v1.1.0 milestone on Nov 5, 2022
  3. Gui-FernandesBR commented on Apr 17, 2023

    @Gui-FernandesBR
    Member

    Generating .ork files can be quite complex. Reading it is another task, and may be simpler to do.
    Therefore I'm moving this issue to another milestone

  4. moved this from Long-Term to Mid-Term in LibDev Roadmapon Nov 5, 2023
  5. moved this from Mid-Term to Backlog in LibDev Roadmapon Jan 16, 2024
  6. self-assigned this
    on Feb 24, 2024
  7. changed the title [-]Export Open Rocket Files[/-] [+]ENH: Export Open Rocket Files[/+] on Nov 2, 2024
  8. added
    EnhancementNew feature or request, including adjustments in current codes
    on Nov 2, 2024
  9. moved this from Backlog to HotFix in LibDev Roadmapon Jan 26, 2025
  10. ting-hong-shieh commented on Aug 14, 2026

    @ting-hong-shieh

    I reviewed the current OpenRocket implementation to turn this into a smaller first milestone.

    For a reproducible compatibility target, I suggest pinning the exporter tests to OpenRocket release-24.12, commit 133b558de556f0282f51c3f53f3b3fc633b4310a. In that release:

    • GeneralRocketSaver writes a ZIP archive whose main entry is rocket.ork, followed by any decal assets;
    • OpenRocketSaver writes XML file version 1.10; and
    • GeneralRocketLoader accepts ZIP, GZIP, and uncompressed XML input.

    The OpenRocket source is GPLv3-or-later with an additional packaging permission. Any fixture copied from that repository should retain its source commit and license notice. I would implement the format independently from the documented output and generated fixtures rather than copying saver code into RocketPy.

    Proposed first milestone: export only

    1. Add a serializer for a documented subset of the RocketPy model.
    2. Write rocket.ork as UTF-8 XML inside the ZIP container expected by OpenRocket 24.12.
    3. Emit an explicit warning or raise in strict mode for every unsupported mapping; never silently discard a component.
    4. Verify the generated archive with XML assertions and by opening it with the pinned OpenRocket release.

    The first mapping could cover one rocket/stage, a synthesized body tube, nose cone, trapezoidal or elliptical fins, tail, rail buttons, dry mass/inertia, and one solid motor. Before implementation, one modeling decision needs maintainer agreement: RocketPy does not represent an OpenRocket body-component tree directly, so should the exporter synthesize a single body tube from the Rocket radius and axial component bounds, or require the caller to provide export geometry explicitly?

    I recommend explicit export geometry when the body length cannot be derived without ambiguity. That makes lossy output visible at the API boundary.

    Tests

    • XML and ZIP structure assertions against golden output generated by OpenRocket 24.12;
    • unit and coordinate-orientation checks for every supported mapping;
    • one fixture that OpenRocket opens and saves again without dropping supported geometry;
    • strict-mode failures and warning-mode output for unsupported components; and
    • a license/source manifest for any upstream-generated fixtures.

    Import and broader round-trip support should be separate milestones. If this scope and the explicit-geometry rule are acceptable, I can turn the mapping into a concrete API sketch before opening a draft PR.

  11. Gui-FernandesBR commented on Aug 14, 2026

    @Gui-FernandesBR
    Member

    We need to reflect on what would be the best architecture of this implementation.

    The way I see right now, the RocketSerializer project would be the best place to start with this new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request, including adjustments in current codesOutputsDedicated to visualizations enhancements like prints and plots

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions