Documentation / @interstellar-tools/types / SystemInterface
Interface: SystemInterface
Defined in: celestial-bodies/systems.ts:46
Represents a system: the barycenter (centre of mass) that its members orbit.
A system does not list its members. Each member names the system as its parent, so the member list is derived and there is one source of truth. Systems nest: the Alpha Centauri AB pair is a system whose parent is the Alpha Centauri system.
parentandorbitset: the system orbits its parent as one body.parentwithoutorbit: bound to the parent, but not on a Kepler orbit.- Neither: unbound.
Example
const alphaCentauriAB: SystemInterface = {
id: 'alpha-centauri-ab',
name: 'Alpha Centauri AB',
kind: 'binary',
parent: 'alpha-centauri',
orbit: {
a: { value: 503, unit: 'au' },
e: 0.5,
period: { value: 547, unit: 'kyr' },
angle: Math.PI as Radians
}
};Properties
distance?
optional distance?: DistanceInterface;Defined in: celestial-bodies/systems.ts:58
Distance from the Sun.
id
id: string;Defined in: celestial-bodies/systems.ts:48
Stable identifier, used by parent references. Never translated.
kind
kind: SystemKindType;Defined in: celestial-bodies/systems.ts:52
What kind of system the barycenter holds together.
name
name: string;Defined in: celestial-bodies/systems.ts:50
Display name of the system.
orbit?
optional orbit?: OrbitInterface;Defined in: celestial-bodies/systems.ts:56
Orbit of the system's barycenter around its parent.
parent?
optional parent?: string;Defined in: celestial-bodies/systems.ts:54
Id of the galaxy or system this system is bound to.
x?
optional x?: DistanceInterface;Defined in: celestial-bodies/systems.ts:60
X-coordinate of the barycenter in the parent's frame.
y?
optional y?: DistanceInterface;Defined in: celestial-bodies/systems.ts:62
Y-coordinate of the barycenter in the parent's frame.
z?
optional z?: DistanceInterface;Defined in: celestial-bodies/systems.ts:64
Z-coordinate of the barycenter in the parent's frame.