@johnmorrisdotca/wakusei-planets 0.37.2 → 0.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/data-door.js CHANGED
@@ -94,6 +94,8 @@ export function validateSource(source, taken = []) {
94
94
  const terms = licence;
95
95
  if (!text(terms["name"]))
96
96
  refuse("the licence has no name");
97
+ if (terms["nameJa"] !== undefined && !text(terms["nameJa"]))
98
+ refuse("the licence's Japanese name is empty");
97
99
  if (!text(terms["url"]) || !WEB.test(terms["url"]))
98
100
  refuse("the licence has no link (an http or https address)");
99
101
  for (const flag of ["nonCommercial", "shareAlike"])
@@ -122,7 +124,7 @@ const TERMS = {
122
124
  ja: { nonCommercial: "非営利のみ", shareAlike: "同一条件で共有" },
123
125
  };
124
126
  /** Licence names that are plain phrases, not identifiers, and so are translated. An identifier such as "CC BY-NC 3.0 IGO" is a name and stays. */
125
- const JA_NAMES = { "public domain": "パブリックドメイン" };
127
+ const JA_NAMES = { "public domain": "パブリックドメイン", "published for use with credit": "出典を示せば利用可" };
126
128
  /**
127
129
  * The credit line for what a view drew: each source's credit with its licence name, and "non-commercial" or "share-alike" whenever the source says so, so a page cannot hide the terms of the data it
128
130
  * uses. The package's own sources come first, then the rest, each group in the order given; a source listed twice is written once. English: joined with semicolons, ending in a full stop. Japanese: the
@@ -146,7 +148,7 @@ export function creditLine(credits, language) {
146
148
  const parts = ordered.map((credit) => {
147
149
  const { source } = credit;
148
150
  const line = (source.credit[language] || source.credit.en).trim();
149
- const name = language === "ja" ? (JA_NAMES[source.licence.name.trim().toLowerCase()] ?? source.licence.name) : source.licence.name;
151
+ const name = language === "ja" ? (source.licence.nameJa?.trim() || JA_NAMES[source.licence.name.trim().toLowerCase()] || source.licence.name) : source.licence.name;
150
152
  const terms = [source.licence.nonCommercial === true ? words.nonCommercial : "", source.licence.shareAlike === true ? words.shareAlike : ""].filter((term) => term !== "");
151
153
  if (language === "ja")
152
154
  return `${line}(${[name, ...terms].join("、")})`;
@@ -3,7 +3,7 @@ import { type Vec3 } from "../vec.ts";
3
3
  import { type ScaleMode } from "../space/scale.ts";
4
4
  import { type SmallBody } from "./small-bodies.ts";
5
5
  /** The parts of three.js the points use, over and above the ones every body needs. A page's own subset of three that lacks the two instanced classes cannot draw them. */
6
- export type PointsThree = Pick<typeof THREE, "BufferAttribute" | "InstancedBufferAttribute" | "InstancedBufferGeometry" | "Mesh" | "ShaderMaterial" | "Vector2" | "Vector3">;
6
+ export type PointsThree = Pick<typeof THREE, "BufferAttribute" | "Group" | "InstancedBufferAttribute" | "InstancedBufferGeometry" | "Mesh" | "ShaderMaterial" | "Vector2" | "Vector3">;
7
7
  /** How the view places a body round the Sun in a compressed view: its distance in astronomical units to the power `SPREAD`, times `SUN_COMPRESSED` Earth radii (the same two numbers as `space/scale.ts`). */
8
8
  export declare const POINT_SCALE: {
9
9
  readonly sunCompressed: 70;
@@ -44,18 +44,27 @@ export interface PointsState {
44
44
  /** The points of a view's small bodies. */
45
45
  export interface SmallBodyPoints {
46
46
  readonly object: THREE.Object3D;
47
- /** The bodies drawn: the records of every record source in use, as many as `MAX_POINTS`. Packs them for the graphics card. */
47
+ /** The bodies drawn: the records of every record source in use, as many as `MAX_POINTS`. Packs them for the graphics card. A body with a `belt` is drawn with the others of its belt in one instanced draw of its colour; the rest are drawn together. */
48
48
  set(bodies: readonly SmallBody[]): void;
49
49
  /** Called at each draw. */
50
50
  update(state: PointsState): void;
51
- /** How many bodies are in the one draw. */
51
+ /** How many bodies are drawn in all. */
52
52
  readonly count: number;
53
+ /** How many instanced draws there are: one for each belt that has a body, and one for the bodies with no belt. */
54
+ readonly draws: number;
55
+ /** How many bodies each belt has (the bodies with no belt are under `""`). */
56
+ countOf(belt: string): number;
53
57
  dispose(): void;
54
58
  }
59
+ /** What `createSmallBodyPoints` is told: the colour of each belt's points (`#rrggbb`, by belt name), where a belt has none the points are the plain pale colour. */
60
+ export interface PointsOptions {
61
+ colours?: Readonly<Record<string, string>>;
62
+ }
55
63
  /**
56
- * Makes the points: one instanced draw of a quad for each small body.
64
+ * Makes the points: one instanced draw of a quad for each small body, one draw for each belt.
57
65
  *
58
66
  * @param T - The parts of three.js.
67
+ * @param options - The colour of each belt's points.
59
68
  * @returns The points, with no bodies yet.
60
69
  */
61
- export declare function createSmallBodyPoints(T: PointsThree): SmallBodyPoints;
70
+ export declare function createSmallBodyPoints(T: PointsThree, options?: PointsOptions): SmallBodyPoints;
@@ -80,21 +80,23 @@ void main() {
80
80
  }
81
81
  `;
82
82
  const FRAGMENT = /* glsl */ `
83
+ uniform vec3 uColour;
83
84
  varying vec2 vCorner;
84
85
  varying float vFade;
85
86
  void main() {
86
87
  float d = length(vCorner);
87
88
  if (d > 1.0 || vFade < 0.5) discard;
88
- gl_FragColor = vec4(0.86, 0.84, 0.78, 0.9 * smoothstep(1.0, 0.45, d));
89
+ gl_FragColor = vec4(uColour, 0.9 * smoothstep(1.0, 0.45, d));
89
90
  }
90
91
  `;
91
92
  /**
92
- * Makes the points: one instanced draw of a quad for each small body.
93
+ * Makes the points: one instanced draw of a quad for each small body, one draw for each belt.
93
94
  *
94
95
  * @param T - The parts of three.js.
96
+ * @param options - The colour of each belt's points.
95
97
  * @returns The points, with no bodies yet.
96
98
  */
97
- export function createSmallBodyPoints(T) {
99
+ export function createSmallBodyPoints(T, options = {}) {
98
100
  const fresh = (count, data) => {
99
101
  const made = new T.InstancedBufferGeometry();
100
102
  made.setAttribute("position", new T.BufferAttribute(new Float32Array(12), 3));
@@ -111,7 +113,13 @@ export function createSmallBodyPoints(T) {
111
113
  made.instanceCount = count;
112
114
  return made;
113
115
  };
114
- const material = new T.ShaderMaterial({
116
+ const colourOf = (belt) => {
117
+ const hex = options.colours?.[belt];
118
+ if (hex === undefined || !/^#[0-9a-f]{6}$/i.test(hex))
119
+ return [0.86, 0.84, 0.78];
120
+ return [parseInt(hex.slice(1, 3), 16) / 255, parseInt(hex.slice(3, 5), 16) / 255, parseInt(hex.slice(5, 7), 16) / 255];
121
+ };
122
+ const material = (belt) => new T.ShaderMaterial({
115
123
  vertexShader: VERTEX,
116
124
  fragmentShader: FRAGMENT,
117
125
  transparent: true,
@@ -126,50 +134,93 @@ export function createSmallBodyPoints(T) {
126
134
  uSunCompressed: { value: POINT_SCALE.sunCompressed },
127
135
  uSpread: { value: POINT_SCALE.spread },
128
136
  uObliquity: { value: new T.Vector2(Math.sin(OBLIQUITY * RAD), Math.cos(OBLIQUITY * RAD)) },
137
+ uColour: { value: new T.Vector3(...colourOf(belt)) },
129
138
  },
130
139
  });
131
- const mesh = new T.Mesh(fresh(0), material);
132
- mesh.frustumCulled = false;
133
- mesh.renderOrder = -1;
134
- mesh.visible = false;
140
+ const group = new T.Group();
141
+ group.visible = false;
142
+ // one instanced draw for each belt
143
+ const draws = new Map();
135
144
  let jd0 = 0;
136
145
  let count = 0;
137
146
  let bodies = [];
138
147
  let packed = false;
148
+ const beltOf = (body) => body.belt ?? "";
139
149
  const pack = (jd) => {
140
150
  // the shader counts days from the date the bodies were packed at: close to the one being drawn, so a float has the digits
141
151
  jd0 = jd;
142
- const data = packSmallBodies(bodies, jd0);
143
- count = data.length / 8;
144
- const old = mesh.geometry;
145
- mesh.geometry = fresh(count, data);
146
- old.dispose();
147
- mesh.visible = count > 0;
152
+ const by = new Map();
153
+ for (const body of bodies) {
154
+ const belt = beltOf(body);
155
+ const list = by.get(belt);
156
+ if (list === undefined)
157
+ by.set(belt, [body]);
158
+ else
159
+ list.push(body);
160
+ }
161
+ for (const [belt, held] of draws) {
162
+ if (by.has(belt))
163
+ continue;
164
+ group.remove(held.mesh);
165
+ held.mesh.geometry.dispose();
166
+ held.material.dispose();
167
+ draws.delete(belt);
168
+ }
169
+ count = 0;
170
+ for (const [belt, list] of by) {
171
+ const data = packSmallBodies(list, jd0);
172
+ let held = draws.get(belt);
173
+ if (held === undefined) {
174
+ const m = material(belt);
175
+ const mesh = new T.Mesh(fresh(0), m);
176
+ mesh.frustumCulled = false;
177
+ mesh.renderOrder = -1;
178
+ group.add(mesh);
179
+ draws.set(belt, (held = { mesh, material: m, count: 0 }));
180
+ }
181
+ const old = held.mesh.geometry;
182
+ held.count = data.length / 8;
183
+ held.mesh.geometry = fresh(held.count, data);
184
+ old.dispose();
185
+ held.mesh.visible = held.count > 0;
186
+ count += held.count;
187
+ }
188
+ group.visible = count > 0;
148
189
  packed = true;
149
190
  };
150
191
  return {
151
- object: mesh,
192
+ object: group,
152
193
  set(next) {
194
+ // the cap is of all the bodies together; the order is the sources' order, so the package's own come first
153
195
  bodies = next.length > MAX_POINTS ? next.slice(0, MAX_POINTS) : next;
154
196
  packed = false;
155
197
  },
156
- update(state) {
157
- if (!packed || Math.abs(state.jd - jd0) > REPACK_DAYS)
158
- pack(state.jd);
159
- const u = material.uniforms;
160
- u.uDays.value = state.jd - jd0;
161
- u.uTrue.value = state.mode === "true" ? 1 : 0;
162
- u.uSun.value.set(state.sun[0], state.sun[1], state.sun[2]);
163
- u.uViewport.value.set(Math.max(1, state.width), Math.max(1, state.height));
164
- u.uRatio.value = state.ratio;
198
+ update(now) {
199
+ if (!packed || Math.abs(now.jd - jd0) > REPACK_DAYS)
200
+ pack(now.jd);
201
+ for (const held of draws.values()) {
202
+ const u = held.material.uniforms;
203
+ u.uDays.value = now.jd - jd0;
204
+ u.uTrue.value = now.mode === "true" ? 1 : 0;
205
+ u.uSun.value.set(now.sun[0], now.sun[1], now.sun[2]);
206
+ u.uViewport.value.set(Math.max(1, now.width), Math.max(1, now.height));
207
+ u.uRatio.value = now.ratio;
208
+ }
165
209
  },
166
210
  get count() {
167
211
  return count;
168
212
  },
213
+ get draws() {
214
+ return [...draws.values()].filter((held) => held.count > 0).length;
215
+ },
216
+ countOf: (belt) => draws.get(belt)?.count ?? 0,
169
217
  dispose() {
170
- mesh.geometry.dispose();
171
- material.dispose();
172
- mesh.visible = false;
218
+ for (const held of draws.values()) {
219
+ held.mesh.geometry.dispose();
220
+ held.material.dispose();
221
+ }
222
+ draws.clear();
223
+ group.visible = false;
173
224
  },
174
225
  };
175
226
  }
@@ -0,0 +1,40 @@
1
+ import { type SurfaceView } from "./place-marks.ts";
2
+ import { type EarthPlace, type EarthPlaceLayout, type EarthPlaceLayoutOptions, type EarthPlaceLook } from "./scene/earth-places.ts";
3
+ export type { EarthPlace, EarthPlaceLayout, EarthPlaceLayoutOptions, EarthPlaceLook };
4
+ export { EARTH_PLACE_LOOKS, EARTH_PLACE_MARKS } from "./scene/earth-places.ts";
5
+ /**
6
+ * Read the text of the `earth-places` attribute (a JSON array) as the list the views draw: each place needs a longitude from -180 to 180 and a latitude from -90 to 90, one without an `id` is given its place in the list, a label is
7
+ * cut to 80 letters, a kind that is not `here` is `favourite`, and a colour is kept only when it is a hex colour, `rgb()` or `hsl()` with numbers, or a colour's name. At most 5,000 are kept. chikyu-earth's `readPlaces`.
8
+ *
9
+ * @param value - The attribute's text, or null.
10
+ * @returns The places to draw.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { readEarthPlaces } from "@johnmorrisdotca/wakusei-planets/earth-places";
15
+ *
16
+ * console.log(readEarthPlaces('[{"id":"me","lon":-79.4,"lat":43.7,"kind":"here"},{"lon":500,"lat":0}]'));
17
+ * ```
18
+ */
19
+ export declare function readEarthPlaces(value: string | null | undefined): EarthPlace[];
20
+ /**
21
+ * Where each place's marker and name go on a picture of a body, for a page or a server that draws places itself: chikyu-earth's `layoutPlaces` on the body as a view of it draws it (its axes, the camera and the projection to the screen).
22
+ * A place on the far side is left out and one near the edge fades; with `sun`, each marker says how far into the night it is.
23
+ *
24
+ * @param places - The places, as `readEarthPlaces` makes them.
25
+ * @param view - The body as drawn (`SurfaceView` from `/places`): the Earth's centre, radius, pole and prime meridian in the scene, the camera, and the projection to CSS pixels.
26
+ * @param look - `beam`, `pin` or `ring`.
27
+ * @param options - The size of each name, the boxes already used, the most names and where the Sun is overhead.
28
+ * @returns The markers and where the names go.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * import { layEarthPlaces } from "@johnmorrisdotca/wakusei-planets/earth-places";
33
+ *
34
+ * const view = { centre: [0, 0, 0] as [number, number, number], radius: 1, pole: [0, 1, 0] as [number, number, number], meridian: [0, 0, 1] as [number, number, number], scale: [1, 1, 1] as [number, number, number], toward: [0, 0, 1] as [number, number, number],
35
+ * project: (p: [number, number, number]) => ({ x: 160 + p[0] * 100, y: 160 - p[1] * 100 }), width: 320, height: 320, radiusPx: 100 };
36
+ * const laid = layEarthPlaces([{ id: "gulf", lon: 0, lat: 0, label: "Null Island", kind: "here" }], view, "beam", { size: () => ({ width: 70, height: 18 }) });
37
+ * console.log(laid.shapes.length, laid.labels.length);
38
+ * ```
39
+ */
40
+ export declare function layEarthPlaces(places: readonly EarthPlace[], view: SurfaceView, look: EarthPlaceLook, options?: EarthPlaceLayoutOptions): EarthPlaceLayout;
@@ -0,0 +1,47 @@
1
+ // "You are here", and the places a reader keeps, on `<wakusei-space>`'s Earth. This entry point is what brings chikyu-earth's layout of places (its `/markers`, an optional peer) to the views: import it for its effect,
2
+ // `import "@johnmorrisdotca/wakusei-planets/earth-places"`, and `<wakusei-space earth-places='[...]'>` draws them. A page that never imports it carries none of chikyu-earth, and the attribute draws nothing.
3
+ import { layoutPlaces, readPlaces } from "@johnmorrisdotca/chikyu-earth/markers";
4
+ import { spotView } from "./place-marks.js";
5
+ import { setEarthPlacesLayout } from "./scene/earth-places.js";
6
+ setEarthPlacesLayout({ read: readPlaces, layout: layoutPlaces });
7
+ export { EARTH_PLACE_LOOKS, EARTH_PLACE_MARKS } from "./scene/earth-places.js";
8
+ /**
9
+ * Read the text of the `earth-places` attribute (a JSON array) as the list the views draw: each place needs a longitude from -180 to 180 and a latitude from -90 to 90, one without an `id` is given its place in the list, a label is
10
+ * cut to 80 letters, a kind that is not `here` is `favourite`, and a colour is kept only when it is a hex colour, `rgb()` or `hsl()` with numbers, or a colour's name. At most 5,000 are kept. chikyu-earth's `readPlaces`.
11
+ *
12
+ * @param value - The attribute's text, or null.
13
+ * @returns The places to draw.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { readEarthPlaces } from "@johnmorrisdotca/wakusei-planets/earth-places";
18
+ *
19
+ * console.log(readEarthPlaces('[{"id":"me","lon":-79.4,"lat":43.7,"kind":"here"},{"lon":500,"lat":0}]'));
20
+ * ```
21
+ */
22
+ export function readEarthPlaces(value) {
23
+ return readPlaces(value);
24
+ }
25
+ /**
26
+ * Where each place's marker and name go on a picture of a body, for a page or a server that draws places itself: chikyu-earth's `layoutPlaces` on the body as a view of it draws it (its axes, the camera and the projection to the screen).
27
+ * A place on the far side is left out and one near the edge fades; with `sun`, each marker says how far into the night it is.
28
+ *
29
+ * @param places - The places, as `readEarthPlaces` makes them.
30
+ * @param view - The body as drawn (`SurfaceView` from `/places`): the Earth's centre, radius, pole and prime meridian in the scene, the camera, and the projection to CSS pixels.
31
+ * @param look - `beam`, `pin` or `ring`.
32
+ * @param options - The size of each name, the boxes already used, the most names and where the Sun is overhead.
33
+ * @returns The markers and where the names go.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * import { layEarthPlaces } from "@johnmorrisdotca/wakusei-planets/earth-places";
38
+ *
39
+ * const view = { centre: [0, 0, 0] as [number, number, number], radius: 1, pole: [0, 1, 0] as [number, number, number], meridian: [0, 0, 1] as [number, number, number], scale: [1, 1, 1] as [number, number, number], toward: [0, 0, 1] as [number, number, number],
40
+ * project: (p: [number, number, number]) => ({ x: 160 + p[0] * 100, y: 160 - p[1] * 100 }), width: 320, height: 320, radiusPx: 100 };
41
+ * const laid = layEarthPlaces([{ id: "gulf", lon: 0, lat: 0, label: "Null Island", kind: "here" }], view, "beam", { size: () => ({ width: 70, height: 18 }) });
42
+ * console.log(laid.shapes.length, laid.labels.length);
43
+ * ```
44
+ */
45
+ export function layEarthPlaces(places, view, look, options = {}) {
46
+ return layoutPlaces(places, spotView(view), look, options);
47
+ }
@@ -30,6 +30,11 @@ export interface OrbiterFacts {
30
30
  en: string;
31
31
  ja: string;
32
32
  };
33
+ /** A short name for a button or a label: the initials the agency uses, or the first word. */
34
+ short: {
35
+ en: string;
36
+ ja: string;
37
+ };
33
38
  /** The body it goes round. */
34
39
  centre: "moon" | "mars";
35
40
  /** The agency or organisation that runs it. */
@@ -75,6 +80,10 @@ export declare const ORBITER_FACTS: {
75
80
  readonly en: "Lunar Reconnaissance Orbiter";
76
81
  readonly ja: "ルナー・リコネサンス・オービター";
77
82
  };
83
+ readonly short: {
84
+ readonly en: "LRO";
85
+ readonly ja: "LRO";
86
+ };
78
87
  readonly centre: "moon";
79
88
  readonly operator: "NASA (Goddard Space Flight Center)";
80
89
  readonly launch: {
@@ -118,6 +127,10 @@ export declare const ORBITER_FACTS: {
118
127
  readonly en: "Chandrayaan-2 orbiter";
119
128
  readonly ja: "チャンドラヤーン2号 オービター";
120
129
  };
130
+ readonly short: {
131
+ readonly en: "Chandrayaan-2";
132
+ readonly ja: "チャンドラヤーン2号";
133
+ };
121
134
  readonly centre: "moon";
122
135
  readonly operator: "ISRO";
123
136
  readonly launch: {
@@ -140,6 +153,10 @@ export declare const ORBITER_FACTS: {
140
153
  readonly en: "Danuri (KPLO)";
141
154
  readonly ja: "ダヌリ (KPLO)";
142
155
  };
156
+ readonly short: {
157
+ readonly en: "Danuri";
158
+ readonly ja: "ダヌリ";
159
+ };
143
160
  readonly centre: "moon";
144
161
  readonly operator: "KARI (Korea Aerospace Research Institute)";
145
162
  readonly launch: {
@@ -180,6 +197,10 @@ export declare const ORBITER_FACTS: {
180
197
  readonly en: "ARTEMIS P1";
181
198
  readonly ja: "ARTEMIS P1";
182
199
  };
200
+ readonly short: {
201
+ readonly en: "ARTEMIS P1";
202
+ readonly ja: "ARTEMIS P1";
203
+ };
183
204
  readonly centre: "moon";
184
205
  readonly operator: "NASA (University of California, Berkeley)";
185
206
  readonly launch: {
@@ -217,6 +238,10 @@ export declare const ORBITER_FACTS: {
217
238
  readonly en: "ARTEMIS P2";
218
239
  readonly ja: "ARTEMIS P2";
219
240
  };
241
+ readonly short: {
242
+ readonly en: "ARTEMIS P2";
243
+ readonly ja: "ARTEMIS P2";
244
+ };
220
245
  readonly centre: "moon";
221
246
  readonly operator: "NASA (University of California, Berkeley)";
222
247
  readonly launch: {
@@ -254,6 +279,10 @@ export declare const ORBITER_FACTS: {
254
279
  readonly en: "CAPSTONE";
255
280
  readonly ja: "キャップストーン";
256
281
  };
282
+ readonly short: {
283
+ readonly en: "CAPSTONE";
284
+ readonly ja: "CAPSTONE";
285
+ };
257
286
  readonly centre: "moon";
258
287
  readonly operator: "NASA (Advanced Space)";
259
288
  readonly launch: {
@@ -281,6 +310,10 @@ export declare const ORBITER_FACTS: {
281
310
  readonly en: "Mars Reconnaissance Orbiter";
282
311
  readonly ja: "マーズ・リコネサンス・オービター";
283
312
  };
313
+ readonly short: {
314
+ readonly en: "MRO";
315
+ readonly ja: "MRO";
316
+ };
284
317
  readonly centre: "mars";
285
318
  readonly operator: "NASA (JPL)";
286
319
  readonly launch: {
@@ -303,6 +336,10 @@ export declare const ORBITER_FACTS: {
303
336
  readonly en: "2001 Mars Odyssey";
304
337
  readonly ja: "2001マーズ・オデッセイ";
305
338
  };
339
+ readonly short: {
340
+ readonly en: "Odyssey";
341
+ readonly ja: "オデッセイ";
342
+ };
306
343
  readonly centre: "mars";
307
344
  readonly operator: "NASA (JPL)";
308
345
  readonly launch: {
@@ -333,6 +370,10 @@ export declare const ORBITER_FACTS: {
333
370
  readonly en: "MAVEN";
334
371
  readonly ja: "メイブン";
335
372
  };
373
+ readonly short: {
374
+ readonly en: "MAVEN";
375
+ readonly ja: "MAVEN";
376
+ };
336
377
  readonly centre: "mars";
337
378
  readonly operator: "NASA (Goddard Space Flight Center)";
338
379
  readonly launch: {
@@ -351,15 +392,15 @@ export declare const ORBITER_FACTS: {
351
392
  readonly short: "NGIMS";
352
393
  }];
353
394
  readonly about: {
354
- readonly en: "The Mars Atmosphere and Volatile Evolution orbiter studied how the upper atmosphere is lost to space from a 150 by 6,200 km orbit; contact was lost in December 2025 and NASA ended the mission in 2026, so its last known orbit is shown as modelled.";
355
- readonly ja: "火星の上層大気がどう宇宙へ失われるかを、150 × 6,200 kmの軌道から調べた探査機。2025年12月に交信が途絶え、2026年にNASAがミッションを終えたので、最後に分かっている軌道をモデルの軌道として示します。";
395
+ readonly en: "The Mars Atmosphere and Volatile Evolution orbiter studied how the upper atmosphere is lost to space from a 150 by 6,200 km orbit; contact was lost in December 2025 and NASA said on 2026-06-03 that the mission had ended, so its last known orbit is shown as modelled.";
396
+ readonly ja: "火星の上層大気がどう宇宙へ失われるかを、150 × 6,200 kmの軌道から調べた探査機。2025年12月に交信が途絶え、2026-06-03にNASAがミッションが終わったと発表したので、最後に分かっている軌道をモデルの軌道として示します。";
356
397
  };
357
398
  readonly status: {
358
399
  readonly state: "ended";
359
400
  readonly since: "2025-12-06";
360
401
  readonly note: {
361
- readonly en: "Horizons' page: no contact since 2025-12-06, with evidence of an unplanned change of velocity on 2025-12-04; its fit reaches 2025-12-04 and its track ends 2026-03-01.";
362
- readonly ja: "Horizonsのページ: 2025-12-06から交信がなく、2025-12-04に予定外の速度変化があった形跡があります。合わせた期間は2025-12-04まで、経路データは2026-03-01で終わります。";
402
+ readonly en: "Horizons' page: no contact since 2025-12-06, with evidence of an unplanned change of velocity on 2025-12-04; its fit reaches 2025-12-04 and its track ends 2026-03-01. NASA's news release of 2026-06-03, \"NASA Says Farewell to MAVEN Mars Mission\", says the mission has ended.";
403
+ readonly ja: "Horizonsのページ: 2025-12-06から交信がなく、2025-12-04に予定外の速度変化があった形跡があります。合わせた期間は2025-12-04まで、経路データは2026-03-01で終わります。NASAは2026-06-03の発表「NASA Says Farewell to MAVEN Mars Mission」で、ミッションが終わったと伝えました。";
363
404
  };
364
405
  };
365
406
  readonly horizonsId: -202;
@@ -369,6 +410,10 @@ export declare const ORBITER_FACTS: {
369
410
  readonly en: "Mars Express";
370
411
  readonly ja: "マーズ・エクスプレス";
371
412
  };
413
+ readonly short: {
414
+ readonly en: "Mars Express";
415
+ readonly ja: "マーズ・エクスプレス";
416
+ };
372
417
  readonly centre: "mars";
373
418
  readonly operator: "ESA";
374
419
  readonly launch: {
@@ -391,6 +436,10 @@ export declare const ORBITER_FACTS: {
391
436
  readonly en: "ExoMars Trace Gas Orbiter";
392
437
  readonly ja: "エクソマーズ・トレース・ガス・オービター";
393
438
  };
439
+ readonly short: {
440
+ readonly en: "TGO";
441
+ readonly ja: "TGO";
442
+ };
394
443
  readonly centre: "mars";
395
444
  readonly operator: "ESA (with Roscosmos)";
396
445
  readonly launch: {
@@ -425,6 +474,10 @@ export declare const ORBITER_FACTS: {
425
474
  readonly en: "Hope (Emirates Mars Mission)";
426
475
  readonly ja: "ホープ (エミレーツ・マーズ・ミッション)";
427
476
  };
477
+ readonly short: {
478
+ readonly en: "Hope";
479
+ readonly ja: "ホープ";
480
+ };
428
481
  readonly centre: "mars";
429
482
  readonly operator: "Mohammed Bin Rashid Space Centre (United Arab Emirates)";
430
483
  readonly launch: {
@@ -456,6 +509,10 @@ export declare const ORBITER_FACTS: {
456
509
  readonly en: "Tianwen-1 orbiter";
457
510
  readonly ja: "天問1号 オービター";
458
511
  };
512
+ readonly short: {
513
+ readonly en: "Tianwen-1";
514
+ readonly ja: "天問1号";
515
+ };
459
516
  readonly centre: "mars";
460
517
  readonly operator: "CNSA";
461
518
  readonly launch: {
@@ -1,5 +1,6 @@
1
1
  // What is known about each orbiter: names, operator, launch, instruments, a line about it in our own words, and the state of its mission. Every fact is typed from the craft's own
2
- // JPL Horizons object page as a plain fact, in our own words, read 2026-11-11 by scripts/make-orbiter-data.py (NOTICE.md names the pages and the agency that supplies each trajectory); a fact the page does not give is left out, never guessed.
2
+ // JPL Horizons object page as a plain fact, in our own words, read 2026-11-11 by scripts/make-orbiter-data.py, and MAVEN's end from NASA's news release of 2026-06-03 (NOTICE.md names the pages
3
+ // and the agency that supplies each trajectory); a fact the page does not give is left out, never guessed.
3
4
  // The Japanese names and lines are ours.
4
5
  /**
5
6
  * The orbiters' facts by id.
@@ -14,6 +15,7 @@
14
15
  export const ORBITER_FACTS = {
15
16
  lro: {
16
17
  name: { en: "Lunar Reconnaissance Orbiter", ja: "ルナー・リコネサンス・オービター" },
18
+ short: { en: "LRO", ja: "LRO" },
17
19
  centre: "moon",
18
20
  operator: "NASA (Goddard Space Flight Center)",
19
21
  launch: { date: "2009-06-18T09:32Z", vehicle: "Atlas V", site: "Cape Canaveral, launch complex 41" },
@@ -32,6 +34,7 @@ export const ORBITER_FACTS = {
32
34
  },
33
35
  "chandrayaan-2": {
34
36
  name: { en: "Chandrayaan-2 orbiter", ja: "チャンドラヤーン2号 オービター" },
37
+ short: { en: "Chandrayaan-2", ja: "チャンドラヤーン2号" },
35
38
  centre: "moon",
36
39
  operator: "ISRO",
37
40
  launch: { date: "2019-07-22T09:13Z", vehicle: "GSLV Mk III", site: "Satish Dhawan Space Centre, Sriharikota" },
@@ -42,6 +45,7 @@ export const ORBITER_FACTS = {
42
45
  },
43
46
  danuri: {
44
47
  name: { en: "Danuri (KPLO)", ja: "ダヌリ (KPLO)" },
48
+ short: { en: "Danuri", ja: "ダヌリ" },
45
49
  centre: "moon",
46
50
  operator: "KARI (Korea Aerospace Research Institute)",
47
51
  launch: { date: "2022-08-04T23:08Z", vehicle: "Falcon 9 Block 5", site: "Cape Canaveral, SLC-40" },
@@ -59,6 +63,7 @@ export const ORBITER_FACTS = {
59
63
  },
60
64
  "artemis-p1": {
61
65
  name: { en: "ARTEMIS P1", ja: "ARTEMIS P1" },
66
+ short: { en: "ARTEMIS P1", ja: "ARTEMIS P1" },
62
67
  centre: "moon",
63
68
  operator: "NASA (University of California, Berkeley)",
64
69
  launch: { date: "2007-02-17T23:01Z", vehicle: "Delta II 7925-10C", site: "Cape Canaveral" },
@@ -75,6 +80,7 @@ export const ORBITER_FACTS = {
75
80
  },
76
81
  "artemis-p2": {
77
82
  name: { en: "ARTEMIS P2", ja: "ARTEMIS P2" },
83
+ short: { en: "ARTEMIS P2", ja: "ARTEMIS P2" },
78
84
  centre: "moon",
79
85
  operator: "NASA (University of California, Berkeley)",
80
86
  launch: { date: "2007-02-17T23:01Z", vehicle: "Delta II 7925-10C", site: "Cape Canaveral" },
@@ -91,6 +97,7 @@ export const ORBITER_FACTS = {
91
97
  },
92
98
  capstone: {
93
99
  name: { en: "CAPSTONE", ja: "キャップストーン" },
100
+ short: { en: "CAPSTONE", ja: "CAPSTONE" },
94
101
  centre: "moon",
95
102
  operator: "NASA (Advanced Space)",
96
103
  launch: { date: "2022-06-28T09:55:52Z", vehicle: "Electron (Rocket Lab)", site: "Mahia Peninsula, New Zealand" },
@@ -101,6 +108,7 @@ export const ORBITER_FACTS = {
101
108
  },
102
109
  mro: {
103
110
  name: { en: "Mars Reconnaissance Orbiter", ja: "マーズ・リコネサンス・オービター" },
111
+ short: { en: "MRO", ja: "MRO" },
104
112
  centre: "mars",
105
113
  operator: "NASA (JPL)",
106
114
  launch: { date: "2005-08-12T11:43Z", vehicle: "Atlas V", site: "Cape Canaveral" },
@@ -111,6 +119,7 @@ export const ORBITER_FACTS = {
111
119
  },
112
120
  odyssey: {
113
121
  name: { en: "2001 Mars Odyssey", ja: "2001マーズ・オデッセイ" },
122
+ short: { en: "Odyssey", ja: "オデッセイ" },
114
123
  centre: "mars",
115
124
  operator: "NASA (JPL)",
116
125
  launch: { date: "2001-04-07T15:02Z", vehicle: "Delta II 7925" },
@@ -125,6 +134,7 @@ export const ORBITER_FACTS = {
125
134
  },
126
135
  maven: {
127
136
  name: { en: "MAVEN", ja: "メイブン" },
137
+ short: { en: "MAVEN", ja: "MAVEN" },
128
138
  centre: "mars",
129
139
  operator: "NASA (Goddard Space Flight Center)",
130
140
  launch: { date: "2013-11-18T18:28Z", vehicle: "Atlas V 401", site: "Cape Canaveral, SLC-41" },
@@ -133,12 +143,13 @@ export const ORBITER_FACTS = {
133
143
  { name: "Imaging Ultraviolet Spectrometer", short: "IUVS" },
134
144
  { name: "Neutral Gas and Ion Mass Spectrometer", short: "NGIMS" },
135
145
  ],
136
- about: { en: "The Mars Atmosphere and Volatile Evolution orbiter studied how the upper atmosphere is lost to space from a 150 by 6,200 km orbit; contact was lost in December 2025 and NASA ended the mission in 2026, so its last known orbit is shown as modelled.", ja: "火星の上層大気がどう宇宙へ失われるかを、150 × 6,200 kmの軌道から調べた探査機。2025年12月に交信が途絶え、2026年にNASAがミッションを終えたので、最後に分かっている軌道をモデルの軌道として示します。" },
137
- status: { state: "ended", since: "2025-12-06", note: { en: "Horizons' page: no contact since 2025-12-06, with evidence of an unplanned change of velocity on 2025-12-04; its fit reaches 2025-12-04 and its track ends 2026-03-01.", ja: "Horizonsのページ: 2025-12-06から交信がなく、2025-12-04に予定外の速度変化があった形跡があります。合わせた期間は2025-12-04まで、経路データは2026-03-01で終わります。" } },
146
+ about: { en: "The Mars Atmosphere and Volatile Evolution orbiter studied how the upper atmosphere is lost to space from a 150 by 6,200 km orbit; contact was lost in December 2025 and NASA said on 2026-06-03 that the mission had ended, so its last known orbit is shown as modelled.", ja: "火星の上層大気がどう宇宙へ失われるかを、150 × 6,200 kmの軌道から調べた探査機。2025年12月に交信が途絶え、2026-06-03にNASAがミッションが終わったと発表したので、最後に分かっている軌道をモデルの軌道として示します。" },
147
+ status: { state: "ended", since: "2025-12-06", note: { en: "Horizons' page: no contact since 2025-12-06, with evidence of an unplanned change of velocity on 2025-12-04; its fit reaches 2025-12-04 and its track ends 2026-03-01. NASA's news release of 2026-06-03, \"NASA Says Farewell to MAVEN Mars Mission\", says the mission has ended.", ja: "Horizonsのページ: 2025-12-06から交信がなく、2025-12-04に予定外の速度変化があった形跡があります。合わせた期間は2025-12-04まで、経路データは2026-03-01で終わります。NASAは2026-06-03の発表「NASA Says Farewell to MAVEN Mars Mission」で、ミッションが終わったと伝えました。" } },
138
148
  horizonsId: -202,
139
149
  },
140
150
  "mars-express": {
141
151
  name: { en: "Mars Express", ja: "マーズ・エクスプレス" },
152
+ short: { en: "Mars Express", ja: "マーズ・エクスプレス" },
142
153
  centre: "mars",
143
154
  operator: "ESA",
144
155
  launch: { date: "2003-06-02", vehicle: "Soyuz-Fregat", site: "Baikonur" },
@@ -149,6 +160,7 @@ export const ORBITER_FACTS = {
149
160
  },
150
161
  tgo: {
151
162
  name: { en: "ExoMars Trace Gas Orbiter", ja: "エクソマーズ・トレース・ガス・オービター" },
163
+ short: { en: "TGO", ja: "TGO" },
152
164
  centre: "mars",
153
165
  operator: "ESA (with Roscosmos)",
154
166
  launch: { date: "2016-03-14T09:31Z", vehicle: "Proton", site: "Baikonur" },
@@ -164,6 +176,7 @@ export const ORBITER_FACTS = {
164
176
  },
165
177
  hope: {
166
178
  name: { en: "Hope (Emirates Mars Mission)", ja: "ホープ (エミレーツ・マーズ・ミッション)" },
179
+ short: { en: "Hope", ja: "ホープ" },
167
180
  centre: "mars",
168
181
  operator: "Mohammed Bin Rashid Space Centre (United Arab Emirates)",
169
182
  launch: { date: "2020-07-19T21:58:14Z", vehicle: "H-IIA 202", site: "Tanegashima, Japan" },
@@ -178,6 +191,7 @@ export const ORBITER_FACTS = {
178
191
  },
179
192
  "tianwen-1": {
180
193
  name: { en: "Tianwen-1 orbiter", ja: "天問1号 オービター" },
194
+ short: { en: "Tianwen-1", ja: "天問1号" },
181
195
  centre: "mars",
182
196
  operator: "CNSA",
183
197
  launch: { date: "2020-07-23T04:41Z", vehicle: "Long March 5", site: "Wenchang, Hainan" },