@johnmorrisdotca/chikyu-earth 0.32.0 → 0.33.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/NOTICE.md +10 -1
  3. package/README.md +13 -2
  4. package/dist/catalogue/fleets.d.ts +70 -0
  5. package/dist/catalogue/fleets.js +66 -0
  6. package/dist/catalogue/index.d.ts +5 -0
  7. package/dist/catalogue/index.js +7 -0
  8. package/dist/catalogue/kinds.d.ts +143 -0
  9. package/dist/catalogue/kinds.js +121 -0
  10. package/dist/catalogue/omm.d.ts +44 -0
  11. package/dist/catalogue/omm.js +92 -0
  12. package/dist/catalogue/orbit.d.ts +95 -0
  13. package/dist/catalogue/orbit.js +91 -0
  14. package/dist/catalogue/pack.d.ts +193 -0
  15. package/dist/catalogue/pack.js +327 -0
  16. package/dist/data/meteor-iau.d.ts +79 -0
  17. package/dist/data/meteor-iau.js +77 -0
  18. package/dist/data/meteor-showers.js +24 -20
  19. package/dist/data-door.d.ts +2 -0
  20. package/dist/data-door.js +4 -2
  21. package/dist/door/index.d.ts +1 -0
  22. package/dist/door/index.js +1 -0
  23. package/dist/door/packed.d.ts +64 -0
  24. package/dist/door/packed.js +91 -0
  25. package/dist/meteors/index.d.ts +2 -0
  26. package/dist/meteors/index.js +2 -0
  27. package/dist/meteors/parents.d.ts +45 -0
  28. package/dist/meteors/parents.js +67 -0
  29. package/dist/realistic/body-label.d.ts +13 -0
  30. package/dist/realistic/body-label.js +16 -0
  31. package/dist/realistic/earth.d.ts +3 -0
  32. package/dist/realistic/earth.js +21 -0
  33. package/dist/realistic/element.d.ts +18 -0
  34. package/dist/realistic/element.js +35 -3
  35. package/dist/realistic/index.d.ts +1 -1
  36. package/dist/realistic/index.js +1 -1
  37. package/dist/satellites/source.d.ts +4 -0
  38. package/dist/satellites/source.js +2 -2
  39. package/dist/sky/host.d.ts +55 -0
  40. package/dist/sky/host.js +382 -0
  41. package/dist/space/element.d.ts +18 -0
  42. package/dist/space/element.js +35 -3
  43. package/dist/space/scene.d.ts +3 -0
  44. package/dist/space/scene.js +26 -0
  45. package/package.json +11 -1
