@johnmorrisdotca/chikyu-earth 0.58.0 → 0.60.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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.60.0 - 2026-11-17
4
+
5
+ - **`classOfElements` and `orbitClass` follow the Space Program X site's orbit levels** (MODULES-1403; breaking for code that reads the class names). The class is now decided by the rule the site's `levelOf` uses, so a page that shows both says one thing: low is a highest point under 2,000 km; geostationary is both points within 2,500 km (was 1,500) of 35,786 km; the outer edge of low orbit (`outer`, new) is a lowest point of 2,000 km or more and a highest under 8,000 km; medium is the rest of those to 32,000 km (was 34,286); `far` is every orbit left. There is no rule on the eccentricity any more (`heo` is gone: an oval low orbit is low, and the stretched ones that swing far out are `far`), and `other` is gone (`far` takes what was left). `OrbitClass` is `"leo" | "outer" | "meo" | "geo" | "far"`, `ORBIT_CLASSES`, `CLASS_LABELS` (English and Japanese, the site's words) and `CLASS_COLOURS` follow, and `CLASS_LIMITS` is `{ leoApogeeKm, outerApogeeKm, meoApogeeKm, geoBandKm }`. Heights stay above the mean Earth radius (6,371 km), 7 km under the site's equatorial radius, so a set within 7 km of a limit can differ. On the site's own 16,903 element sets 53 had a different class under the old rule. The satellites' class colours on the Earth follow.
6
+
7
+ ## 0.59.0 - 2026-11-18
8
+
9
+ - **A survey of where the finer ground has a picture, and the guide corrected** (MODULES-1367). `scripts/finer-coverage.py` (`pnpm coverage`) reads the Landsat layer's tiles at a grid of places and writes the maps and tables in `docs/coverage/` (level 5 and level 11). On 2026-11-17 the finer picture covered 89 per cent of the land, and every band of latitude from 60 degrees south to 80 degrees north at 96 per cent or more; what is missing is all of Antarctica, part of the land north of 80 degrees and the water of large lakes. The earth-tiles guide, in English and Japanese, says that instead of "the far north". `pnpm test:tiles` runs the script's selftest on a tiny made-up map (it needs Pillow: `python3 -m venv .cache/venv && .cache/venv/bin/pip install pillow`), and CI runs it too.
10
+ - **The Landsat scene edge west of Tokyo is named in the guide** (MODULES-1314). With `tiles-finer="gibs"` the 2000 mosaic shows a straight edge about 40 km west of Tokyo (tile level 9, row 96, column 568) where two Landsat scenes meet. It is in NASA's picture. No general fix was found (the tiles do not say where a scene ends, and a colour gain scales both sides alike), so the guide, in English and Japanese, now names it and says to pick another year (`tiles-finer-date`) or layer (`tiles-finer-layer`). No code changes.
11
+
3
12
  ## 0.58.0 - 2026-11-17
4
13
 
5
14
  - **A fast clock's streaks turn about the plane of the moment shown** (MODULES-1476). Above 60 times real time `arc()` turned each pinned place about a normal worked out once from the element set's own `RA_OF_ASC_NODE` and `INCLINATION`, so days from the elements (a low orbit's plane turns about 5 degrees a day) the dot left its orbit between two pins: 600 s after its pin the ISS's place was 3,049 km from `exact()`'s at 20 days from its elements and 5,970 km at 400. The axis is now the pinned place crossed with SGP4's velocity there, worked out once for each pin and not in `arc()`, with no allocation in the frame: the same ISS is 13.6 km off at 20 days and 5.4 km at 400 (what is left is the mean motion standing in for the true rate along the orbit). At the page's own pin rate (about once a second) the worst place of the recorded stations is 0.4 km off. Tests: `arc` within 1 km of `exact` at the pin rate and within 20 km 600 s after a pin, 20 and 400 days from the elements, and no SGP4 call or heap growth in a frame between pins. No change to the API.
package/README.md CHANGED
@@ -615,7 +615,7 @@ console.log(countryList().filter((country) => country.alpha2 === null).map((coun
615
615
 
616
616
  ## How to cite
617
617
 
618
- > Morris, J. (2026). *Chikyu Earth* (version 0.58.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
618
+ > Morris, J. (2026). *Chikyu Earth* (version 0.60.0) [Computer software]. https://github.com/johnmorrisdotca/chikyu-earth
619
619
 
620
620
  GitHub's "Cite this repository" button reads [CITATION.cff](CITATION.cff) and gives BibTeX and APA. Cite the version you used (`npm ls @johnmorrisdotca/chikyu-earth`), and credit the sources behind the numbers and pictures: [NOTICE.md](NOTICE.md) says who made each one and under what terms.
621
621
 
@@ -60,7 +60,7 @@ export declare const KIND_LABELS: Readonly<Record<ObjectKind, {
60
60
  * console.log(value);
61
61
  * ```
62
62
  */
63
- export type OrbitClass = "leo" | "meo" | "geo" | "heo" | "other";
63
+ export type OrbitClass = "leo" | "outer" | "meo" | "geo" | "far";
64
64
  /**
65
65
  * The five classes, in the order a legend lists them.
66
66
  *
@@ -88,7 +88,7 @@ export declare const CLASS_LABELS: Readonly<Record<OrbitClass, {
88
88
  rule: string;
89
89
  }>>;
90
90
  /**
91
- * The colour of each class on a dark background: green, yellow, red, violet and grey.
91
+ * The colour of each class on a dark background: green, blue, yellow, red and violet.
92
92
  *
93
93
  * @example
94
94
  * ```ts
@@ -59,7 +59,7 @@ export const KIND_LABELS = {
59
59
  * console.log(ORBIT_CLASSES.join(" "));
60
60
  * ```
61
61
  */
62
- export const ORBIT_CLASSES = ["leo", "meo", "geo", "heo", "other"];
62
+ export const ORBIT_CLASSES = ["leo", "outer", "meo", "geo", "far"];
63
63
  /**
64
64
  * The words for each class, in English and Japanese, with the rule that makes it (heights above the mean Earth radius).
65
65
  *
@@ -72,13 +72,13 @@ export const ORBIT_CLASSES = ["leo", "meo", "geo", "heo", "other"];
72
72
  */
73
73
  export const CLASS_LABELS = {
74
74
  leo: { en: "Low orbit", ja: "低軌道", rule: "highest point under 2,000 km" },
75
- meo: { en: "Medium orbit", ja: "中軌道", rule: "lowest point 2,000 km or more, highest point under 34,286 km" },
76
- geo: { en: "Geostationary", ja: "静止軌道", rule: "35,786 km, within 1,500 km, nearly circular" },
77
- heo: { en: "Highly elliptical", ja: "高楕円軌道", rule: "eccentricity 0.25 or more" },
78
- other: { en: "Other", ja: "その他", rule: "none of the above (above the geostationary belt, or between the classes)" },
75
+ outer: { en: "Low orbit, outer edge", ja: "低軌道の外縁", rule: "lowest point 2,000 km or more, highest point under 8,000 km" },
76
+ meo: { en: "Medium orbit", ja: "中軌道", rule: "lowest point 2,000 km or more, highest point 8,000 km or more and under 32,000 km" },
77
+ geo: { en: "Geostationary", ja: "静止軌道", rule: "35,786 km, both points within 2,500 km" },
78
+ far: { en: "Far orbits", ja: "遠方の軌道", rule: "every orbit the others leave: stretched ones that swing far out, and any above the belt" },
79
79
  };
80
80
  /**
81
- * The colour of each class on a dark background: green, yellow, red, violet and grey.
81
+ * The colour of each class on a dark background: green, blue, yellow, red and violet.
82
82
  *
83
83
  * @example
84
84
  * ```ts
@@ -87,7 +87,7 @@ export const CLASS_LABELS = {
87
87
  * console.log(CLASS_COLOURS.geo);
88
88
  * ```
89
89
  */
90
- export const CLASS_COLOURS = { leo: "#5dd6a2", meo: "#ffd166", geo: "#ef476f", heo: "#b388eb", other: "#9aa5b1" };
90
+ export const CLASS_COLOURS = { leo: "#5dd6a2", outer: "#4cc9f0", meo: "#ffd166", geo: "#ef476f", far: "#b388eb" };
91
91
  /**
92
92
  * The colour of each kind on a dark background: cyan payloads, orange rocket bodies, grey debris and pale unknowns.
93
93
  *
@@ -1,6 +1,6 @@
1
1
  import type { OrbitClass } from "./kinds.ts";
2
2
  /**
3
- * The height of the geostationary orbit above the equator, in kilometres: the radius of a circular orbit that goes round once a sidereal day (42,164 km) less the equatorial radius (6,378 km). The heights in this module are above the mean Earth radius of 6,371 km, which differs by 7 km, well inside the 1,500 km band.
3
+ * The height of the geostationary orbit above the equator, in kilometres: the radius of a circular orbit that goes round once a sidereal day (42,164 km) less the equatorial radius (6,378 km). The heights in this module are above the mean Earth radius of 6,371 km, which differs by 7 km, well inside the 2,500 km band.
4
4
  *
5
5
  * @example
6
6
  * ```ts
@@ -49,22 +49,23 @@ export interface OrbitShape {
49
49
  */
50
50
  export declare function orbitShape(meanMotion: number, eccentricity: number): OrbitShape | null;
51
51
  /**
52
- * The numbers behind the classes: the highest point a low orbit may have (2,000 km), the eccentricity from which an orbit is highly elliptical (0.25), and how far from 35,786 km the lowest and highest points of a geostationary orbit may be (1,500 km).
52
+ * The numbers behind the classes, the same ones the Space Program X site puts its orbit levels at: the highest point a low orbit may have (2,000 km), the highest point of the outer edge of low orbit (8,000 km, where the medium orbits' lowest are 2,000 km or more), the highest point a medium orbit may have (32,000 km, the navigation satellites are about 20,000), and how far from 35,786 km the lowest and highest points of a geostationary orbit may be (2,500 km).
53
53
  *
54
54
  * @example
55
55
  * ```ts
56
56
  * import { CLASS_LIMITS } from "@johnmorrisdotca/chikyu-earth/catalogue";
57
57
  *
58
- * console.log(CLASS_LIMITS.leoApogeeKm, CLASS_LIMITS.heoEccentricity, CLASS_LIMITS.geoBandKm);
58
+ * console.log(CLASS_LIMITS.leoApogeeKm, CLASS_LIMITS.outerApogeeKm, CLASS_LIMITS.meoApogeeKm, CLASS_LIMITS.geoBandKm);
59
59
  * ```
60
60
  */
61
61
  export declare const CLASS_LIMITS: {
62
62
  readonly leoApogeeKm: 2000;
63
- readonly heoEccentricity: 0.25;
64
- readonly geoBandKm: 1500;
63
+ readonly outerApogeeKm: 8000;
64
+ readonly meoApogeeKm: 32000;
65
+ readonly geoBandKm: 2500;
65
66
  };
66
67
  /**
67
- * The class an orbit falls in. `heo` when the eccentricity is 0.25 or more; otherwise `leo` when the highest point is under 2,000 km, `geo` when both points are within 1,500 km of 35,786 km, `meo` when the lowest point is 2,000 km or more and the highest is under that band, and `other` for what is left (above the geostationary belt, or between the classes).
68
+ * The class an orbit falls in, by the rule the Space Program X site's orbit levels use (there is no rule on the eccentricity). `leo` when the highest point is under 2,000 km; `geo` when both points are within 2,500 km of 35,786 km; `outer` when the lowest point is 2,000 km or more and the highest is under 8,000 km (the outer edge of low orbit); `meo` when the lowest point is 2,000 km or more and the highest is under 32,000 km; `far` for every orbit those leave: the stretched ones that swing far out, and any above the belt.
68
69
  *
69
70
  * @param shape - The orbit's shape, from `orbitShape`.
70
71
  * @returns The class.
@@ -74,7 +75,7 @@ export declare const CLASS_LIMITS: {
74
75
  * import { orbitClass, orbitShape } from "@johnmorrisdotca/chikyu-earth/catalogue";
75
76
  *
76
77
  * const of = (n: number, e: number): string => orbitClass(orbitShape(n, e)!);
77
- * console.log(of(15.49, 0.0007), of(2.0056, 0.0001), of(1.0027, 0.0002), of(2.0, 0.72), of(0.9, 0.001));
78
+ * console.log(of(15.49, 0.0007), of(5.0, 0.001), of(2.0056, 0.0001), of(1.0027, 0.0002), of(2.0, 0.72));
78
79
  * ```
79
80
  */
80
81
  export declare function orbitClass(shape: OrbitShape): OrbitClass;
@@ -1,7 +1,7 @@
1
1
  const MU = 398_600.4418;
2
2
  const EARTH_RADIUS_KM = 6371;
3
3
  /**
4
- * The height of the geostationary orbit above the equator, in kilometres: the radius of a circular orbit that goes round once a sidereal day (42,164 km) less the equatorial radius (6,378 km). The heights in this module are above the mean Earth radius of 6,371 km, which differs by 7 km, well inside the 1,500 km band.
4
+ * The height of the geostationary orbit above the equator, in kilometres: the radius of a circular orbit that goes round once a sidereal day (42,164 km) less the equatorial radius (6,378 km). The heights in this module are above the mean Earth radius of 6,371 km, which differs by 7 km, well inside the 2,500 km band.
5
5
  *
6
6
  * @example
7
7
  * ```ts
@@ -34,18 +34,18 @@ export function orbitShape(meanMotion, eccentricity) {
34
34
  return { semiMajorKm: a, periodMinutes: 1440 / meanMotion, perigeeKm: a * (1 - eccentricity) - EARTH_RADIUS_KM, apogeeKm: a * (1 + eccentricity) - EARTH_RADIUS_KM, eccentricity };
35
35
  }
36
36
  /**
37
- * The numbers behind the classes: the highest point a low orbit may have (2,000 km), the eccentricity from which an orbit is highly elliptical (0.25), and how far from 35,786 km the lowest and highest points of a geostationary orbit may be (1,500 km).
37
+ * The numbers behind the classes, the same ones the Space Program X site puts its orbit levels at: the highest point a low orbit may have (2,000 km), the highest point of the outer edge of low orbit (8,000 km, where the medium orbits' lowest are 2,000 km or more), the highest point a medium orbit may have (32,000 km, the navigation satellites are about 20,000), and how far from 35,786 km the lowest and highest points of a geostationary orbit may be (2,500 km).
38
38
  *
39
39
  * @example
40
40
  * ```ts
41
41
  * import { CLASS_LIMITS } from "@johnmorrisdotca/chikyu-earth/catalogue";
42
42
  *
43
- * console.log(CLASS_LIMITS.leoApogeeKm, CLASS_LIMITS.heoEccentricity, CLASS_LIMITS.geoBandKm);
43
+ * console.log(CLASS_LIMITS.leoApogeeKm, CLASS_LIMITS.outerApogeeKm, CLASS_LIMITS.meoApogeeKm, CLASS_LIMITS.geoBandKm);
44
44
  * ```
45
45
  */
46
- export const CLASS_LIMITS = { leoApogeeKm: 2_000, heoEccentricity: 0.25, geoBandKm: 1_500 };
46
+ export const CLASS_LIMITS = { leoApogeeKm: 2_000, outerApogeeKm: 8_000, meoApogeeKm: 32_000, geoBandKm: 2_500 };
47
47
  /**
48
- * The class an orbit falls in. `heo` when the eccentricity is 0.25 or more; otherwise `leo` when the highest point is under 2,000 km, `geo` when both points are within 1,500 km of 35,786 km, `meo` when the lowest point is 2,000 km or more and the highest is under that band, and `other` for what is left (above the geostationary belt, or between the classes).
48
+ * The class an orbit falls in, by the rule the Space Program X site's orbit levels use (there is no rule on the eccentricity). `leo` when the highest point is under 2,000 km; `geo` when both points are within 2,500 km of 35,786 km; `outer` when the lowest point is 2,000 km or more and the highest is under 8,000 km (the outer edge of low orbit); `meo` when the lowest point is 2,000 km or more and the highest is under 32,000 km; `far` for every orbit those leave: the stretched ones that swing far out, and any above the belt.
49
49
  *
50
50
  * @param shape - The orbit's shape, from `orbitShape`.
51
51
  * @returns The class.
@@ -55,21 +55,17 @@ export const CLASS_LIMITS = { leoApogeeKm: 2_000, heoEccentricity: 0.25, geoBand
55
55
  * import { orbitClass, orbitShape } from "@johnmorrisdotca/chikyu-earth/catalogue";
56
56
  *
57
57
  * const of = (n: number, e: number): string => orbitClass(orbitShape(n, e)!);
58
- * console.log(of(15.49, 0.0007), of(2.0056, 0.0001), of(1.0027, 0.0002), of(2.0, 0.72), of(0.9, 0.001));
58
+ * console.log(of(15.49, 0.0007), of(5.0, 0.001), of(2.0056, 0.0001), of(1.0027, 0.0002), of(2.0, 0.72));
59
59
  * ```
60
60
  */
61
61
  export function orbitClass(shape) {
62
- if (shape.eccentricity >= CLASS_LIMITS.heoEccentricity)
63
- return "heo";
64
62
  if (shape.apogeeKm < CLASS_LIMITS.leoApogeeKm)
65
63
  return "leo";
66
- const low = GEO_ALTITUDE_KM - CLASS_LIMITS.geoBandKm;
67
- const high = GEO_ALTITUDE_KM + CLASS_LIMITS.geoBandKm;
68
- if (shape.perigeeKm >= low && shape.apogeeKm <= high)
64
+ if (Math.abs(shape.perigeeKm - GEO_ALTITUDE_KM) < CLASS_LIMITS.geoBandKm && Math.abs(shape.apogeeKm - GEO_ALTITUDE_KM) < CLASS_LIMITS.geoBandKm)
69
65
  return "geo";
70
- if (shape.perigeeKm >= CLASS_LIMITS.leoApogeeKm && shape.apogeeKm < low)
71
- return "meo";
72
- return "other";
66
+ if (shape.perigeeKm >= CLASS_LIMITS.leoApogeeKm && shape.apogeeKm < CLASS_LIMITS.meoApogeeKm)
67
+ return shape.apogeeKm < CLASS_LIMITS.outerApogeeKm ? "outer" : "meo";
68
+ return "far";
73
69
  }
74
70
  /**
75
71
  * The class of an orbit straight from the two numbers every element set has, its mean motion (revolutions a day) and its eccentricity; `null` when they are not an orbit.
@@ -139,7 +139,7 @@ export function createSatellites(sets, options = {}) {
139
139
  rate[i] = (set.MEAN_MOTION * 2 * Math.PI) / DAY_MS;
140
140
  if (set.ECCENTRICITY >= ECCENTRIC_FROM)
141
141
  eccentric.push(i);
142
- const kind = classOfElements(set.MEAN_MOTION, set.ECCENTRICITY) ?? "other";
142
+ const kind = classOfElements(set.MEAN_MOTION, set.ECCENTRICITY) ?? "far";
143
143
  const hex = Number.parseInt(CLASS_COLOURS[kind].slice(1), 16);
144
144
  classColour[i * 3] = ((hex >> 16) & 255) / 255;
145
145
  classColour[i * 3 + 1] = ((hex >> 8) & 255) / 255;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@johnmorrisdotca/chikyu-earth",
3
- "version": "0.58.0",
3
+ "version": "0.60.0",
4
4
  "description": "Chikyu Earth 地球 — A line-drawn globe for the web: country outlines that turn at the Earth's own rate, centred on the place you give it, with an optional realistic Earth from space (three.js), the Sun, Moon and planets, satellites on their orbits, and markers for any place. A web component and an SVG string.",
5
5
  "keywords": [
6
6
  "earth",
@@ -224,7 +224,8 @@
224
224
  "screenshots": "pnpm site && node scripts/screenshots.ts",
225
225
  "textures": "python3 scripts/make-textures.py",
226
226
  "tiles": "python3 -I scripts/make-earth-tiles.py build",
227
- "test:tiles": "python3 -I scripts/make-earth-tiles.py selftest",
227
+ "test:tiles": "python3 -I scripts/make-earth-tiles.py selftest && python3 -I scripts/finer-coverage.py selftest",
228
+ "coverage": "python3 -I scripts/finer-coverage.py survey && python3 -I scripts/finer-coverage.py survey --level 11 --cell 2 --sample centre",
228
229
  "test:demo:one": "pnpm site && node scripts/docs-site.mjs build && playwright test",
229
230
  "test:soak": "pnpm site && playwright test --project=soak",
230
231
  "docs:site": "pnpm build && node scripts/docs-site.mjs build",