Galaxy Model

Structure of the galaxy, sectors, systems, and planets. Distance and travel time formulas.

Structure

The galaxy is organized in a four-level hierarchy:

Galaxy
  └─ Sectors
       └─ Systems
            └─ Planets

Each planet has fixed coordinates (x, y) within the galaxy.


Distance Formula

distance = sqrt((x1 - x2)² + (y1 - y2)²)

Travel Time

travel_time = distance / fleet_speed

Fleet speed equals the speed of the slowest ship in the fleet.


Coordinates

Planets have a galaxy-scoped coordinate system. The sector and system IDs provide hierarchical grouping for display and filtering, but the actual distance calculation uses raw (x, y) coordinates.