API Reference / BodyPositionSource · interface

Interface: BodyPositionSource

A pluggable position-over-time source: the same shape every derived computation needs from a body. Returned by syntheticEphemeris.

Extends

Properties

PropertyTypeDescriptionInherited from
<a id="impossible"></a> impossiblebooleantrue when at least one problem makes the system ill-defined.SyntheticDiagnosis.impossible
<a id="problems"></a> problemsstring[]One human-readable line per problem (empty when the system is sound).SyntheticDiagnosis.problems

Methods

bodies()

bodies(): string[];

The body ids this source can place.

Returns

string[]


longitude()

longitude(id, t): number;

Apparent ecliptic longitude (degrees, [0, 360)) at time t.

Parameters

ParameterType
idstring
tnumber

Returns

number


position()

position(id, t): SyntheticPosition & {
  retrograde: boolean;
  speed: number;
};

Full position at time t, with longitude speed and a retrograde flag derived by central difference — matching the Position contract that real bodies satisfy.

Parameters

ParameterType
idstring
tnumber

Returns

SyntheticPosition & { retrograde: boolean; speed: number; }

Start building

Quickstart →