Documentation / @interstellar-tools/types / OrbitInterface
Interface: OrbitInterface
Defined in: orbits.ts:231
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.framesays which plane they're measured from: without it, an orbit can only be drawn flat, in its own plane.- Where
iis given against the ecliptic, for a body around the Sun, or against its parent's equator or Laplace plane,retrogradeis set exactly wheni > 90°. On the sky,i > 90°only means the orbit turns clockwise as we see it.
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:233
Semi-major axis of this body's orbit around the parent's centre of mass.
angle
angle: Radians;Defined in: orbits.ts:241
Current orbital position at J2000 in radians (true anomaly).
e
e: number;Defined in: orbits.ts:235
Orbital eccentricity (0 = circular, closer to 1 = highly elliptical).
frame?
frame?: OrbitFrameInterface;Defined in: orbits.ts:251
The plane i, om and w are measured from. Given with them.
i?
i?: DegreesType;Defined in: orbits.ts:243
Orbital inclination in degrees, as catalogues give it.
om?
om?: DegreesType;Defined in: orbits.ts:247
Longitude of the ascending node in degrees.
period
period: TemporalInterface;Defined in: orbits.ts:237
Orbital period, always positive. See retrograde for the direction.
q?
q?: DistanceInterface;Defined in: orbits.ts:249
Periapsis distance
retrograde?
retrograde?: boolean;Defined in: orbits.ts:239
true for a retrograde orbit. Omitted for the usual prograde orbits.
w?
w?: DegreesType;Defined in: orbits.ts:245
Argument of periapsis in degrees.