@johnmorrisdotca/chikyu-earth 0.41.0 → 0.43.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.
@@ -0,0 +1,249 @@
1
+ // Which satellites are nearest a place, a direction in the sky, or another satellite. Positions come from the group's SGP4 (`exact`), once per call, never on a timer.
2
+ // The Earth-fixed frame is the same turn `groundUnder` uses (src/paint/math.ts): the view's x, y, z, then Greenwich sidereal time.
3
+ import { greenwichSidereal } from "../realistic/sun.js";
4
+ /** The sphere the positions use, kilometres, the same one `groundUnder` uses. */
5
+ const EARTH_KM = 6371;
6
+ const RAD = Math.PI / 180;
7
+ /** A rough uncertainty: 1 km at the epoch, and 1 km more for each day the elements have aged. Not a published covariance. */
8
+ const uncertaintyOf = (ageDays) => 1 + Math.max(0, ageDays);
9
+ /**
10
+ * How many neighbours `nearest` returns when `count` is left out.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { NEAREST_COUNT } from "@johnmorrisdotca/chikyu-earth/satellites";
15
+ *
16
+ * console.log(NEAREST_COUNT);
17
+ * ```
18
+ */
19
+ export const NEAREST_COUNT = 5;
20
+ const dot = (a, b) => a.x * b.x + a.y * b.y + a.z * b.z;
21
+ const sub = (a, b) => ({ x: a.x - b.x, y: a.y - b.y, z: a.z - b.z });
22
+ const norm = (a) => {
23
+ const length = Math.hypot(a.x, a.y, a.z) || 1;
24
+ return { x: a.x / length, y: a.y / length, z: a.z / length };
25
+ };
26
+ const hypot = (a) => Math.hypot(a.x, a.y, a.z);
27
+ /** A place on the sphere, in kilometres, in the Earth-fixed frame (x east of Greenwich, y north, z the meridian of 0). */
28
+ function groundKm(place, heightM = 0) {
29
+ const lat = place.lat * RAD;
30
+ const lon = place.lon * RAD;
31
+ const radius = EARTH_KM + heightM / 1000;
32
+ const c = Math.cos(lat);
33
+ return { x: c * Math.sin(lon) * radius, y: Math.sin(lat) * radius, z: c * Math.cos(lon) * radius };
34
+ }
35
+ /** `exact`'s position (Earth radii, the view's axes) as kilometres fixed to the Earth. The same turn as `groundUnder`. */
36
+ function fixedKm(x, y, z, ms) {
37
+ const theta = greenwichSidereal(ms) * RAD;
38
+ const sin = Math.sin(theta);
39
+ const cos = Math.cos(theta);
40
+ const temeX = x;
41
+ const temeY = -z;
42
+ const temeZ = y;
43
+ const east = -temeX * sin + temeY * cos;
44
+ const north = temeZ;
45
+ const prime = temeX * cos + temeY * sin;
46
+ return { x: east * EARTH_KM, y: north * EARTH_KM, z: prime * EARTH_KM };
47
+ }
48
+ /** A direction in the sky, as a unit vector in the Earth-fixed frame. Azimuth is degrees clockwise from north. */
49
+ function skyDirection(observer, azimuth, elevation) {
50
+ const lat = observer.lat * RAD;
51
+ const lon = observer.lon * RAD;
52
+ const east = { x: Math.cos(lon), y: 0, z: -Math.sin(lon) };
53
+ const north = { x: -Math.sin(lat) * Math.sin(lon), y: Math.cos(lat), z: -Math.sin(lat) * Math.cos(lon) };
54
+ const up = { x: Math.cos(lat) * Math.sin(lon), y: Math.sin(lat), z: Math.cos(lat) * Math.cos(lon) };
55
+ const el = elevation * RAD;
56
+ const az = azimuth * RAD;
57
+ const ce = Math.cos(el);
58
+ return norm({
59
+ x: north.x * ce * Math.cos(az) + east.x * ce * Math.sin(az) + up.x * Math.sin(el),
60
+ y: north.y * ce * Math.cos(az) + east.y * ce * Math.sin(az) + up.y * Math.sin(el),
61
+ z: north.z * ce * Math.cos(az) + east.z * ce * Math.sin(az) + up.z * Math.sin(el),
62
+ });
63
+ }
64
+ /** An element set's epoch, milliseconds since the Unix epoch; a text with no zone is read as UTC. */
65
+ const epochOf = (text) => Date.parse(/[zZ]|[+-]\d\d:?\d\d$/.test(text) ? text : `${text}Z`);
66
+ function placedAt(group, ms) {
67
+ const out = [];
68
+ const buf = new Float64Array(6);
69
+ for (let index = 0; index < group.count; index += 1) {
70
+ if (!group.exact(index, ms, buf))
71
+ continue;
72
+ const set = group.sets[index];
73
+ out.push({ index, name: set.OBJECT_NAME, noradId: set.NORAD_CAT_ID, at: fixedKm(buf[0], buf[1], buf[2], ms), uncertaintyKm: uncertaintyOf((ms - epochOf(set.EPOCH)) / 86_400_000) });
74
+ }
75
+ return out;
76
+ }
77
+ const scoreOf = (placed, target, by, observer, others) => {
78
+ if ("satellite" in target) {
79
+ if (!others || placed.index === target.satellite)
80
+ return null;
81
+ if (by === "space")
82
+ return { kilometres: hypot(sub(placed.at, others.at)) };
83
+ const eye = observer ? groundKm(observer, observer.heightM) : { x: norm(others.at).x * EARTH_KM, y: norm(others.at).y * EARTH_KM, z: norm(others.at).z * EARTH_KM };
84
+ const a = norm(sub(others.at, eye));
85
+ const b = norm(sub(placed.at, eye));
86
+ return { angle: (Math.acos(Math.max(-1, Math.min(1, dot(a, b)))) / RAD) };
87
+ }
88
+ if ("azimuth" in target) {
89
+ const eye = groundKm(target.observer, target.observer.heightM);
90
+ const toward = skyDirection(target.observer, target.azimuth, target.elevation);
91
+ const seen = norm(sub(placed.at, eye));
92
+ return { angle: (Math.acos(Math.max(-1, Math.min(1, dot(toward, seen)))) / RAD) };
93
+ }
94
+ const eye = groundKm(target.place, target.heightM);
95
+ if (by === "sky") {
96
+ const up = norm(eye);
97
+ const seen = norm(sub(placed.at, eye));
98
+ return { angle: (Math.acos(Math.max(-1, Math.min(1, dot(up, seen)))) / RAD) };
99
+ }
100
+ return { kilometres: hypot(sub(placed.at, eye)) };
101
+ };
102
+ function rank(rows, target, options) {
103
+ const by = options.by ?? "space";
104
+ const count = options.count ?? NEAREST_COUNT;
105
+ const self = "satellite" in target ? rows.find((row) => row.index === target.satellite) : undefined;
106
+ const hits = [];
107
+ for (const row of rows) {
108
+ const score = scoreOf(row, target, by, options.observer, self);
109
+ if (!score)
110
+ continue;
111
+ const measure = by === "sky" ? score.angle : score.kilometres;
112
+ if (measure === undefined)
113
+ continue;
114
+ if (options.within !== undefined && measure > options.within)
115
+ continue;
116
+ const neighbour = { index: row.index, name: row.name, noradId: row.noradId };
117
+ if (by === "sky")
118
+ neighbour.angle = score.angle;
119
+ else
120
+ neighbour.distance = { kilometres: score.kilometres, uncertaintyKm: row.uncertaintyKm, unit: "km" };
121
+ hits.push(neighbour);
122
+ }
123
+ hits.sort((a, b) => (a.angle ?? a.distance?.kilometres ?? 0) - (b.angle ?? b.distance?.kilometres ?? 0));
124
+ return hits.slice(0, Math.max(0, count));
125
+ }
126
+ /**
127
+ * The satellites nearest a place, a direction in the sky, or another satellite, at one moment. One SGP4 call (`exact`) for each satellite that can be placed.
128
+ * It does not run again by itself. `by: "space"` answers with kilometres; `by: "sky"` with the angle in degrees. Nearest first.
129
+ *
130
+ * @param group - The satellites, from `createSatellites`.
131
+ * @param target - A place, a direction (`azimuth`, `elevation`, `observer`), or `{ satellite: index }`.
132
+ * @param options - `date` (required), `count` (5), `within`, `by` (`"space"`), and `observer` for a satellite seen in the sky.
133
+ * @returns The neighbours, nearest first.
134
+ *
135
+ * @example
136
+ * ```ts
137
+ * import { createSatellites, nearest } from "@johnmorrisdotca/chikyu-earth/satellites";
138
+ *
139
+ * const group = createSatellites([]);
140
+ * console.log(nearest(group, { place: { lon: 0, lat: 0 } }, { date: Date.UTC(2026, 10, 2) }).length);
141
+ * ```
142
+ */
143
+ export function nearest(group, target, options) {
144
+ return rank(placedAt(group, options.date), target, options);
145
+ }
146
+ /**
147
+ * Every satellite within `radius` of a target, nearest first. Kilometres for `by: "space"`, degrees for `by: "sky"`. The same one pass as `nearest`.
148
+ *
149
+ * @param group - The satellites.
150
+ * @param target - A place, a direction, or a satellite.
151
+ * @param radius - The limit, in the unit `by` uses.
152
+ * @param options - As `nearest`, without `count` and `within`.
153
+ * @returns The neighbours inside the limit.
154
+ *
155
+ * @example
156
+ * ```ts
157
+ * import { createSatellites, within } from "@johnmorrisdotca/chikyu-earth/satellites";
158
+ *
159
+ * const group = createSatellites([]);
160
+ * console.log(within(group, { place: { lon: 0, lat: 0 } }, 1000, { date: Date.UTC(2026, 10, 2) }).length);
161
+ * ```
162
+ */
163
+ export function within(group, target, radius, options) {
164
+ return nearest(group, target, { ...options, count: group.count, within: radius });
165
+ }
166
+ /**
167
+ * The closest the two satellites come between `from` and `to`. The span is sampled every `stepMs` (60 seconds when left out), and the moment of the closest sample is then refined between its two neighbours,
168
+ * to a tenth of a second, because two satellites close in at several kilometres a second and the closest sample alone can be hundreds of kilometres too far. The uncertainty is the elements' own: the
169
+ * square root of the sum of the squares of the two satellites' rough uncertainties (1 km, and 1 km more for each day the elements have aged at that moment), not a published covariance.
170
+ * Two SGP4 calls a sample, and about 20 more for the refinement. It does not run again by itself.
171
+ *
172
+ * @param group - The satellites.
173
+ * @param a - The index of one satellite.
174
+ * @param b - The index of the other.
175
+ * @param from - The start, milliseconds since the Unix epoch.
176
+ * @param to - The end.
177
+ * @param stepMs - The sample step, at least 1000.
178
+ * @returns The closest moment, or null when either satellite cannot be placed.
179
+ *
180
+ * @example
181
+ * ```ts
182
+ * import { closeApproach, createSatellites } from "@johnmorrisdotca/chikyu-earth/satellites";
183
+ *
184
+ * const group = createSatellites([]);
185
+ * console.log(closeApproach(group, 0, 1, 0, 60_000));
186
+ * ```
187
+ */
188
+ export function closeApproach(group, a, b, from, to, stepMs = 60_000) {
189
+ const step = Math.max(1000, stepMs);
190
+ const bufA = new Float64Array(6);
191
+ const bufB = new Float64Array(6);
192
+ const apart = (at) => (group.exact(a, at, bufA) && group.exact(b, at, bufB) ? hypot(sub(fixedKm(bufA[0], bufA[1], bufA[2], at), fixedKm(bufB[0], bufB[1], bufB[2], at))) : null);
193
+ const samples = [];
194
+ for (let at = from; at <= to; at += step) {
195
+ const kilometres = apart(at);
196
+ if (kilometres !== null)
197
+ samples.push({ at, kilometres });
198
+ }
199
+ if (samples.length === 0)
200
+ return null;
201
+ let atBest = 0;
202
+ for (const [i, sample] of samples.entries())
203
+ if (sample.kilometres < samples[atBest].kilometres)
204
+ atBest = i;
205
+ let best = samples[atBest];
206
+ // between the neighbours of the closest sample the distance falls and then rises: a ternary search for the lowest point
207
+ let low = Math.max(from, (samples[atBest - 1] ?? best).at);
208
+ let high = Math.min(to, (samples[atBest + 1] ?? best).at);
209
+ while (high - low > 100) {
210
+ const left = low + (high - low) / 3;
211
+ const right = high - (high - low) / 3;
212
+ const dl = apart(left);
213
+ const dr = apart(right);
214
+ if (dl === null || dr === null)
215
+ break;
216
+ if (dl < dr)
217
+ high = right;
218
+ else
219
+ low = left;
220
+ }
221
+ const mid = Math.round((low + high) / 2);
222
+ const refined = apart(mid);
223
+ if (refined !== null && refined < best.kilometres)
224
+ best = { at: mid, kilometres: refined };
225
+ const age = (index) => {
226
+ const epoch = epochOf(group.sets[index].EPOCH);
227
+ return uncertaintyOf((best.at - epoch) / 86_400_000);
228
+ };
229
+ return { at: best.at, kilometres: best.kilometres, uncertaintyKm: Math.hypot(age(a), age(b)) };
230
+ }
231
+ /**
232
+ * The slant range from a place to a satellite that is straight overhead, for a test or a page: it is the satellite's height. Positions are kilometres in one frame.
233
+ *
234
+ * @param heightKm - How far above the ground the satellite is.
235
+ * @returns The distance, which is `heightKm`.
236
+ *
237
+ * @example
238
+ * ```ts
239
+ * import { overheadKm } from "@johnmorrisdotca/chikyu-earth/satellites";
240
+ *
241
+ * console.log(overheadKm(420));
242
+ * ```
243
+ */
244
+ export function overheadKm(heightKm) {
245
+ const ground = groundKm({ lon: 0, lat: 0 });
246
+ const up = norm(ground);
247
+ const sat = { x: up.x * (EARTH_KM + heightKm), y: up.y * (EARTH_KM + heightKm), z: up.z * (EARTH_KM + heightKm) };
248
+ return hypot(sub(sat, ground));
249
+ }
@@ -7,6 +7,7 @@ import { type Place, type PlaceLook } from "../markers/places.ts";
7
7
  import { type CityNamesStyle } from "../cities/host.ts";
