39. A freighter scenario, end to end
Note: This feature is planned and not available in
coax0. The syntax shown follows the Coax specification and may change before it's built. This chapter uses roadmap R12, R13, R15, R16 and R18–R20 (spec stage 10).
The roadmap's second physical-world consumer is one spacecraft scenario: a freighter loads cargo, transfers to a moving destination, rides out a fault and docks. It runs on the metaverse/ space modules, which Orbit League and Belt 2200 use today (space primitives), and it is the scenario behind Metaverse Engine chapters 39–48. This chapter follows one run through each language facility it needs. It is a study profile, not flight qualification.
What this chapter will cover
- Heliocentric, body-fixed, ship and drum-interior states as typed frames.
- Astronomical time scales and time warp that never moves an event.
- Integrators chosen from an error budget, with events located inside a step.
- Observations that carry light time, and a controller that can't read truth.
- Engineering, game and presentation profiles over one state.
Outline
- The scenario as data. Cargo mass, tanks, drive, radiator and destination, each parameter with an R20 provenance record (chapter 37).
- Frames. The states in
metaverse-engine/physics/orbit.coaxandmetaverse-engine/physics/gravity.coaxmove onto R12 types (chapter 29). A full state transform includes theω × rterm, and a position-only transform applied to a velocity is refused. Heliocentric positions are f64; an f32 position there is refused. - Time. TDB for the ephemeris, UTC for the log, converted through pinned tables (chapter 30). An instant outside the leap-second table is refused.
- Loading cargo. Mass and inertia change, so the burn plan changes. The check: Δv against the rocket equation.
- The transfer. A Lambert guess, then a finite burn on an R15 integrator (chapter 32). Burn cutoff is an event located inside the step, not at a tick.
- Time warp. The same event order and final state at warp 1 and 10⁶.
- Signals. Ship-to-station messages take light time: about 499.0 s one way at 1 AU (chapter 35). A controller that reads the station's true state instead of a received one is refused.
- The fault. A drive cutoff mid-burn, a leaking tank or a damaged radiator from the R19 corpus (chapter 36). The ship keeps a propagated trajectory; it does not freeze.
- Docking. The frame changes from heliocentric to the station's body frame at a recorded instant.
- Replay and profiles. Replay the run at two warp factors with R16 (chapter 33). Engineering and game profiles give the same trajectory where no rule module or invented parameter differs, and a presentation-only change leaves recorded state bit for bit identical.
The consumer and the gate
The consumer is the freighter run and the Metaverse space games. The gates come from the phases: a rotating-frame state round trip against the inertial result (R12); a UTC–TDB conversion compared with published values (R13); a Kepler orbit closed after many periods and an event located to tolerance (R15); the same events at two warp factors (R16); one-way and round-trip light time (R18); a fault that leaves a propagated trajectory (R19); and provenance in the report, with invented parameters refused under the engineering profile (R20).
Done when
- The phases above have shipped with these gates.
- The chapter's examples run under
check-examples.sh, with exact output. - Metaverse Engine chapter 48's regression suite passes at engineering fidelity on the same types.
- Hypothetical propulsion stays in declared rule modules, never in the engineering profile.
Dependencies
- Chapters 29, 30, 32, 33 and 35 to 37.
- Chapter 16 for strict profiles.
- Metaverse Engine chapters 39–48, and the physics and simulation design reference.