Documentation / @interstellar-tools/types / MoonInterface
Interface: MoonInterface
Defined in: celestial-bodies/moons.ts:35
Represents a moon (natural satellite) orbiting a planet.
A moon always has a parent (its planet) and an orbit around it; see OrbitInterface.
Physical and drawing properties:
- Size (
radius): Actual moon radius in kilometers (km). - Drawing (
display): colour, and state a renderer computes; see DisplayInterface.
Example
const europa: MoonInterface = {
id: 'europa',
name: 'Europa',
category: 'natural satellite',
parent: 'jupiter',
orbit: {
a: { value: 0.00448, unit: 'au' },
e: 0.009,
period: { value: 3.551, unit: 'd' },
angle: 0 as Radians
},
radius: { value: 1560.8, unit: 'km' },
display: { color: '#a6a6a6' }
};Properties
category
category: 'natural satellite' | 'irregular satellite' | 'retrograde satellite';Defined in: celestial-bodies/moons.ts:42
Classification of the moon.
display?
optional display?: DisplayInterface;Defined in: celestial-bodies/moons.ts:62
How to draw the moon: its colour, and state a renderer computes.
id
id: string;Defined in: celestial-bodies/moons.ts:37
Stable identifier, used by parent references. Never translated.
mu?
optional mu?: number;Defined in: celestial-bodies/moons.ts:54
Standard gravitational parameter
name
name: string;Defined in: celestial-bodies/moons.ts:39
Name of the moon (e.g., "Io", "Europa", "Titan").
orbit
orbit: OrbitInterface;Defined in: celestial-bodies/moons.ts:47
Orbit around the parent planet.
parent
parent: string;Defined in: celestial-bodies/moons.ts:45
Id of the planet the moon orbits (e.g., 'jupiter').
radius
radius: DistanceInterface;Defined in: celestial-bodies/moons.ts:49
Physical radius of the moon in kilometres.
type?
optional type?: undefined;Defined in: celestial-bodies/moons.ts:40
x?
optional x?: DistanceInterface;Defined in: celestial-bodies/moons.ts:56
X-coordinate in a distance-based system (optional).
y?
optional y?: DistanceInterface;Defined in: celestial-bodies/moons.ts:58
Y-coordinate in a distance-based system (optional).
z?
optional z?: DistanceInterface;Defined in: celestial-bodies/moons.ts:60
Z-coordinate in a distance-based system (optional).