astro.Function.classifyEccentricity - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / astro / classifyEccentricity

Function: classifyEccentricity()

classifyEccentricity(eccentricity): EccentricityClass

Defined in: src/astro/body-orbit.ts:131

Which of the four descriptive bands an eccentricity falls in.

Parameters

eccentricity

number

An orbital eccentricity, as Eccentricity carries it: 0 for a circle, rising towards 1 for a long ellipse.

Returns

EccentricityClass

The band. See EccentricityClass for the thresholds.

Throws

If eccentricity is not a finite non-negative number. This takes a bare number rather than a body, so there is no absent field for a bad one to be.

Example

import { classifyEccentricity } from '@elite-dangerous-almanac/core/astro/body-orbit';

classifyEccentricity(0); // -> 'circular'
classifyEccentricity(0.0549); // -> 'nearly-circular'
classifyEccentricity(0.9); // -> 'highly-eccentric'
⚠️ **GitHub.com Fallback** ⚠️