Skip to main content
The OpenRocket core module exposes a public Java API that you can use to integrate simulation functionality into your own applications. This page describes the most important packages and classes.
Full Javadoc can be generated from the source by running ./gradlew javadoc. The output is written to core/build/docs/javadoc/.

Key packages

info.openrocket.core.startup

Bootstrap and dependency injection. Start here when embedding the core module.

info.openrocket.core.rocketcomponent

All rocket component classes — NoseCone, BodyTube, FinSet, Motor, and more.

info.openrocket.core.simulation

Simulation engine, options, and result data.

info.openrocket.core.document

OpenRocketDocument and document factory — the top-level container for a rocket design.

info.openrocket.core.file

File loaders and savers (GeneralRocketLoader, GeneralRocketSaver).

info.openrocket.core.l10n

Internationalization — Translator and related classes.

info.openrocket.core.database

Motor and component preset databases.

info.openrocket.core.preferences

ApplicationPreferences — user and application settings.

Startup and initialization

ClassDescription
OpenRocketCoreStatic helper to initialize the core module with one call.
ApplicationProvides static accessors for core singletons (translator, preferences, motor database).
CoreModuleGuice module that wires all core services together.
PluginModuleGuice module for plugin support. Pass to OpenRocketCore.initialize().
See Using OpenRocket core for full initialization examples.

Rocket component model

All rocket components live in info.openrocket.core.rocketcomponent. The component tree is rooted at Rocket, which contains one or more AxialStage objects.
ClassDescription
RocketTop-level rocket object. Contains stages.
AxialStageA stage (sustainer, booster, etc.). Contains components.
NoseConeNose cone component with configurable shape (ogive, conical, parabolic, etc.).
BodyTubeCylindrical body tube.
TransitionTransition (shoulder or boat tail) between two diameters.
TrapezoidFinSetTrapezoidal fin set.
EllipticalFinSetElliptical fin set.
FreeformFinSetFreeform fin set defined by arbitrary points.
InnerTubeInner tube, used as a motor mount or structural element.
LaunchLugLaunch lug.
RailButtonRail button for launch rails.
ParachuteParachute recovery device.
StreamerStreamer recovery device.
MassComponentNon-structural mass object (e.g. electronics bay, payload).
ShockCordShock cord connecting airframe sections.

Component hierarchy

Components are connected in a parent–child tree. Call parent.addChild(child) to attach a component. Each component class defines which child types it accepts.
Rocket rocket = new Rocket();
AxialStage stage = new AxialStage();
rocket.addChild(stage);

BodyTube bodyTube = new BodyTube();
stage.addChild(bodyTube);

TrapezoidFinSet fins = new TrapezoidFinSet();
bodyTube.addChild(fins);

Document API

ClassDescription
OpenRocketDocumentContainer for a complete rocket design, simulations, and metadata.
OpenRocketDocumentFactoryFactory for creating new blank documents.
OpenRocketDocument document = OpenRocketDocumentFactory.createNewRocket();
Rocket rocket = document.getRocket();

File I/O

ClassDescription
GeneralRocketLoaderDetects file format and loads .ork or .rkt files into an OpenRocketDocument.
GeneralRocketSaverSaves an OpenRocketDocument to disk.

Simulation API

ClassDescription
SimulationRepresents a single simulation run bound to a Rocket.
SimulationOptionsConfiguration for a simulation: launch angle, wind, altitude, motor selections, etc.
SimulationStatusRuntime state during simulation.
FlightDataTypeEnum of all measurable flight data types (altitude, velocity, acceleration, etc.).
FlightDataResult data from a completed simulation.
FlightDataBranchA single data series (e.g. main flight path or ejected stage).

Database API

ClassDescription
ThrustCurveMotorSetDatabaseDatabase of all known motors loaded from the bundled SQLite file.
ComponentPresetDaoData access object for component presets (commercial tubes, nose cones, etc.).
Access the motor database through Application:
ThrustCurveMotorSetDatabase motorDb = Application.getMotorSetDatabase();

Internationalization

ClassDescription
TranslatorInterface for retrieving translated strings by key.
ClassBasedTranslatorAutomatically infers a translation key prefix from the calling class.
ExceptionSuppressingTranslatorWraps another translator and suppresses missing-key exceptions.
private static final Translator trans = Application.getTranslator();
String label = trans.get("RocketPanel.lbl.Stability");

Preferences

ApplicationPreferences exposes user settings such as units, default simulation parameters, and UI preferences. Access it through Application:
ApplicationPreferences prefs = Application.getPreferences();