Documentation / @interstellar-tools/types / StarInterface
Interface: StarInterface
Defined in: celestial-bodies/stars.ts:43
Represents a star.
A star is bound to one parent: a galaxy for a single star like Vega, or a system barycenter for a star in a planetary, binary or multiple system, or a galaxy's central black hole for a star that orbits it, like S2 around Sagittarius A*. Its orbit describes the motion around that parent. A star without a parent is unbound, like a hypervelocity star leaving its galaxy.
Classification & Visualization:
- Type (
type): Spectral classification of the star (e.g.,'G2V'). - Category (
category): Defined as'star'. - Drawing (
display): colour, and state a renderer computes; see DisplayInterface.
Example
const vega: StarInterface = {
id: 'vega',
name: 'Vega',
type: 'A0V',
category: 'star',
parent: 'milky-way',
orbit: {
a: { value: 27230, unit: 'ly' },
e: 0.005,
period: { value: 480, unit: 'Myr' },
angle: 1.5699 as Radians
},
radius: { value: 2600000, unit: 'km' },
display: { color: 'blue' }
};Properties
category
category: 'star';Defined in: celestial-bodies/stars.ts:51
Defines the category as a star.
display?
display?: DisplayInterface;Defined in: celestial-bodies/stars.ts:77
How to draw the star: its colour, and state a renderer computes.
id
id: string;Defined in: celestial-bodies/stars.ts:45
Stable identifier, used by parent references. Never translated.
mass?
mass?: MassInterface;Defined in: celestial-bodies/stars.ts:57
Mass, in solar masses (
mu?
mu?: number;Defined in: celestial-bodies/stars.ts:62
Standard gravitational parameter
name
name: string;Defined in: celestial-bodies/stars.ts:47
Name of the star.
observations?
observations?: StarObservationsInterface;Defined in: celestial-bodies/stars.ts:82
What is measured about it, with uncertainties and sources, apart from the values the equations use.
orbit?
orbit?: OrbitInterface;Defined in: celestial-bodies/stars.ts:55
Orbit around the parent.
parent?
parent?: string;Defined in: celestial-bodies/stars.ts:53
Id of the galaxy, system or black hole the star is bound to.
radius
radius: DistanceInterface;Defined in: celestial-bodies/stars.ts:69
Physical radius of the star.
rotation?
rotation?: RotationInterface;Defined in: celestial-bodies/stars.ts:67
How the star spins: its sidereal rotation period, from interferometry or spectroscopy. Given where one is published.
type
type: string;Defined in: celestial-bodies/stars.ts:49
Spectral classification of the star (e.g., 'G2V').
x?
x?: DistanceInterface;Defined in: celestial-bodies/stars.ts:71
X-coordinate in the parent's frame.
y?
y?: DistanceInterface;Defined in: celestial-bodies/stars.ts:73
Y-coordinate in the parent's frame.
z?
z?: DistanceInterface;Defined in: celestial-bodies/stars.ts:75
Z-coordinate in the parent's frame.