Rotation and headings

A ship has a current absolute galactic heading and a requested destination heading, both expressed in degrees. Navigation commands can request either a relative turn or an absolute heading. The ship then rotates toward that target over subsequent movement updates.

Heading convention

Galactic headings run from 0 through 359 degrees:

Heading Direction Coordinate change
0 North decreasing Y
90 East increasing X
180 South increasing Y
270 West decreasing X

Values wrap at north: heading 359 is one degree to port of heading 0, while heading 1 is one degree to starboard.

Current and requested headings

Internally, the current heading and requested heading are separate values. Issuing a turn changes the requested heading. On each movement update, the ship rotates partway toward it and then moves using the newly adjusted current heading. Reports and scans therefore may show an intermediate heading until the turn is complete.

A new turn order replaces the previous requested heading; turns are not queued. A relative order is calculated from the ship's current heading at the moment the command is processed, not from the destination of a turn already in progress.

Choosing a target heading

A ROTATE order may specify a relative turn or an absolute heading. A positive relative value turns starboard/right, and a negative value turns port/left. The relative target is calculated from the current heading when the command is entered. An absolute heading uses the @ prefix and runs from 0 to 359 degrees; here @ denotes a galactic heading, not the ship's scanner lock. Both classic GE and ge-next support these forms for ROTATE.

IMPULSE and WARP can also take an optional relative turn alongside a speed. ge-next additionally permits an absolute @heading with either engine command; classic GE does not. For accepted syntax and examples, see the individual command pages.

The helm chooses the shorter arc to the target. A turn of exactly 180 degrees goes starboard/right, in the increasing-heading direction.

Changing speed during a turn

Classic GE treats an engine command without an explicit turn as a relative turn of zero degrees. It calculates that zero-degree turn from the current heading and writes the result over the requested heading. Consequently, issuing IMPULSE speed or WARP speed while a rotation is in progress cancels the remaining turn and holds the heading reached so far.

For example, suppose a classic ship is turning from heading 0 toward heading 90 and has reached heading 40. Issuing WARP 8 changes its requested heading to 40, ending the turn. To preserve the original course in classic, wait for the turn to finish before changing speed or include the remaining relative turn in the engine command.

ge-next preserves the existing requested heading when an IMPULSE or WARP command omits its optional turn. The same ship can therefore change speed at heading 40 and continue turning toward 90. Supplying a nonzero relative turn still replaces the old target with a new target calculated from the current heading, while an explicit @heading replaces it with that absolute heading. The ge-next-only STOP command changes requested speed without changing requested heading.

Turn rate

The amount rotated per movement update is:

turn rate = effective acceleration / 10 degrees

Classic GE uses the class-table acceleration value. ge-next uses the ship's effective acceleration, so an installed acceleration booster doubles both acceleration and turn rate.

If the remaining angular difference is no greater than one turn-rate step, the ship snaps exactly to the requested heading and reports that the turn is complete. Otherwise it advances one step along the shorter arc. Large ships with low acceleration therefore generally take longer to bring a target onto a firing bearing.

Rotation is processed before movement in the same ship update. A moving ship follows a curved path while turning because each movement step uses the latest intermediate heading rather than waiting for the full turn to finish.

Bearings versus headings

An object's scan bearing is relative to the observer's current heading. A scanned ship's relative heading describes which way that ship faces in relation to the observer. Galactic heading is absolute. Mixing these three values is a common source of missed phaser shots.

See Coordinate system, Rotate command, and Classic bug: Axis-aligned bearing errors.