Fusion Space
Docs

Documentation

How Loft computes what it shows, where the model is weak, and how its accuracy is measured. The repository is open — the math here is meant to be checked, not trusted.

Methods

Loft is implemented clean-room from published methods (OpenRocket is GPL; none of its code is used). Everything runs in SI internally. Where a method is an approximation, it is flagged here and in the limitations log. The source is in the open repository, file paths noted below.

Coordinate model & integrator

The flight is integrated with a fixed-step 4th-order Runge–Kutta scheme (lib/sim/simulate.ts). The state is carried as full 3-D position and velocity vectors, but this session integrates translational motion in the vertical plane: thrust and drag act along the flight path (velocity-aligned), assuming the rocket flies at a small angle of attack — which holds for a stable rocket in light wind. Rotational dynamics (weathercocking, pitch/yaw) are not integrated; static stability is computed and reported separately. The vector-shaped state is deliberate: extending to a full 6-DOF solve is additive, not a rewrite.

Atmosphere

Temperature, pressure, and density follow the U.S. Standard Atmosphere (1976) layer model (lib/sim/atmosphere.ts), integrated from the hydrostatic equation for an ideal gas — the isothermal exponential form in isothermal layers, the power-law form under a lapse rate. Speed of sound is √(γ·R·T); dynamic viscosity follows Sutherland's law. A non-standard ground state (a warm, high, or low-pressure day) shifts the sea-level anchors while keeping the standard structure aloft — this is what the optional “today's conditions” re-run uses.

Sources: U.S. Standard Atmosphere, 1976 (NOAA/NASA/USAF); Sutherland (1893) as tabulated in standard fluid-dynamics references.

Mass, CG & inertia

Mass properties (lib/sim/mass.ts) are built from the component tree. Where geometry defines mass unambiguously — tubes, rings, fins — it is computed from the component's dimensions and its material density. Bodies of revolution (nose cones, transitions) are integrated numerically along the contour for volume and centroid (lib/sim/shapes.ts), with a shell subtracted when a wall thickness is given. An explicit <overridemass> or <overridecg>in the design always wins. The centre of gravity is mass-weighted; pitch inertia is the sum of each part's own inertia plus a parallel-axis term. Propellant burns off over the flight, so mass and CG are time-varying.

Nose-cone contours use the standard published profile equations (conical, tangent ogive, ellipsoid, power, parabolic, and the Haack series).

OpenRocket marks a radius that should match a neighbour as auto. Loft resolves those before simulating — a body tube takes its neighbour's radius, a transition end takes the body it meets, and an internal part (coupler, ring, inner tube) fits inside its enclosing tube. A radius that still can't be resolved is treated as zero and flagged in the import warnings rather than silently guessed.

Aerodynamic stability — Barrowman

The centre of pressure and normal-force-coefficient slope come from the Barrowman equations (lib/sim/aero.ts), the standard subsonic, small-angle method. Each body-of-revolution and fin set contributes a normal-force slope C and a centre of pressure, combined as a coefficient-weighted mean.

nose: C_Nα = 2·(r_base/r_ref)², X_cp = L − V/A_base transition: C_Nα = 2·[(r_aft/r_ref)² − (r_fore/r_ref)²] fins (N): C_Nα = K_fb · 4N(s/d)² / [1 + √(1 + (2·l_m/(C_r+C_t))²)] interference: K_fb = 1 + r_body/(s + r_body) static margin (cal) = (X_cp − X_cg) / d_ref

Elliptical and freeform fin sets are reduced to their area- and span-equivalent trapezoid before applying the fin equation.

Sources:J. S. Barrowman & J. A. Barrowman, “The Practical Calculation of the Aerodynamic Characteristics of Slender Finned Vehicles” (1966/1967); as compiled in the public Apogee Peak of Flight newsletters (#149, #150, #157) and the OpenRocket technical documentation.

Drag

Zero-lift drag is a component buildup referenced to the reference area (lib/sim/aero.ts):

Sources: S. F. Hoerner, Fluid-Dynamic Drag (1965); the drag treatment in the OpenRocket technical documentation; standard flat-plate friction correlations. The drag model is the largest source of error — see limitations.

Motors

A .ork references a motor by manufacturer and designation but does not embed its thrust curve, so Loft resolves the motor against a bundled database of real RASP .eng curves from ThrustCurve.org (lib/motors/). Thrust is linearly interpolated in time; propellant mass is depleted in proportion to delivered impulse (constant-Ispassumption), so motor mass falls from loaded to casing mass over the burn. Matching prefers an exact designation, then a class-and-thrust core (so a Cesaroni “838J293-13A” still resolves to “J293”), and the UI flags an approximate or failed match.

Recovery & drift

Each recovery device deploys on its event — apogee, a set altitude, or ejection — and descent uses the summed deployed drag areas (Cd·A). Descent drift is the canopy drifting with the wind; with the “today's conditions” re-run, the wind varies with altitude from the winds-aloft profile.

Live weather (optional)

The “re-fly for today” feature fetches current surface conditions and a pressure-level winds-aloft profile from Open-Meteo (keyless, no account), the same source the sibling Window uses. It is the only part of Loft that touches the network, always behind an explicit tap.