Documentation / @interstellar-tools/types / OrbitInterface
Interface: OrbitInterface
Defined in: orbits.ts:127
Kepler orbital elements of one body around its parent.
The parent is whatever the body is gravitationally bound to: a star, a planet, a barycenter or a galaxy. It is named by the parent id on the body or system that carries this orbit, and the elements always describe the motion around that parent, never around anything further up.
INFO
- Pairs: when two bodies orbit a shared barycenter (Alpha Centauri A and B), each carries its own orbit. Both share
e,periodandangle, their periapses point in opposite directions, and their semi-major axes split by mass ratio:, where is their separation. - Direction:
periodis always a positive duration. A retrograde orbit, moving against its parent's rotation, hasretrograde: true; a renderer can useretrograde ? -1 : 1as the direction of travel. i,w,omandqare only given where the dataset has them (comets and asteroids). Whereiis given,retrogradeis set exactly wheni > 90°.
Example
const earthOrbit: OrbitInterface = {
a: { value: 1.0, unit: 'au' },
e: 0.0167,
period: { value: 365.256, unit: 'd' },
angle: 1.753 as Radians
};Extended by
Properties
a
a: DistanceInterface;Defined in: orbits.ts:129
Semi-major axis of this body's orbit around the parent's centre of mass.
angle
angle: Radians;Defined in: orbits.ts:137
Current orbital position at J2000 in radians (true anomaly).
e
e: number;Defined in: orbits.ts:131
Orbital eccentricity (0 = circular, closer to 1 = highly elliptical).
i?
optional i?: DegreesType;Defined in: orbits.ts:139
Orbital inclination in degrees, as catalogues give it.
om?
optional om?: DegreesType;Defined in: orbits.ts:143
Longitude of the ascending node in degrees.
period
period: TemporalInterface;Defined in: orbits.ts:133
Orbital period, always positive. See retrograde for the direction.
q?
optional q?: DistanceInterface;Defined in: orbits.ts:145
Periapsis distance
retrograde?
optional retrograde?: boolean;Defined in: orbits.ts:135
true for a retrograde orbit. Omitted for the usual prograde orbits.
w?
optional w?: DegreesType;Defined in: orbits.ts:141
Argument of periapsis in degrees.