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

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

Function: secondsToHeatLevel()

secondsToHeatLevel(params): number

Defined in: src/ships/heat.ts:398

How long a build takes to move from one heat level to another under a given load — heating or cooling.

Parameters

params

The hull's two heat stats, the load, and the two heat levels.

heatCapacity

number

The hull's heat capacity.

heatDissipation

number

The hull's maximum heat dissipation, per second.

startLevel

number

The heat level the ship starts at.

targetLevel

number

The heat level being asked about.

thermalLoad

number

The thermal load being generated, per second.

Returns

number

The seconds it takes, or Infinity when the load never carries the ship there: heating towards a level at or beyond where it settles, or cooling towards one below it.

Throws

If any figure is not a finite non-negative number, or heatCapacity is 0.

Example

import { OVERHEAT_HEAT_LEVEL, secondsToHeatLevel } from '@elite-dangerous-almanac/core/ships/heat';

secondsToHeatLevel({
  heatCapacity: 334, heatDissipation: 67.15, thermalLoad: 90,
  startLevel: 0.5, targetLevel: OVERHEAT_HEAT_LEVEL,
}); // -> 10.9424…  seconds of firing before the gauge reads 100%
⚠️ **GitHub.com Fallback** ⚠️