@@ -0,0 +1,327 @@
1
+ // A packed file of catalogue records: the format a refresh script writes and a page reads (`@johnmorrisdotca/chikyu-earth/catalogue`). A column of each number in the element sets, then the names: about 95 bytes an object, so
2
+ // 32,000 objects are 3 MB and about 1.2 MB gzipped, and 200,000 (the most the data door holds) are about 19 MB. Catalogue numbers are 32-bit, so six-digit and nine-digit numbers are held. Pure: no DOM, no three.js and no Node;
3
+ // the gzip step uses the web's streams, which Node 18 and every current browser have.
4
+ import { MAX_RECORDS } from "../data-door.js";
5
+ /**
6
+ * The most records one packed file holds: the data door's own limit, 200,000.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { MAX_PACKED } from "@johnmorrisdotca/chikyu-earth/catalogue";
11
+ *
12
+ * console.log(MAX_PACKED);
13
+ * ```
14
+ */
15
+ export const MAX_PACKED = MAX_RECORDS;
16
+ /**
17
+ * The most bytes a packed file may unpack to (64 MB): a file that claims more is refused before it is read.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * import { MAX_PACKED_BYTES } from "@johnmorrisdotca/chikyu-earth/catalogue";
22
+ *
23
+ * console.log(MAX_PACKED_BYTES / 1_048_576);
24
+ * ```
25
+ */
26
+ export const MAX_PACKED_BYTES = 64 * 1_048_576;
27
+ /**
28
+ * A packed file that cannot be read: it is not a packed file, it is cut short, it holds more than `MAX_PACKED` records, or it unpacks to more than `MAX_PACKED_BYTES`.
29
+ *
30
+ * @param message - What is wrong with the file, in a sentence.
31
+ * @example
32
+ * ```ts
33
+ * import { PackError, unpackCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
34
+ *
35
+ * try {
36
+ * unpackCatalogue(new Uint8Array(4));
37
+ * } catch (error) {
38
+ * console.log(error instanceof PackError);
39
+ * }
40
+ * ```
41
+ */
42
+ export class PackError extends Error {
43
+ constructor(message) {
44
+ super(message);
45
+ this.name = "PackError";
46
+ }
47
+ }
48
+ const MAGIC = [0x43, 0x50, 0x4b, 0x31]; // "CPK1"
49
+ const HEADER_BYTES = 16;
50
+ const KINDS = ["PAY", "RB", "DEB", "UNK"];
51
+ const SIZES = [undefined, "S", "M", "L"];
52
+ const NO_TEXT = "";
53
+ const pad8 = (n) => (n + 7) & ~7;
54
+ const clean = (text) => (text ?? NO_TEXT).replace(/[\t\r\n]+/g, " ").trim();
55
+ /** The microseconds since 1970 of an element set's epoch (a time in UTC, with or without a `Z` and with any number of decimals), or NaN. */
56
+ function epochMicros(epoch) {
57
+ const match = /^(\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d)(?:\.(\d+))?(?:Z|[+-]00:?00)?$/.exec(epoch.trim());
58
+ if (!match) {
59
+ const ms = Date.parse(/[zZ]|[+-]\d\d:?\d\d$/.test(epoch) ? epoch : `${epoch}Z`);
60
+ return ms * 1000;
61
+ }
62
+ return Date.parse(`${match[1]}Z`) * 1000 + Math.round(Number(`0.${(match[2] ?? "0").slice(0, 6).padEnd(6, "0")}`) * 1e6);
63
+ }
64
+ /** An epoch from microseconds since 1970: `2026-11-08T04:12:35.430048`, the way Space-Track writes it. */
65
+ function epochText(micros) {
66
+ const whole = Math.floor(micros / 1_000_000);
67
+ const fraction = Math.round(micros - whole * 1_000_000);
68
+ return `${new Date(whole * 1000).toISOString().slice(0, 19)}.${String(fraction).padStart(6, "0")}`;
69
+ }
70
+ const encoder = new TextEncoder();
71
+ const decoder = new TextDecoder();
72
+ /**
73
+ * Pack catalogue records into one file: a small header (the format, how many records, and `meta`, a few words of text such as where the data is from and when it was retrieved), a column for each number and, last, the names.
74
+ * The epoch is kept to the microsecond and the mean motion in full; the angles, the eccentricity and the drag terms are kept as 32-bit floats (an angle to about 0.00003 degrees, well inside what the elements are good to).
75
+ * A record whose numbers are not finite, or whose catalogue number is not a whole number from 0 up to 4,294,967,295, is refused with a `PackError`.
76
+ *
77
+ * @param records - The records, in the order the file keeps them (at most `MAX_PACKED`).
78
+ * @param meta - Words to keep with the file (read back as `meta`).
79
+ * @returns The bytes. Gzip them with `gzipBytes` for a file a site hosts.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * import { packCatalogue, unpackCatalogue, type CatalogueRecord } from "@johnmorrisdotca/chikyu-earth/catalogue";
84
+ *
85
+ * const record: CatalogueRecord = {
86
+ * set: { OBJECT_NAME: "MADE-UP 1", OBJECT_ID: "2026-001A", EPOCH: "2026-11-08T04:12:35.430048", MEAN_MOTION: 15.2, ECCENTRICITY: 0.0002, INCLINATION: 53, RA_OF_ASC_NODE: 10, ARG_OF_PERICENTER: 90, MEAN_ANOMALY: 20, NORAD_CAT_ID: 1_000_001, BSTAR: 0.0001, MEAN_MOTION_DOT: 0.00001, MEAN_MOTION_DDOT: 0 },
87
+ * kind: "DEB",
88
+ * };
89
+ * const bytes = packCatalogue([record], { group: "debris" });
90
+ * const back = unpackCatalogue(bytes);
91
+ * console.log(bytes.length, back.count, back.setAt(0).NORAD_CAT_ID, back.meta["group"]);
92
+ * ```
93
+ */
94
+ export function packCatalogue(records, meta = {}) {
95
+ const count = records.length;
96
+ if (count > MAX_PACKED)
97
+ throw new PackError(`${count} records is over the ${MAX_PACKED} one file holds`);
98
+ const metaBytes = encoder.encode(JSON.stringify(meta));
99
+ const lines = [];
100
+ const epoch = new Float64Array(count);
101
+ const motion = new Float64Array(count);
102
+ const norad = new Uint32Array(count);
103
+ const floats = Array.from({ length: 8 }, () => new Float32Array(count));
104
+ const kind = new Uint8Array(count);
105
+ const size = new Uint8Array(count);
106
+ records.forEach((record, i) => {
107
+ const set = record.set;
108
+ const micros = epochMicros(set.EPOCH);
109
+ const numbers = [set.ECCENTRICITY, set.INCLINATION, set.RA_OF_ASC_NODE, set.ARG_OF_PERICENTER, set.MEAN_ANOMALY, set.BSTAR, set.MEAN_MOTION_DOT, set.MEAN_MOTION_DDOT];
110
+ if (!Number.isFinite(micros) || !Number.isFinite(set.MEAN_MOTION) || numbers.some((n) => !Number.isFinite(n)))
111
+ throw new PackError(`record ${i} (${set.NORAD_CAT_ID}) has a number that is not finite`);
112
+ if (!Number.isInteger(set.NORAD_CAT_ID) || set.NORAD_CAT_ID < 0 || set.NORAD_CAT_ID > 0xffff_ffff)
113
+ throw new PackError(`record ${i} has the catalogue number ${set.NORAD_CAT_ID}`);
114
+ epoch[i] = micros;
115
+ motion[i] = set.MEAN_MOTION;
116
+ norad[i] = set.NORAD_CAT_ID;
117
+ numbers.forEach((n, column) => (floats[column][i] = n));
118
+ kind[i] = Math.max(0, KINDS.indexOf(record.kind));
119
+ size[i] = Math.max(0, SIZES.indexOf(record.size));
120
+ lines.push([clean(set.OBJECT_NAME), clean(set.OBJECT_ID), clean(record.owner).slice(0, 8), clean(record.launch).slice(0, 10)].join("\t"));
121
+ });
122
+ const text = encoder.encode(lines.join("\n"));
123
+ const columns = [epoch, motion, norad, ...floats, kind, size];
124
+ let bytes = HEADER_BYTES + pad8(metaBytes.length);
125
+ for (const column of columns)
126
+ bytes += pad8(column.byteLength);
127
+ bytes += text.length;
128
+ const out = new Uint8Array(bytes);
129
+ out.set(MAGIC, 0);
130
+ const head = new DataView(out.buffer);
131
+ head.setUint32(4, count, true);
132
+ head.setUint32(8, metaBytes.length, true);
133
+ head.setUint32(12, text.length, true);
134
+ out.set(metaBytes, HEADER_BYTES);
135
+ let at = HEADER_BYTES + pad8(metaBytes.length);
136
+ for (const column of columns) {
137
+ out.set(new Uint8Array(column.buffer, column.byteOffset, column.byteLength), at);
138
+ at += pad8(column.byteLength);
139
+ }
140
+ out.set(text, at);
141
+ return out;
142
+ }
143
+ /**
144
+ * Read a packed file (not gzipped: see `unpackAny`). The header is checked against the length, so a cut or wrong file is a `PackError` and never a wrong number; a file of more than `MAX_PACKED` records is refused.
145
+ *
146
+ * @param bytes - What `packCatalogue` made.
147
+ * @returns The records, by column.
148
+ *
149
+ * @example
150
+ * ```ts
151
+ * import { packCatalogue, unpackCatalogue } from "@johnmorrisdotca/chikyu-earth/catalogue";
152
+ *
153
+ * const set = { OBJECT_NAME: "MADE-UP 2", EPOCH: "2026-11-08T00:00:00", MEAN_MOTION: 14.1, ECCENTRICITY: 0.001, INCLINATION: 98, RA_OF_ASC_NODE: 1, ARG_OF_PERICENTER: 2, MEAN_ANOMALY: 3, NORAD_CAT_ID: 123_456, BSTAR: 0, MEAN_MOTION_DOT: 0, MEAN_MOTION_DDOT: 0 };
154
+ * const file = unpackCatalogue(packCatalogue([{ set, kind: "RB", size: "M" }]));
155
+ * console.log(file.nameAt(0), file.kindAt(0), file.norad[0], file.recordAt(0).size);
156
+ * ```
157
+ */
158
+ export function unpackCatalogue(bytes) {
159
+ if (bytes.length < HEADER_BYTES || MAGIC.some((byte, i) => bytes[i] !== byte))
160
+ throw new PackError("not a packed catalogue file");
161
+ const head = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
162
+ const count = head.getUint32(4, true);
163
+ const metaLength = head.getUint32(8, true);
164
+ const textLength = head.getUint32(12, true);
165
+ if (count > MAX_PACKED)
166
+ throw new PackError(`${count} records is over the ${MAX_PACKED} one file holds`);
167
+ const sizes = [8, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1].map((width) => pad8(width * count));
168
+ const expected = HEADER_BYTES + pad8(metaLength) + sizes.reduce((a, b) => a + b, 0) + textLength;
169
+ if (expected !== bytes.length)
170
+ throw new PackError(`the file is ${bytes.length} bytes and its header says ${expected}`);
171
+ // typed arrays need aligned starts: copy once when the bytes were cut from the middle of a bigger buffer
172
+ const aligned = bytes.byteOffset % 8 === 0 ? bytes : bytes.slice();
173
+ const buffer = aligned.buffer;
174
+ const base = aligned.byteOffset;
175
+ let metaValue = {};
176
+ try {
177
+ const parsed = JSON.parse(decoder.decode(aligned.subarray(HEADER_BYTES, HEADER_BYTES + metaLength)));
178
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed))
179
+ metaValue = Object.fromEntries(Object.entries(parsed).map(([key, value]) => [key, String(value)]));
180
+ }
181
+ catch {
182
+ throw new PackError("the file's own notes are not readable");
183
+ }
184
+ let at = base + HEADER_BYTES + pad8(metaLength);
185
+ const take = (make, width) => {
186
+ const column = new make(buffer, at, count);
187
+ at += pad8(width * count);
188
+ return column;
189
+ };
190
+ const epoch = take(Float64Array, 8);
191
+ const meanMotion = take(Float64Array, 8);
192
+ const norad = take(Uint32Array, 4);
193
+ const eccentricity = take(Float32Array, 4);
194
+ const inclination = take(Float32Array, 4);
195
+ const raan = take(Float32Array, 4);
196
+ const argPerigee = take(Float32Array, 4);
197
+ const meanAnomaly = take(Float32Array, 4);
198
+ const bstar = take(Float32Array, 4);
199
+ const ndot = take(Float32Array, 4);
200
+ const nddot = take(Float32Array, 4);
201
+ const kind = take(Uint8Array, 1);
202
+ const size = take(Uint8Array, 1);
203
+ let lines;
204
+ const text = () => (lines ??= (textLength === 0 && count === 0 ? [] : decoder.decode(new Uint8Array(buffer, at, textLength)).split("\n")));
205
+ const part = (i, index) => text()[i]?.split("\t")[index] ?? "";
206
+ const setAt = (i) => {
207
+ const id = part(i, 1);
208
+ const set = {
209
+ OBJECT_NAME: part(i, 0),
210
+ EPOCH: epochText(epoch[i]),
211
+ MEAN_MOTION: meanMotion[i],
212
+ ECCENTRICITY: eccentricity[i],
213
+ INCLINATION: inclination[i],
214
+ RA_OF_ASC_NODE: raan[i],
215
+ ARG_OF_PERICENTER: argPerigee[i],
216
+ MEAN_ANOMALY: meanAnomaly[i],
217
+ NORAD_CAT_ID: norad[i],
218
+ BSTAR: bstar[i],
219
+ MEAN_MOTION_DOT: ndot[i],
220
+ MEAN_MOTION_DDOT: nddot[i],
221
+ };
222
+ if (id)
223
+ set.OBJECT_ID = id;
224
+ return set;
225
+ };
226
+ const kindAt = (i) => KINDS[kind[i]] ?? "UNK";
227
+ const recordAt = (i) => {
228
+ const record = { set: setAt(i), kind: kindAt(i) };
229
+ const owner = part(i, 2);
230
+ const launch = part(i, 3);
231
+ const radar = SIZES[size[i]];
232
+ if (owner)
233
+ record.owner = owner;
234
+ if (launch)
235
+ record.launch = launch;
236
+ if (radar)
237
+ record.size = radar;
238
+ return record;
239
+ };
240
+ return {
241
+ meta: metaValue,
242
+ count,
243
+ norad,
244
+ meanMotion,
245
+ eccentricity,
246
+ inclination,
247
+ raan,
248
+ argPerigee,
249
+ meanAnomaly,
250
+ kind,
251
+ epochMs: (i) => epoch[i] / 1000,
252
+ kindAt,
253
+ nameAt: (i) => part(i, 0),
254
+ setAt,
255
+ recordAt,
256
+ sets: () => Array.from({ length: count }, (_, i) => setAt(i)),
257
+ records: () => Array.from({ length: count }, (_, i) => recordAt(i)),
258
+ };
259
+ }
260
+ const isGzip = (bytes) => bytes.length > 2 && bytes[0] === 0x1f && bytes[1] === 0x8b;
261
+ async function pump(bytes, stream, limit) {
262
+ const writer = stream.writable.getWriter();
263
+ const done = writer.write(bytes).then(() => writer.close());
264
+ const parts = [];
265
+ let total = 0;
266
+ const reader = stream.readable.getReader();
267
+ try {
268
+ for (;;) {
269
+ const { value, done: finished } = await reader.read();
270
+ if (finished)
271
+ break;
272
+ total += value.length;
273
+ if (total > limit)
274
+ throw new PackError(`the file unpacks to more than ${limit} bytes`);
275
+ parts.push(value);
276
+ }
277
+ await done;
278
+ }
279
+ catch (error) {
280
+ await reader.cancel().catch(() => undefined);
281
+ await done.catch(() => undefined);
282
+ throw error instanceof PackError ? error : new PackError("the file is not valid gzip");
283
+ }
284
+ const out = new Uint8Array(total);
285
+ let at = 0;
286
+ for (const part of parts) {
287
+ out.set(part, at);
288
+ at += part.length;
289
+ }
290
+ return out;
291
+ }
292
+ /**
293
+ * Gzip bytes, with the web's own `CompressionStream`: the form a site hosts a packed file in.
294
+ *
295
+ * @param bytes - What `packCatalogue` made.
296
+ * @returns The gzipped bytes.
297
+ *
298
+ * @example
299
+ * ```ts
300
+ * import { gzipBytes } from "@johnmorrisdotca/chikyu-earth/catalogue";
301
+ *
302
+ * const small = await gzipBytes(new Uint8Array(10_000));
303
+ * console.log(small.length < 100, small[0], small[1]);
304
+ * ```
305
+ */
306
+ export function gzipBytes(bytes) {
307
+ return pump(bytes, new CompressionStream("gzip"), Number.MAX_SAFE_INTEGER);
308
+ }
309
+ /**
310
+ * Read a packed file whether or not it is gzipped (gzip is found from its first two bytes). The unpacked size is capped at `MAX_PACKED_BYTES`, so a small file that unpacks to a huge one is refused.
311
+ *
312
+ * @param bytes - A packed file, or a gzipped one.
313
+ * @returns The records, by column.
314
+ *
315
+ * @example
316
+ * ```ts
317
+ * import { gzipBytes, packCatalogue, unpackAny } from "@johnmorrisdotca/chikyu-earth/catalogue";
318
+ *
319
+ * const file = await unpackAny(await gzipBytes(packCatalogue([], { group: "empty" })));
320
+ * console.log(file.count, file.meta["group"]);
321
+ * ```
322
+ */
323
+ export async function unpackAny(bytes) {
324
+ if (bytes.length > MAX_PACKED_BYTES && !isGzip(bytes))
325
+ throw new PackError(`the file is over ${MAX_PACKED_BYTES} bytes`);
326
+ return unpackCatalogue(isGzip(bytes) ? await pump(bytes, new DecompressionStream("gzip"), MAX_PACKED_BYTES) : bytes);
327
+ }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * The comet or asteroid a shower's meteors come from, as the IAU Meteor Data Center names it.
3
+ *
4
+ * @example
5
+ * ```ts
6
+ * import { METEOR_LINKS } from "@johnmorrisdotca/chikyu-earth/meteors";
7
+ *
8
+ * const parent = METEOR_LINKS.find((link) => link.code === "PER")?.parent;
9
+ * console.log(parent?.designation, parent?.kind);
10
+ * ```
11
+ */
12
+ export interface ParentBody {
13
+ /** The designation as the MDC writes it: `109P/Swift-Tuttle`, `C/1861 G1 (Thatcher)`, `(3200) Phaethon`, `2003 EH1`. */
14
+ designation: string;
15
+ kind: "comet" | "asteroid";
16
+ }
17
+ /**
18
+ * One shower's link to the IAU Meteor Data Center's lists, with where each figure of its row comes from.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * import { METEOR_LINKS, type ShowerLink } from "@johnmorrisdotca/chikyu-earth/meteors";
23
+ *
24
+ * const geminids: ShowerLink | undefined = METEOR_LINKS.find((link) => link.code === "GEM");
25
+ * console.log(geminids?.iauName, geminids?.status, geminids?.parent?.designation, geminids?.checked?.meteors);
26
+ * ```
27
+ */
28
+ export interface ShowerLink {
29
+ /** The IAU's three-letter code, the same as the shower's `code`. */
30
+ code: string;
31
+ /** The IAU's number (IAUNo), the same as the shower's `iau`. */
32
+ iau: number;
33
+ /** The MDC's name for the shower, as it writes it (Greek letters spelled out). */
34
+ iauName: string;
35
+ /** `established` when the MDC's list of established showers has it; `working` when it is only on the working list. */
36
+ status: "established" | "working";
37
+ /** The parent body the MDC's origin column names for it, or `null` when the MDC names none (or names two that disagree). */
38
+ parent: ParentBody | null;
39
+ /** The MDC solution (its AdNo) the radiant and speed agree with, the biggest that does, and how many meteors it rests on; `null` when no solution of 100 meteors or more lies within 3 degrees of the maximum, or when none agrees. */
40
+ checked: {
41
+ adNo: number;
42
+ meteors: number;
43
+ } | null;
44
+ /** Where the row's radiant and speed come from: `imo` is the International Meteor Organization's table, kept because it agrees; `mdc` is the MDC's solution, because the table's did not. */
45
+ from: {
46
+ radiant: "imo" | "mdc";
47
+ speed: "imo" | "mdc";
48
+ };
49
+ }
50
+ /**
51
+ * Where the IAU Meteor Data Center's lists are, when they were read, and how it asks to be cited.
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * import { IAU_MDC } from "@johnmorrisdotca/chikyu-earth/meteors";
56
+ *
57
+ * console.log(IAU_MDC.name, IAU_MDC.read, IAU_MDC.cite.length);
58
+ * ```
59
+ */
60
+ export declare const IAU_MDC: {
61
+ readonly name: "IAU Meteor Data Center";
62
+ readonly url: "http://www.ta3.sk/IAUC22DB/MDC2022/";
63
+ readonly files: readonly ["http://www.ta3.sk/IAUC22DB/MDC2022/Etc/streamfulldata2026.txt", "http://www.ta3.sk/IAUC22DB/MDC2022/Etc/streamestablisheddata2026.txt"];
64
+ readonly read: "2026-11-11";
65
+ readonly updated: "2026-11-10T20:00Z";
66
+ /** What the MDC's data files ask to be cited. The MDC states no licence or reuse terms. */
67
+ readonly cite: readonly ["Jenniskens, P., Jopek, T.J., Janches, D., Hajdukova, M., Kokhirova, G.I., Rudawska, R. (2020). Planetary and Space Science 182, 104821.", "Jopek, T.J., Kanuchova, Z. (2017). Planetary and Space Science 143, 3-6."];
68
+ };
69
+ /**
70
+ * Every shower of the table with its link to the IAU Meteor Data Center, in the table's order.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * import { METEOR_LINKS } from "@johnmorrisdotca/chikyu-earth/meteors";
75
+ *
76
+ * console.log(METEOR_LINKS.length, METEOR_LINKS.filter((link) => link.status === "established").length);
77
+ * ```
78
+ */
79
+ export declare const METEOR_LINKS: readonly ShowerLink[];
@@ -0,0 +1,77 @@
1
+ // How each shower of the table stands against the IAU Meteor Data Center's lists (http://www.ta3.sk/IAUC22DB/MDC2022/, the list of all showers and the list of established showers, last update 2026-11-10 20:00 UTC, read
2
+ // 2026-11-11): its IAU name, whether the MDC lists it as established or only on its working list, its parent body as the MDC's origin column names it, and which MDC solution its radiant and speed were checked against.
3
+ // The MDC has one row for each solution of a shower, from every paper that gave one; it lists no maximum date and no zenithal hourly rate, so those two stay the International Meteor Organization's (see meteor-showers.ts).
4
+ // The rule used: a solution counts when it has a radiant, a speed and a mean solar longitude, is of 100 meteors or more, and its longitude is within 3 degrees of the shower's maximum. The table's radiant (moved by the
5
+ // solution's own daily motion to the longitude of the maximum) and speed stand when they are within 2 degrees and 2 km/s of such a solution (`checked` is the biggest that agrees); when none agrees the figures were
6
+ // replaced by the biggest solution's, rounded to a whole degree and km/s (`from` says "mdc" for each). Showers with no such solution (`checked: null`) keep the IMO's figures. No imports: this file is data only.
7
+ /**
8
+ * Where the IAU Meteor Data Center's lists are, when they were read, and how it asks to be cited.
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * import { IAU_MDC } from "@johnmorrisdotca/chikyu-earth/meteors";
13
+ *
14
+ * console.log(IAU_MDC.name, IAU_MDC.read, IAU_MDC.cite.length);
15
+ * ```
16
+ */
17
+ export const IAU_MDC = {
18
+ name: "IAU Meteor Data Center",
19
+ url: "http://www.ta3.sk/IAUC22DB/MDC2022/",
20
+ files: ["http://www.ta3.sk/IAUC22DB/MDC2022/Etc/streamfulldata2026.txt", "http://www.ta3.sk/IAUC22DB/MDC2022/Etc/streamestablisheddata2026.txt"],
21
+ read: "2026-11-11",
22
+ updated: "2026-11-10T20:00Z",
23
+ /** What the MDC's data files ask to be cited. The MDC states no licence or reuse terms. */
24
+ cite: [
25
+ "Jenniskens, P., Jopek, T.J., Janches, D., Hajdukova, M., Kokhirova, G.I., Rudawska, R. (2020). Planetary and Space Science 182, 104821.",
26
+ "Jopek, T.J., Kanuchova, Z. (2017). Planetary and Space Science 143, 3-6.",
27
+ ],
28
+ };
29
+ /**
30
+ * Every shower of the table with its link to the IAU Meteor Data Center, in the table's order.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * import { METEOR_LINKS } from "@johnmorrisdotca/chikyu-earth/meteors";
35
+ *
36
+ * console.log(METEOR_LINKS.length, METEOR_LINKS.filter((link) => link.status === "established").length);
37
+ * ```
38
+ */
39
+ export const METEOR_LINKS = [
40
+ { code: "QUA", iau: 10, iauName: "Quadrantids", status: "established", parent: { designation: "2003 EH1", kind: "asteroid" }, checked: { adNo: 8, meteors: 13594 }, from: { radiant: "imo", speed: "imo" } },
41
+ { code: "GUM", iau: 404, iauName: "gamma-Ursae Minorids", status: "established", parent: null, checked: { adNo: 0, meteors: 694 }, from: { radiant: "imo", speed: "imo" } },
42
+ { code: "ACE", iau: 102, iauName: "alpha-Centaurids", status: "working", parent: null, checked: null, from: { radiant: "imo", speed: "imo" } },
43
+ { code: "LYR", iau: 6, iauName: "April Lyrids", status: "established", parent: { designation: "C/1861 G1 (Thatcher)", kind: "comet" }, checked: { adNo: 10, meteors: 9980 }, from: { radiant: "imo", speed: "mdc" } },
44
+ { code: "PPU", iau: 137, iauName: "pi-Puppids", status: "established", parent: { designation: "26P/Grigg-Skjellerup", kind: "comet" }, checked: null, from: { radiant: "imo", speed: "imo" } },
45
+ { code: "ETA", iau: 31, iauName: "eta-Aquariids", status: "established", parent: { designation: "1P/Halley", kind: "comet" }, checked: { adNo: 11, meteors: 46032 }, from: { radiant: "imo", speed: "imo" } },
46
+ { code: "ELY", iau: 145, iauName: "eta-Lyrids", status: "established", parent: { designation: "C/1983 H1 (IRAS-Araki-Alcock)", kind: "comet" }, checked: { adNo: 7, meteors: 990 }, from: { radiant: "imo", speed: "imo" } },
47
+ { code: "ARI", iau: 171, iauName: "Daytime Arietids", status: "established", parent: { designation: "P/1999 J6 (SOHO)", kind: "comet" }, checked: { adNo: 2, meteors: 2142 }, from: { radiant: "imo", speed: "imo" } },
48
+ { code: "JBO", iau: 170, iauName: "June Bootids", status: "established", parent: { designation: "7P/Pons-Winnecke", kind: "comet" }, checked: null, from: { radiant: "imo", speed: "imo" } },
49
+ { code: "JPE", iau: 175, iauName: "July Pegasids", status: "established", parent: { designation: "C/1979 Y1 (Bradfield)", kind: "comet" }, checked: { adNo: 6, meteors: 104 }, from: { radiant: "imo", speed: "imo" } },
50
+ { code: "GDR", iau: 184, iauName: "July gamma-Draconids", status: "established", parent: { designation: "C/1919 Q2 (Metcalf)", kind: "comet" }, checked: { adNo: 8, meteors: 1147 }, from: { radiant: "imo", speed: "imo" } },
51
+ { code: "SDA", iau: 5, iauName: "Southern delta-Aquariids", status: "established", parent: null, checked: { adNo: 11, meteors: 74507 }, from: { radiant: "imo", speed: "imo" } },
52
+ { code: "CAP", iau: 1, iauName: "alpha-Capricornids", status: "established", parent: { designation: "169P/NEAT", kind: "comet" }, checked: { adNo: 13, meteors: 13532 }, from: { radiant: "imo", speed: "imo" } },
53
+ { code: "ERI", iau: 191, iauName: "eta-Eridanids", status: "established", parent: { designation: "C/1852 K1 (Chacornac)", kind: "comet" }, checked: { adNo: 5, meteors: 4272 }, from: { radiant: "mdc", speed: "imo" } },
54
+ { code: "PER", iau: 7, iauName: "Perseids", status: "established", parent: { designation: "109P/Swift-Tuttle", kind: "comet" }, checked: { adNo: 9, meteors: 141256 }, from: { radiant: "imo", speed: "imo" } },
55
+ { code: "KCG", iau: 12, iauName: "kappa-Cygnids", status: "established", parent: { designation: "2021 HK12", kind: "asteroid" }, checked: null, from: { radiant: "imo", speed: "imo" } },
56
+ { code: "AUR", iau: 206, iauName: "Aurigids", status: "established", parent: { designation: "C/1911 N1 (Kiess)", kind: "comet" }, checked: { adNo: 3, meteors: 1700 }, from: { radiant: "imo", speed: "imo" } },
57
+ { code: "SPE", iau: 208, iauName: "September epsilon-Perseids", status: "established", parent: null, checked: { adNo: 6, meteors: 218 }, from: { radiant: "imo", speed: "imo" } },
58
+ { code: "SLY", iau: 81, iauName: "September Lyncids", status: "working", parent: null, checked: { adNo: 0, meteors: 467 }, from: { radiant: "imo", speed: "imo" } },
59
+ { code: "DSX", iau: 221, iauName: "Daytime Sextantids", status: "established", parent: { designation: "(155140) 2005 UD", kind: "asteroid" }, checked: { adNo: 3, meteors: 1292 }, from: { radiant: "imo", speed: "imo" } },
60
+ { code: "OCT", iau: 281, iauName: "October Camelopardalids", status: "established", parent: null, checked: { adNo: 7, meteors: 333 }, from: { radiant: "imo", speed: "imo" } },
61
+ { code: "DRA", iau: 9, iauName: "October Draconids", status: "established", parent: { designation: "21P/Giacobini-Zinner", kind: "comet" }, checked: { adNo: 7, meteors: 1058 }, from: { radiant: "imo", speed: "imo" } },
62
+ { code: "EGE", iau: 23, iauName: "epsilon-Geminids", status: "established", parent: null, checked: { adNo: 5, meteors: 2321 }, from: { radiant: "imo", speed: "imo" } },
63
+ { code: "ORI", iau: 8, iauName: "Orionids", status: "established", parent: { designation: "1P/Halley", kind: "comet" }, checked: { adNo: 9, meteors: 72660 }, from: { radiant: "imo", speed: "imo" } },
64
+ { code: "LMI", iau: 22, iauName: "Leonis Minorids", status: "established", parent: { designation: "C/1739 K1 (Zanotti)", kind: "comet" }, checked: { adNo: 6, meteors: 2054 }, from: { radiant: "imo", speed: "imo" } },
65
+ { code: "STA", iau: 2, iauName: "Southern Taurids", status: "established", parent: { designation: "2P/Encke", kind: "comet" }, checked: { adNo: 10, meteors: 1212 }, from: { radiant: "imo", speed: "imo" } },
66
+ { code: "NTA", iau: 17, iauName: "Northern Taurids", status: "established", parent: { designation: "2P/Encke", kind: "comet" }, checked: { adNo: 12, meteors: 29599 }, from: { radiant: "imo", speed: "imo" } },
67
+ { code: "LEO", iau: 13, iauName: "Leonids", status: "established", parent: { designation: "55P/Tempel-Tuttle", kind: "comet" }, checked: { adNo: 14, meteors: 13815 }, from: { radiant: "imo", speed: "imo" } },
68
+ { code: "AMO", iau: 246, iauName: "alpha-Monocerotids", status: "established", parent: null, checked: { adNo: 4, meteors: 370 }, from: { radiant: "imo", speed: "mdc" } },
69
+ { code: "NOO", iau: 250, iauName: "November Orionids", status: "established", parent: null, checked: { adNo: 9, meteors: 8909 }, from: { radiant: "imo", speed: "imo" } },
70
+ { code: "PHO", iau: 254, iauName: "Phoenicids", status: "established", parent: { designation: "D/1819 W1 (Blanpain)", kind: "comet" }, checked: null, from: { radiant: "imo", speed: "imo" } },
71
+ { code: "PUP", iau: 301, iauName: "gamma-Puppids", status: "working", parent: null, checked: null, from: { radiant: "imo", speed: "imo" } },
72
+ { code: "MON", iau: 19, iauName: "December Monocerotids", status: "established", parent: { designation: "C/1917 F1 (Mellish)", kind: "comet" }, checked: { adNo: 8, meteors: 5710 }, from: { radiant: "imo", speed: "imo" } },
73
+ { code: "HYD", iau: 16, iauName: "sigma-Hydrids", status: "established", parent: { designation: "C/2023 P1 (Nishimura)", kind: "comet" }, checked: { adNo: 6, meteors: 15659 }, from: { radiant: "imo", speed: "imo" } },
74
+ { code: "GEM", iau: 4, iauName: "Geminids", status: "established", parent: { designation: "(3200) Phaethon", kind: "asteroid" }, checked: { adNo: 8, meteors: 104490 }, from: { radiant: "imo", speed: "imo" } },
75
+ { code: "COM", iau: 20, iauName: "Comae Berenicids", status: "established", parent: null, checked: { adNo: 7, meteors: 13811 }, from: { radiant: "imo", speed: "imo" } },
76
+ { code: "URS", iau: 15, iauName: "Ursids", status: "established", parent: { designation: "8P/Tuttle", kind: "comet" }, checked: { adNo: 9, meteors: 5606 }, from: { radiant: "imo", speed: "imo" } },
77
+ ];
@@ -1,9 +1,13 @@
1
1
  // The meteor showers a watcher can see: the International Meteor Organization's Working List of Visual Meteor Showers
