The NAVIGATE command calculates the bearing and distance from the ship's current position to the center of a specified galactic sector. It is a course calculation only: it does not rotate the ship, engage its engines, consume flux, or establish an automatic course.

Syntax

NAVIGATE x y

Beginning with ge-next 0.3, the coordinates may be omitted to select sector 0 0:

NAVIGATE

Classic GE requires both coordinates. Both versions reject coordinates beyond the configured galaxy radius.

Output

The result identifies the destination sector, relative bearing, and distance:

Sector 10 -4 is bearing -37, distance 128436.

The destination is the exact center of the requested sector. A sector is 10,000 distance units wide and high, but the reported value is the direct straight-line distance from the ship's precise position to that center. It is therefore not simply the number of sectors multiplied by 10,000. Diagonal separation follows the Pythagorean relationship, and the ship's position within its current sector also contributes to the result.

The bearing is relative to the ship's present heading. A bearing of 0 is straight ahead, a positive bearing is to starboard, and a negative bearing is to port. The commander can use that result with ROTATE, IMPULSE, or WARP, but must issue those commands separately.

Classic GE and ge-next

Classic GE aims at .50001 on each axis instead of the exact sector center, then uses its original bearing calculation. That calculation can return an incorrect direction for axis-aligned positions, and its coordinate nudge can cause cumulative drift; see Classic bug: Axis-aligned bearing errors.

ge-next 0.3 corrected the bearing calculation for axis-aligned positions and removed the coordinate mutation. It aims at the exact sector center, .5, so the reported bearing and distance use the intended destination without altering either coordinate.

See also