Ship Specs Window

Overview

A floating/draggable HUD window that displays ship design parameters, live performance metrics, and a schematic layout diagram. Accessible via Shift+U keyboard shortcut or the View menu.

Window Structure

The Ship Specs window is a standard floating window (floating-window class) with three tabs:

Tab Content Update Frequency
Specs Static class parameters with bar gauges On ship class change only
Performance Live computed values Every tick
Layout SVG ship schematic On ship class change only

Ship Class Configurations

Full parameter set per ship class, sourced from services/physics/src/config.py:

Parameter Cargo Hauler Fast Frigate Unit
Dry Mass 100,000 8,000 kg
Fuel Capacity 60,000 15,000 kg
Max Thrust 400,000 600,000 N
Isp 15,000 20,000 s
Main Fuel Rate 2.72 3.06 kg/s
Wheel Capacity 40,000 5,000 N·m·s
RCS Linear Thrust 10,000 4,000 N
Max Wheel Torque 2,000 500 N·m
Max RCS Torque 20,000 8,000 N·m
RCS Fuel Rate Max 0.68 0.27 kg/s
RCS Linear Fuel Rate 0.34 0.14 kg/s
Controller ω_n 0.15 0.5 rad/s
Inertia Dry (X/Y/Z) 4M/4M/800k 40k/40k/15k kg·m²
Inertia Full (X/Y/Z) 6.4M/6.4M/1.28M 80k/80k/30k kg·m²

Specs Tab

Sections

  1. Propulsion (color: #0af)
    • Thrust, Isp, Fuel Capacity, Dry Mass, Full Mass (dry + fuel), Max Delta-v
  2. Attitude Control (color: #0c6)
    • Wheel Torque, Wheel Capacity, RCS Torque, RCS Linear Thrust, Controller ω_n
  3. Inertia (Dry) (color: #c80)
    • Roll (X), Pitch (Y), Yaw (Z) moments of inertia

Bar Gauges

Each spec row displays:

  • Label (left-aligned)
  • Value with unit (right-aligned, monospace)
  • Horizontal bar gauge: fill_width = value / max_across_all_classes

Bar fill color matches the section color.

Derived Values

  • Full Mass = dry_mass + fuel_capacity
  • Max Delta-v = Isp × g₀ × ln(full_mass / dry_mass)
    • g₀ = 9.80665 m/s²

Performance Tab

Sections

  1. Propulsion
    • Thrust Level (%)
    • Current Thrust (N)
    • Acceleration (m/s²)
    • Mass Flow Rate (kg/s)
  2. Mass
    • Current Mass (kg)
    • Fuel Remaining (kg + %)
    • Burn Time Remaining (s)
  3. Performance
    • Delta-v Remaining (m/s)
    • TWR (using local gravity: μ/r²)
    • Max Acceleration empty (m/s²)
    • Max Acceleration full (m/s²)
  4. Inertia (Current)
    • X, Y, Z moments interpolated by fuel fraction

Update Logic

Values computed each tick from current ship state data:

  • fuel_fraction = fuel / fuel_capacity
  • current_mass = dry_mass + fuel
  • current_thrust = max_thrust × thrust_level
  • acceleration = current_thrust / current_mass
  • mass_flow = main_fuel_rate × thrust_level
  • burn_time = fuel / mass_flow (if mass_flow > 0)
  • delta_v = isp × g₀ × ln(current_mass / dry_mass)
  • local_g = μ / r² (r = distance to reference body center)
  • twr = acceleration / local_g
  • current_inertia[i] = inertia_dry[i] + fuel_fraction × (inertia_full[i] - inertia_dry[i])

Layout Tab

SVG ship schematic with viewBox ~320×400.

Content

  • Side view (upper half): Profile with hull outline, engine bell, RCS pod positions, fuel tank
  • Top view (lower half): Plan view with hull outline, RCS positions, dimensional annotations
  • Labels with leader lines using project palette colors
  • Class-specific drawing functions: drawCargoHaulerLayout() / drawFastFrigateLayout()

Styling

  • Labels: #6cf
  • Dimensions: #888
  • Hull outlines: #334 stroke
  • Engine: #c60 fill
  • RCS pods: #0c6 fill
  • Fuel tanks: #06a fill

Settings Persistence

Key Type Default Description
shipSpecs boolean false Window visibility
shipSpecsActiveTab string 'specs' Active tab name

Keyboard Shortcut

  • Shift+U — Toggle Ship Specs window
  • Works in both cockpit and map views
  • Plain U (without Shift) still toggles Ship Systems

Added to View menu after “Ship Systems”:

Ship Specs    Shift+U

Checkmark synced with shipSpecsVisible state.

Window Properties

Property Value
Default position top: 48px, left: 700px
Width 340px
Draggable Yes (position persisted)
Close button × (top-right)

Module Exports

From shipSpecs.js:

  • createShipSpecsContent(container) — Build all 3 tab DOMs, return refs object
  • updateShipSpecs(refs, shipData, orbitalData) — Update Performance tab values each tick

Back to top

Galaxy — Kubernetes-based multiplayer space game

This site uses Just the Docs, a documentation theme for Jekyll.