2
2
  // (Table 5 of its 2026 Meteor Shower Calendar, edited by Jürgen Rendtel; "correct according to the best information available in
3
3
  // June 2025, with maximum dates accurate only for 2026"), typed by hand on 2026-11-10. The Antihelion Source, which has no fixed
4
- // radiant, is left out. Parent bodies are only those the Calendar's own text names (Lyrids, June Bootids, Perseids, Draconids,
5
- // Taurids, Leonids) or that NASA's pages on the shower name (Quadrantids, eta Aquariids, Orionids, Geminids); the rest have none here.
6
- // The Japanese names are the ones used in Japan for each shower. See NOTICE.md.
4
+ // radiant, is left out. On 2026-11-11 every row was checked against the IAU Meteor Data Center's lists (meteor-iau.ts has the
5
+ // rule, each shower's IAU name and status, the solution it was checked against and where each figure comes from): the dates and
6
+ // the rate stay the IMO's (the IAU lists have neither a maximum date nor a rate), and three rows took the IAU's figures because
7
+ // the IMO table's were further off than the IAU's own solutions are from each other (April Lyrids' speed, alpha-Monocerotids'
8
+ // speed, eta-Eridanids' radiant). The parent bodies are the ones the IAU MDC's origin column names; the Calendar's own text
9
+ // and NASA's pages on the shower (Quadrantids, eta Aquariids, Orionids, Geminids) name the same ones where they name any.
10
+ // The Japanese names are the ones used in Japan. See NOTICE.md.
7
11
  // No imports: this file is data only, so another package can read it without taking anything else.