8
8
  import { type BorderSets } from "../borders/lines.ts";
9
9
  import type { BorderData, BorderStats } from "../borders/layer.ts";
10
+ import { type RouteLeg } from "../route.ts";
10
11
  import type { GridStats } from "../grid/layer.ts";
11
12
  import { type CountryNamesStats, type CountryNamesStyle } from "../country-names/host.ts";
12
13
  import type { TileStats } from "../realistic/tile-set.ts";
@@ -14,7 +15,8 @@ import { setThreeLoader } from "../realistic/shared.ts";
14
15
  import type { LightMode } from "../realistic/earth.ts";
15
16
  import type { SatelliteInfo, SatelliteRef, Satellites } from "../satellites/types.ts";
16
17
  import { type PlanetName } from "./ephemeris.ts";
17
- import { type SatelliteStyle } from "./satellite-layer.ts";
18
+ import { type SatelliteScreen, type SatelliteStyle } from "./satellite-layer.ts";
19
+ import { type SatelliteOthers } from "./satellite-focus.ts";
18
20
  import { type RideFace, type RideLook } from "./ride.ts";
19
21
  import { type ScaleMode } from "./scale.ts";
20
22
  import { BODY_NAMES, type CameraMode, type BodyName, type BodyPainter, type RideTarget, type SatellitePainter } from "./scene.ts";
