ships.Function.singleJumpRange - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / singleJumpRange

Function: singleJumpRange()

singleJumpRange(mass, fuel, fsd): number

Defined in: src/ships/jump-range.ts:179

The range of a single jump, in light-years.

Parameters

mass

number

Total ship mass excluding the fuel being modelled, in tonnes (hull + modules + cargo — i.e. unladen mass plus cargo).

fuel

number

Fuel in the tank for this jump, in tonnes. Only up to the drive's maxFuel is burned, but the full amount still adds to the mass being moved.

fsd

FrameShiftDriveParams

The drive constants.

Returns

number

The jump distance in light-years, including any jumpBoost. 0 if the drive cannot jump (maxFuel or fuel = 0).

Remarks

Lighter ships and larger optMass jump farther; carrying more fuel than one jump needs only weighs you down, which is why BuildMetrics.maxJumpRange loads exactly one jump's worth.

Throws

If a quantity is negative or non-finite, or a required drive constant is not positive.

Example

import { singleJumpRange } from '@elite-dangerous-almanac/core/ships/jump-range';

singleJumpRange(1237.3, 6.8, { optMass: 7528.04, maxFuel: 6.8, fuelMul: 0.011,
  fuelPower: 2.5025, jumpBoost: 10.5 }); // -> 89.414678
⚠️ **GitHub.com Fallback** ⚠️