8
12
  /**
9
13
  * The working list, in the order of the year.
@@ -20,38 +24,38 @@ export const METEOR_SHOWERS = [
20
24
  { code: "QUA", iau: 10, name: "Quadrantids", nameJa: "しぶんぎ座流星群", start: [12, 28], end: [1, 12], peak: [1, 3], peakSolarLongitude: 283.15, radiant: { ra: 230, dec: 49 }, speedKmS: 41, populationIndex: 2.1, zhr: 80, parent: "asteroid 2003 EH1" },
21
25
  { code: "GUM", iau: 404, name: "γ-Ursae Minorids", nameJa: "こぐま座γ流星群", start: [1, 10], end: [1, 22], peak: [1, 18], peakSolarLongitude: 298, radiant: { ra: 228, dec: 67 }, speedKmS: 31, populationIndex: 3.0, zhr: 3 },
22
26
  { code: "ACE", iau: 102, name: "α-Centaurids", nameJa: "ケンタウルス座α流星群", start: [1, 31], end: [2, 20], peak: [2, 8], peakSolarLongitude: 319.4, radiant: { ra: 211, dec: -58 }, speedKmS: 58, populationIndex: 2.0, zhr: 6 },
23
- { code: "LYR", iau: 6, name: "April Lyrids", nameJa: "4月こと座流星群", start: [4, 14], end: [4, 30], peak: [4, 22], peakSolarLongitude: 32.32, radiant: { ra: 271, dec: 34 }, speedKmS: 49, populationIndex: 2.1, zhr: 18, parent: "comet C/1861 G1 (Thatcher)" },
24
- { code: "PPU", iau: 137, name: "π-Puppids", nameJa: "とも座π流星群", start: [4, 15], end: [4, 28], peak: [4, 24], peakSolarLongitude: 33.5, radiant: { ra: 110, dec: -45 }, speedKmS: 18, populationIndex: 2.0, zhr: null },
27
+ { code: "LYR", iau: 6, name: "April Lyrids", nameJa: "4月こと座流星群", start: [4, 14], end: [4, 30], peak: [4, 22], peakSolarLongitude: 32.32, radiant: { ra: 271, dec: 34 }, speedKmS: 47, populationIndex: 2.1, zhr: 18, parent: "comet C/1861 G1 (Thatcher)" },
28
+ { code: "PPU", iau: 137, name: "π-Puppids", nameJa: "とも座π流星群", start: [4, 15], end: [4, 28], peak: [4, 24], peakSolarLongitude: 33.5, radiant: { ra: 110, dec: -45 }, speedKmS: 18, populationIndex: 2.0, zhr: null, parent: "comet 26P/Grigg-Skjellerup" },
25
29
  { code: "ETA", iau: 31, name: "η-Aquariids", nameJa: "みずがめ座η流星群", start: [4, 19], end: [5, 28], peak: [5, 6], peakSolarLongitude: 45.5, radiant: { ra: 338, dec: -1 }, speedKmS: 66, populationIndex: 2.4, zhr: 50, parent: "comet 1P/Halley" },
26
- { code: "ELY", iau: 145, name: "η-Lyrids", nameJa: "こと座η流星群", start: [5, 3], end: [5, 14], peak: [5, 11], peakSolarLongitude: 50.0, radiant: { ra: 291, dec: 43 }, speedKmS: 43, populationIndex: 3.0, zhr: 3 },
27
- { code: "ARI", iau: 171, name: "Daytime Arietids", nameJa: "おひつじ座昼間流星群", start: [5, 14], end: [6, 24], peak: [6, 7], peakSolarLongitude: 76.7, radiant: { ra: 43, dec: 24 }, speedKmS: 38, populationIndex: 2.8, zhr: 30 },
30
+ { code: "ELY", iau: 145, name: "η-Lyrids", nameJa: "こと座η流星群", start: [5, 3], end: [5, 14], peak: [5, 11], peakSolarLongitude: 50.0, radiant: { ra: 291, dec: 43 }, speedKmS: 43, populationIndex: 3.0, zhr: 3, parent: "comet C/1983 H1 (IRAS-Araki-Alcock)" },
31
+ { code: "ARI", iau: 171, name: "Daytime Arietids", nameJa: "おひつじ座昼間流星群", start: [5, 14], end: [6, 24], peak: [6, 7], peakSolarLongitude: 76.7, radiant: { ra: 43, dec: 24 }, speedKmS: 38, populationIndex: 2.8, zhr: 30, parent: "comet P/1999 J6 (SOHO)" },
28
32
  { code: "JBO", iau: 170, name: "June Bootids", nameJa: "6月うしかい座流星群", start: [6, 22], end: [7, 2], peak: [6, 22], peakSolarLongitude: 90.3, radiant: { ra: 221, dec: 48 }, speedKmS: 18, populationIndex: 2.2, zhr: null, parent: "comet 7P/Pons-Winnecke" },
29
- { code: "JPE", iau: 175, name: "July Pegasids", nameJa: "7月ペガスス座流星群", start: [7, 1], end: [7, 20], peak: [7, 10], peakSolarLongitude: 108.0, radiant: { ra: 347, dec: 11 }, speedKmS: 63, populationIndex: 3.0, zhr: 3 },
30
- { code: "GDR", iau: 184, name: "July γ-Draconids", nameJa: "7月りゅう座γ流星群", start: [7, 25], end: [7, 31], peak: [7, 28], peakSolarLongitude: 125.13, radiant: { ra: 280, dec: 51 }, speedKmS: 27, populationIndex: 3.0, zhr: 5 },
33
+ { code: "JPE", iau: 175, name: "July Pegasids", nameJa: "7月ペガスス座流星群", start: [7, 1], end: [7, 20], peak: [7, 10], peakSolarLongitude: 108.0, radiant: { ra: 347, dec: 11 }, speedKmS: 63, populationIndex: 3.0, zhr: 3, parent: "comet C/1979 Y1 (Bradfield)" },
34
+ { code: "GDR", iau: 184, name: "July γ-Draconids", nameJa: "7月りゅう座γ流星群", start: [7, 25], end: [7, 31], peak: [7, 28], peakSolarLongitude: 125.13, radiant: { ra: 280, dec: 51 }, speedKmS: 27, populationIndex: 3.0, zhr: 5, parent: "comet C/1919 Q2 (Metcalf)" },
31
35
  { code: "SDA", iau: 5, name: "Southern δ-Aquariids", nameJa: "みずがめ座δ南流星群", start: [7, 12], end: [8, 23], peak: [7, 31], peakSolarLongitude: 128, radiant: { ra: 340, dec: -16 }, speedKmS: 41, populationIndex: 2.5, zhr: 25 },
32
- { code: "CAP", iau: 1, name: "α-Capricornids", nameJa: "やぎ座α流星群", start: [7, 3], end: [8, 15], peak: [7, 31], peakSolarLongitude: 128, radiant: { ra: 307, dec: -10 }, speedKmS: 23, populationIndex: 2.5, zhr: 5 },
33
- { code: "ERI", iau: 191, name: "η-Eridanids", nameJa: "エリダヌス座η流星群", start: [7, 31], end: [8, 19], peak: [8, 7], peakSolarLongitude: 135, radiant: { ra: 41, dec: -11 }, speedKmS: 64, populationIndex: 3.0, zhr: 3 },
36
+ { code: "CAP", iau: 1, name: "α-Capricornids", nameJa: "やぎ座α流星群", start: [7, 3], end: [8, 15], peak: [7, 31], peakSolarLongitude: 128, radiant: { ra: 307, dec: -10 }, speedKmS: 23, populationIndex: 2.5, zhr: 5, parent: "comet 169P/NEAT" },
37
+ { code: "ERI", iau: 191, name: "η-Eridanids", nameJa: "エリダヌス座η流星群", start: [7, 31], end: [8, 19], peak: [8, 7], peakSolarLongitude: 135, radiant: { ra: 42, dec: -13 }, speedKmS: 64, populationIndex: 3.0, zhr: 3, parent: "comet C/1852 K1 (Chacornac)" },
34
38
  { code: "PER", iau: 7, name: "Perseids", nameJa: "ペルセウス座流星群", start: [7, 17], end: [8, 24], peak: [8, 13], peakSolarLongitude: 140.0, radiant: { ra: 48, dec: 58 }, speedKmS: 59, populationIndex: 2.2, zhr: 100, parent: "comet 109P/Swift-Tuttle" },
35
- { code: "KCG", iau: 12, name: "κ-Cygnids", nameJa: "はくちょう座κ流星群", start: [8, 3], end: [8, 28], peak: [8, 17], peakSolarLongitude: 144, radiant: { ra: 286, dec: 59 }, speedKmS: 23, populationIndex: 3.0, zhr: 3 },
36
- { code: "AUR", iau: 206, name: "Aurigids", nameJa: "ぎょしゃ座流星群", start: [8, 28], end: [9, 5], peak: [9, 1], peakSolarLongitude: 158.6, radiant: { ra: 91, dec: 39 }, speedKmS: 66, populationIndex: 2.5, zhr: 6 },
39
+ { code: "KCG", iau: 12, name: "κ-Cygnids", nameJa: "はくちょう座κ流星群", start: [8, 3], end: [8, 28], peak: [8, 17], peakSolarLongitude: 144, radiant: { ra: 286, dec: 59 }, speedKmS: 23, populationIndex: 3.0, zhr: 3, parent: "asteroid 2021 HK12" },
40
+ { code: "AUR", iau: 206, name: "Aurigids", nameJa: "ぎょしゃ座流星群", start: [8, 28], end: [9, 5], peak: [9, 1], peakSolarLongitude: 158.6, radiant: { ra: 91, dec: 39 }, speedKmS: 66, populationIndex: 2.5, zhr: 6, parent: "comet C/1911 N1 (Kiess)" },
37
41
  { code: "SPE", iau: 208, name: "September ε-Perseids", nameJa: "9月ペルセウス座ε流星群", start: [9, 5], end: [9, 21], peak: [9, 9], peakSolarLongitude: 166.7, radiant: { ra: 48, dec: 40 }, speedKmS: 64, populationIndex: 2.5, zhr: 8 },
38
42
  { code: "SLY", iau: 81, name: "September Lyncids", nameJa: "9月やまねこ座流星群", start: [9, 10], end: [10, 8], peak: [9, 13], peakSolarLongitude: 170, radiant: { ra: 113, dec: 56 }, speedKmS: 60, populationIndex: 3.0, zhr: 3 },
39
- { code: "DSX", iau: 221, name: "Daytime Sextantids", nameJa: "ろくぶんぎ座昼間流星群", start: [9, 20], end: [10, 6], peak: [10, 1], peakSolarLongitude: 188, radiant: { ra: 156, dec: -2 }, speedKmS: 32, populationIndex: 2.5, zhr: 5 },
43
+ { code: "DSX", iau: 221, name: "Daytime Sextantids", nameJa: "ろくぶんぎ座昼間流星群", start: [9, 20], end: [10, 6], peak: [10, 1], peakSolarLongitude: 188, radiant: { ra: 156, dec: -2 }, speedKmS: 32, populationIndex: 2.5, zhr: 5, parent: "asteroid (155140) 2005 UD" },
40
44
  { code: "OCT", iau: 281, name: "October Camelopardalids", nameJa: "10月きりん座流星群", start: [10, 5], end: [10, 6], peak: [10, 6], peakSolarLongitude: 192.58, radiant: { ra: 164, dec: 79 }, speedKmS: 47, populationIndex: 2.5, zhr: 5 },
41
45
  { code: "DRA", iau: 9, name: "Draconids", nameJa: "10月りゅう座流星群", start: [10, 6], end: [10, 10], peak: [10, 9], peakSolarLongitude: 195.4, radiant: { ra: 262, dec: 54 }, speedKmS: 20, populationIndex: 2.6, zhr: 5, parent: "comet 21P/Giacobini-Zinner" },
42
46
  { code: "EGE", iau: 23, name: "ε-Geminids", nameJa: "ふたご座ε流星群", start: [10, 14], end: [10, 27], peak: [10, 18], peakSolarLongitude: 205, radiant: { ra: 102, dec: 27 }, speedKmS: 70, populationIndex: 3.0, zhr: 3 },
43
47
  { code: "ORI", iau: 8, name: "Orionids", nameJa: "オリオン座流星群", start: [10, 2], end: [11, 7], peak: [10, 21], peakSolarLongitude: 208, radiant: { ra: 95, dec: 16 }, speedKmS: 66, populationIndex: 2.5, zhr: 20, parent: "comet 1P/Halley" },
44
- { code: "LMI", iau: 22, name: "Leonis Minorids", nameJa: "こじし座流星群", start: [10, 19], end: [10, 27], peak: [10, 24], peakSolarLongitude: 211, radiant: { ra: 162, dec: 37 }, speedKmS: 62, populationIndex: 3.0, zhr: 2 },
48
+ { code: "LMI", iau: 22, name: "Leonis Minorids", nameJa: "こじし座流星群", start: [10, 19], end: [10, 27], peak: [10, 24], peakSolarLongitude: 211, radiant: { ra: 162, dec: 37 }, speedKmS: 62, populationIndex: 3.0, zhr: 2, parent: "comet C/1739 K1 (Zanotti)" },
45
49
  { code: "STA", iau: 2, name: "Southern Taurids", nameJa: "おうし座南流星群", start: [9, 20], end: [11, 20], peak: [11, 5], peakSolarLongitude: 223, radiant: { ra: 52, dec: 15 }, speedKmS: 27, populationIndex: 2.3, zhr: 7, parent: "comet 2P/Encke" },
46
50
  { code: "NTA", iau: 17, name: "Northern Taurids", nameJa: "おうし座北流星群", start: [10, 20], end: [12, 10], peak: [11, 12], peakSolarLongitude: 230, radiant: { ra: 58, dec: 22 }, speedKmS: 29, populationIndex: 2.3, zhr: 5, parent: "comet 2P/Encke" },
47
51
  { code: "LEO", iau: 13, name: "Leonids", nameJa: "しし座流星群", start: [11, 6], end: [11, 30], peak: [11, 17], peakSolarLongitude: 235.27, radiant: { ra: 152, dec: 22 }, speedKmS: 71, populationIndex: 2.5, zhr: 15, parent: "comet 55P/Tempel-Tuttle" },
48
- { code: "AMO", iau: 246, name: "α-Monocerotids", nameJa: "いっかくじゅう座α流星群", start: [11, 15], end: [11, 25], peak: [11, 22], peakSolarLongitude: 239.32, radiant: { ra: 117, dec: 1 }, speedKmS: 65, populationIndex: 2.4, zhr: null },
52
+ { code: "AMO", iau: 246, name: "α-Monocerotids", nameJa: "いっかくじゅう座α流星群", start: [11, 15], end: [11, 25], peak: [11, 22], peakSolarLongitude: 239.32, radiant: { ra: 117, dec: 1 }, speedKmS: 62, populationIndex: 2.4, zhr: null },
49
53
  { code: "NOO", iau: 250, name: "November Orionids", nameJa: "11月オリオン座流星群", start: [11, 13], end: [12, 6], peak: [11, 28], peakSolarLongitude: 246, radiant: { ra: 91, dec: 16 }, speedKmS: 44, populationIndex: 3.0, zhr: 3 },
50
- { code: "PHO", iau: 254, name: "Phoenicids", nameJa: "ほうおう座流星群", start: [12, 1], end: [12, 5], peak: [12, 2], peakSolarLongitude: 249.5, radiant: { ra: 8, dec: -27 }, speedKmS: 15, populationIndex: 2.8, zhr: null },
54
+ { code: "PHO", iau: 254, name: "Phoenicids", nameJa: "ほうおう座流星群", start: [12, 1], end: [12, 5], peak: [12, 2], peakSolarLongitude: 249.5, radiant: { ra: 8, dec: -27 }, speedKmS: 15, populationIndex: 2.8, zhr: null, parent: "comet D/1819 W1 (Blanpain)" },
51
55
  { code: "PUP", iau: 301, name: "Puppid-Velids", nameJa: "とも座・ほ座流星群", start: [12, 1], end: [12, 15], peak: [12, 7], peakSolarLongitude: 255, radiant: { ra: 123, dec: -45 }, speedKmS: 44, populationIndex: 2.9, zhr: 10 },
52
- { code: "MON", iau: 19, name: "Monocerotids", nameJa: "12月いっかくじゅう座流星群", start: [12, 1], end: [12, 19], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 100, dec: 8 }, speedKmS: 41, populationIndex: 3.0, zhr: 3 },
53
- { code: "HYD", iau: 16, name: "σ-Hydrids", nameJa: "うみへび座σ流星群", start: [12, 3], end: [12, 20], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 125, dec: 2 }, speedKmS: 58, populationIndex: 3.0, zhr: 7 },
56
+ { code: "MON", iau: 19, name: "Monocerotids", nameJa: "12月いっかくじゅう座流星群", start: [12, 1], end: [12, 19], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 100, dec: 8 }, speedKmS: 41, populationIndex: 3.0, zhr: 3, parent: "comet C/1917 F1 (Mellish)" },
57
+ { code: "HYD", iau: 16, name: "σ-Hydrids", nameJa: "うみへび座σ流星群", start: [12, 3], end: [12, 20], peak: [12, 9], peakSolarLongitude: 257, radiant: { ra: 125, dec: 2 }, speedKmS: 58, populationIndex: 3.0, zhr: 7, parent: "comet C/2023 P1 (Nishimura)" },
54
58
  { code: "GEM", iau: 4, name: "Geminids", nameJa: "ふたご座流星群", start: [12, 4], end: [12, 20], peak: [12, 14], peakSolarLongitude: 262.2, radiant: { ra: 112, dec: 33 }, speedKmS: 35, populationIndex: 2.6, zhr: 150, parent: "asteroid (3200) Phaethon" },
55
59
  { code: "COM", iau: 20, name: "Comae Berenicids", nameJa: "かみのけ座流星群", start: [12, 4], end: [1, 30], peak: [12, 23], peakSolarLongitude: 271, radiant: { ra: 164, dec: 29 }, speedKmS: 65, populationIndex: 3.0, zhr: 3 },
56
- { code: "URS", iau: 15, name: "Ursids", nameJa: "こぐま座流星群", start: [12, 17], end: [12, 26], peak: [12, 22], peakSolarLongitude: 270.7, radiant: { ra: 217, dec: 76 }, speedKmS: 33, populationIndex: 2.8, zhr: 10 },
60
+ { code: "URS", iau: 15, name: "Ursids", nameJa: "こぐま座流星群", start: [12, 17], end: [12, 26], peak: [12, 22], peakSolarLongitude: 270.7, radiant: { ra: 217, dec: 76 }, speedKmS: 33, populationIndex: 2.8, zhr: 10, parent: "comet 8P/Tuttle" },
57
61
  ];
@@ -9,6 +9,8 @@
9
9
  */