@@ -260,6 +262,38 @@ export declare class ChikyuSpace extends HTMLElement {
260
262
  */
261
263
  get places(): Place[];
262
264
  set places(value: readonly Place[]);
265
+ /**
266
+ * Name each `here` place with the nearest city (the attribute `here-city`). `false` (the default) leaves the page's label and loads nothing.
267
+ * `true` looks within 100 km (`HERE_CITY_KM`). A number is that limit in kilometres, at most 20,000 (`HERE_CITY_MAX_KM`); a city further away is not used, and the page's label stays.
268
+ * The cities are kuni's capitals, the other cities of a million and the others of 100,000, an optional peer loaded only when this is on and a `here` place is set. The name follows the page's language
269
+ * (the short Japanese name, then the Japanese name, else English). `places` is not changed: only the drawn name is. Nothing is drawn again at rest.
270
+ *
271
+ * @example
272
+ * ```ts no-run
273
+ * import type { ChikyuSpace } from "@johnmorrisdotca/chikyu-earth/space/element";
274
+ *
275
+ * const space = document.querySelector("chikyu-space") as ChikyuSpace;
276
+ * space.hereCity = true;
277
+ * console.log(space.hereCity); // 100
278
+ * space.hereCity = false;
279
+ * ```
280
+ */
281
+ get hereCity(): false | number;
282
+ set hereCity(value: false | true | number);
283
+ /**
284
+ * A route between two places (the attribute `route`, `lon,lat,lon,lat`). Null, the default, draws none. The line is the WGS84 geodesic, split at the date line, and it turns with the Earth.
285
+ * Setting the property writes the attribute. Nothing is drawn again at rest: the line is drawn with the picture, and only when the route or the view changes.
286
+ */
287
+ get route(): {
288
+ from: GeoPoint;
289
+ to: GeoPoint;
290
+ } | null;
291
+ set route(value: {
292
+ from: GeoPoint;
293
+ to: GeoPoint;
294
+ } | null);
295
+ /** The distance, bearings and flight-time estimate for `route`, or null when none is set. The flight time assumes 900 km/h. */
296
+ get routeInfo(): RouteLeg | null;
263
297
  /**
264
298
  * Turn the view so a place of `places` is in the middle, at a pace a reader can follow (at once with `smooth: false`, for a reader who asked for less motion, or before the picture is live); the zoom stays.
265
299
  * The place is named by its `id`, or by its label in any case. The camera must be looking at the Earth: while it rides along or looks at another body nothing moves. The tilt is held to 90 degrees either
@@ -449,12 +483,36 @@ export declare class ChikyuSpace extends HTMLElement {
449
483
  setSatellites(group: string, satellites: Satellites | null, style?: Partial<SatelliteStyle>): void;
450
484
  /** Show or hide a group without losing it. */
451
485
  showSatellites(group: string, on: boolean): void;
452
- /** The groups now set, with how many satellites each holds and whether it is shown. */
486
+ /**
487
+ * The groups now set. `count` is how many satellites the group holds, `visible` is the shown state from `showSatellites` (a focus does not change it), `placed` is how many the last draw placed (0 when the group is not drawn) and `emphasis` is how a focus treats it: `focus`, `dim`, `hidden` or `plain` (no focus).
488
+ */
453
489
  get satelliteGroups(): {
454
490
  name: string;
455
491
  count: number;
456
492
  visible: boolean;
493
+ placed: number;
494
+ emphasis: "focus" | "dim" | "hidden" | "plain";
457
495
  }[];
496
+ /** The group `focusSatelliteGroup` is showing on its own, or `null`. */
497
+ get focusedSatelliteGroup(): string | null;
498
+ /**
499
+ * Show one group on its own. The others are drawn dimmer (`others: "dim"`, the default, through the same dimming an old element set uses) or not drawn (`"hide"`). `frame` (true by default) pulls the camera back, by this view's own zoom, until the group's orbits fit: the distance is the greatest apogee of the group, from each satellite's mean motion and eccentricity, and it stops at 8 Earth radii. `null` puts every group back to the shown state it had, and puts the camera back when it was moved. A name that `setSatellites` has not set returns `{ ok: false, reason: "not-set" }` and changes nothing. It does not throw. When the choice changes, `chikyu-satellite-focus` is sent with `{ group, count }`.
500
+ *
501
+ * @param name - The group's name, or `null` to clear the focus.
502
+ * @param options - `others` and `frame`.
503
+ * @returns `{ ok: true, group, count }` when the group is set (`group` is `null` and `count` is 0 when cleared). `{ ok: false, reason: "not-set" }` when it is not.
504
+ */
505
+ focusSatelliteGroup(name: string | null, options?: {
506
+ others?: SatelliteOthers;
507
+ frame?: boolean;
508
+ }): {
509
+ ok: true;
510
+ group: string | null;
511
+ count: number;
512
+ } | {
513
+ ok: false;
514
+ reason: "not-set";
515
+ };
458
516
  /** Mark one satellite: a larger ring round it, its orbit drawn, and its name beside it. `null` lets it go. */
459
517
  selectSatellite(ref: SatelliteRef | null): void;
460
518
  /** The satellite marked by `selectSatellite` or by a press on it, if any. */
@@ -468,6 +526,12 @@ export declare class ChikyuSpace extends HTMLElement {
468
526
  * @param on - `true` to ring and name its members (the default), `false` to stop.
469
527
  */
470
528
  labelSatellites(group: string, on?: boolean): void;
529
+ /**
530
+ * Ring and name these satellites, besides any group `labelSatellites` names. Pass an empty list to take them off. One draw, then nothing at rest.
531
+ *
532
+ * @param refs - The satellites, by group and index, as `setSatellites` knows them.
533
+ */
534
+ ringSatellites(refs: readonly SatelliteRef[]): void;
471
535
  /** The groups whose satellites are ringed and named now (`labelSatellites`). */
472
536
  get labelledSatellites(): string[];
473
537
  /**
@@ -476,15 +540,9 @@ export declare class ChikyuSpace extends HTMLElement {
476
540
  get satelliteNames(): Record<number, string>;
477
541
  set satelliteNames(value: Record<number, string>);
478
542
  /**
479
- * Where a satellite is on the screen as of the last draw: `{ x, y, visible, heightKm }` in CSS pixels from the view's top left, `visible` meaning it is inside the box and not behind the Earth. `null` when its group is not set or not shown, it cannot be
480
- * placed (its elements are too old), or it is behind the camera. It is the picture's own camera maths and its own test for the Earth in the way, so a page that draws its own rings need not repeat either.
543
+ * Where a satellite is on the screen as of the last draw: `{ x, y, visible, heightKm, edge, behind }` in CSS pixels from the view's top left. `visible` means it is inside the box, in front of the camera and not behind the Earth. `edge` is `top`, `right`, `bottom` or `left` when the place lies beyond that edge, and `null` when it is inside the box. `behind` is true when it is behind the camera (the picture would mirror it, so `edge` is read from the camera's own axes). `x` and `y` may lie outside the box. `null` when its group is not set or not shown, or it cannot be placed (its elements are too old). It is the picture's own camera maths and its own test for the Earth in the way, so a page that draws its own rings, or a mark on the edge, need not repeat either.
481
544
  */
482
- placeSatellite(ref: SatelliteRef): {
483
- x: number;
484
- y: number;
485
- visible: boolean;
486
- heightKm: number;
487
- } | null;
545
+ placeSatellite(ref: SatelliteRef): SatelliteScreen | null;
488
546
  /** Facts about one satellite at the moment shown (name, number, element age, height, speed, period, and `ownerCountry` when the owner is one country); undefined if it cannot be placed then. */
489
547
  satelliteInfo(ref: SatelliteRef): SatelliteInfo | undefined;
490
548
  /** The words shown beside each body, for a page in another language (`{ Mars: "火星" }`). A body left out keeps its English name. */
@@ -528,7 +586,7 @@ export declare class ChikyuSpace extends HTMLElement {
528
586
  quaternion: [number, number, number, number];
529
587
  fov: number;
530
588
  };
531
- /** What the body painter has made at the last draw: the Sun and planets with a drawing, the moons shown round a planet that is near and the moons held (shown, or gone from the view for less than four seconds), whether the Moon is the painter's (`moon`), and the bodies with finer map tiles on them (`tiles`). */
589
+ /** What the body painter has made at the last draw: the Sun and planets with a drawing, the moons shown round a planet that is near and the moons held (shown, or gone from the view for less than four seconds), whether the Moon is the painter's (`moon`), and the bodies with finer map tiles on them (`tiles`). `mapped` is how many drawings are the painter's, with its pictures: a body out of the view, or too small to show its map, is a plain sphere and the painter is not asked for it. `pending` is how many pictures asked of the painter have not yet arrived, and one more while a gathered draw (reduced motion) waits for its second: while it is above 0 a draw is still to come that nothing but the view itself asked for. */
532
590
  bodies: {
533
591
  look: string;
534
592
  painted: number;
@@ -536,6 +594,8 @@ export declare class ChikyuSpace extends HTMLElement {
536
594
  held: number;
537
595
  moon: boolean;
538
596
  tiles: number;
597
+ mapped: number;
598
+ pending: number;
539
599
  };
540
600
  /** The meteors: whether they are on, the streaks alive now and started so far, the streaks a second being drawn, and the strongest active shower's code and rate. */
541
601
  meteors: {
@@ -599,6 +659,13 @@ export declare class ChikyuSpace extends HTMLElement {
599
659
  dots: number;
600
660
  omitted: number;
601
661
  };
662
+ /** The nearest city on a `here` marker (`here-city`): whether it is on, the kilometre limit (0 when off), whether kuni's cities have arrived, and whether that load is still going. */
663
+ hereCity: {
664
+ on: boolean;
665
+ maxKm: number;
666
+ loaded: boolean;
667
+ pending: boolean;
668
+ };
602
669
  /** The names of cities: whether `city-names` is set and the most it asks for, the Earth's radius on the screen, the tiers of kuni's cities that have arrived and how many cities, the names shown at the last draw and how many times the layer was drawn. */
603
670
  cityNames: {
604
671
  on: boolean;
@@ -613,6 +680,13 @@ export declare class ChikyuSpace extends HTMLElement {
613
680
  borders: BorderStats;
614
681
  /** The grid: whether it was drawn at the last draw, whether every 15 degrees (else 30), its segments then, how many times its lines were made, and whether it could not be made. */
615
682
  grid: GridStats;
683
+ /** The route between two places: whether one is set, and its geodesic distance, great-circle distance and flight time at 900 km/h. */
684
+ route: {
685
+ on: boolean;
686
+ kilometres: number;
687
+ greatCircleKm: number;
688
+ flightHours: number;
689
+ };
616
690
  /** The names of countries: whether `country-names` is set and the most it asks for, the countries loaded, the names shown at the last draw, how many times they were laid out, and whether the outlines could not be loaded. */
617
691
  countryNames: CountryNamesStats;
618
692
  };