API Reference / registerSyntheticSystem · function

Function: registerSyntheticSystem()

function registerSyntheticSystem(engine, sys): string[];

Register a system's bodies on a real Engine so transits, returns, retrograde detection, skyView, relational — every computation built on Engine.position/Engine.longitude — consume them unchanged. The bodies are placed heliocentrically in the real solar system and viewed from real Earth, so the synthetic observer is not applied here (use syntheticPositions for the self-contained world frame). Each body's epoch is then interpreted as a TT Julian Day.

Parameters

ParameterTypeDescription
engineSourceRegistrarThe engine to register onto (anything with registerSource).
sysSyntheticSystemThe authored system.

Returns

string[]

The ids registered.

Example

registerSyntheticSystem(engine, {
  id: "nemesis", bodies: [{ id: "nemesis", mode: "kepler", a: 520, e: 0.1,
    i: 5, node: 0, peri: 0, M0: 0, periodDays: 4_300_000, epoch: 2451545 }],
});
returns(engine, "nemesis", natalJd, jdStart, jdEnd); // works, zero changes
engine.position("nemesis", jd).retrograde;           // apparent, from Earth

Start building

Quickstart →