10
10
  export interface Licence {
11
11
  name: string;
12
+ /** The name in Japanese, for a Japanese credit line: a source's own terms (`"UCAC4の利用条件"`). Left out, a plain phrase the door knows ("Public domain") is translated and an identifier ("CC BY 4.0") stays. */
13
+ nameJa?: string;
12
14
  url: string;
13
15
  /** An SPDX identifier, when there is one. */
14
16
  spdx?: string;
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("、")})`;
@@ -4,3 +4,4 @@ export { DEFAULT_LEVELS, earthTiles, imageBytes, mapKeys, tileKeyParts, tilePlac
4
4
  export { elementsFrom, mergeElementSets, readElementSets, type ElementRecordSource, type ElementSetsRead } from "./elements.ts";
5
5
  export { OWN_SOURCES, ownCredit } from "./own.ts";
6
6
  export { createSourceBook, creditsOf, type SourceBook, type SourceBookOptions, type SourceStats } from "./book.ts";
7
+ export { packedElementsFrom, readPackedFrom, type PackedElementsOptions } from "./packed.ts";
@@ -8,3 +8,4 @@ export { DEFAULT_LEVELS, earthTiles, imageBytes, mapKeys, tileKeyParts, tilePlac
8
8
  export { elementsFrom, mergeElementSets, readElementSets } from "./elements.js";
9
9
  export { OWN_SOURCES, ownCredit } from "./own.js";
10
10
  export { createSourceBook, creditsOf } from "./book.js";
11
+ export { packedElementsFrom, readPackedFrom } from "./packed.js";