Skip to content

Documentation / @interstellar-tools/types / MoonInterface

Interface: MoonInterface ​

Defined in: celestial-bodies/moons.ts:40

Represents a moon (natural satellite) orbiting a planet, a dwarf planet or an asteroid.

A moon always has a parent (its planet, or an asteroid like Dimorphos's Didymos) 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 ​

ts
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 ​

ts
category: 'natural satellite' | 'irregular satellite' | 'retrograde satellite';

Defined in: celestial-bodies/moons.ts:47

Classification of the moon.


display? ​

ts
display?: DisplayInterface;

Defined in: celestial-bodies/moons.ts:78

How to draw the moon: its colour, and state a renderer computes.


ellipsoid? ​

ts
ellipsoid?: EllipsoidInterface;

Defined in: celestial-bodies/moons.ts:65

Reference ellipsoid, from the IAU Working Group on Cartographic Coordinates and Rotational Elements, where it gives one. radius is the mean radius.


id ​

ts
id: string;

Defined in: celestial-bodies/moons.ts:42

Stable identifier, used by parent references. Never translated.


mu? ​

ts
mu?: number;

Defined in: celestial-bodies/moons.ts:70

Standard gravitational parameter μ=GM of the body alone, in m³/s², as the orbit equations take it. Given where JPL publishes one.


name ​

ts
name: string;

Defined in: celestial-bodies/moons.ts:44

Name of the moon (e.g., "Io", "Europa", "Titan").


observations? ​

ts
observations?: MoonObservationsInterface;

Defined in: celestial-bodies/moons.ts:83

What is measured about it, with uncertainties and sources, apart from the values the equations use.


orbit ​

ts
orbit: OrbitInterface;

Defined in: celestial-bodies/moons.ts:52

Orbit around the parent.


parent ​

ts
parent: string;

Defined in: celestial-bodies/moons.ts:50

Id of the planet, or asteroid, the moon orbits (e.g., 'jupiter', '65803-didymos').


radius ​

ts
radius: DistanceInterface;

Defined in: celestial-bodies/moons.ts:59

Mean radius of the moon in kilometres; the IAU's, where it gives one.


rotation? ​

ts
rotation?: RotationInterface;

Defined in: celestial-bodies/moons.ts:57

How the moon spins: its sidereal rotation period and direction. Given where the IAU, or a measurement, publishes one.


type? ​

ts
type?: undefined;

Defined in: celestial-bodies/moons.ts:45


x? ​

ts
x?: DistanceInterface;

Defined in: celestial-bodies/moons.ts:72

X-coordinate in a distance-based system (optional).


y? ​

ts
y?: DistanceInterface;

Defined in: celestial-bodies/moons.ts:74

Y-coordinate in a distance-based system (optional).


z? ​

ts
z?: DistanceInterface;

Defined in: celestial-bodies/moons.ts:76

Z-coordinate in a distance-based system (optional).