feat(satellites): file satellites under six classes with a toggle each

The satellites layer now sorts every object into Stations, Imaging,
Telecom, Starlink, Probes or Debris, each with a chip and a live count on
the layer row. Stations and Imaging show by default; the Starlink chip is
the former DENSE catalog switch. Hidden classes keep their points, so a
toggle needs no reload, and they leave the detection overlay and the voice
position lists.

A class comes, strongest evidence first, from CelesTrak SATCAT (object type
and status, served by a new /api/celestrak-satcat/<group> proxy route and
cached for a day), the bundled UCS Satellite Database pack (operator, owner
country and purpose), name patterns for later launches, and the CelesTrak
group. The core catalog also reads the resource, weather, planet, sar and
science groups. Payloads with no evidence of life launched 20 or more years
ago are filed as debris. The UCS pack, its build script and its data credit
are added.
This commit is contained in:
Denis Groshev committed 2026-11-08 23:34:55 +01:00
1 parent 1b9bb844e6
commit c56f098d07
44 files changed
+2530 -362

No files matched your search

+45 -3
View File
@@ -1,12 +1,16 @@
import * as Cesium from 'cesium';
import { satelliteClassColor } from '../../data/satelliteClass.js';
import { SATELLITE_CLASS_DISPLAY, SATELLITE_CLASS_IDS } from './classes.js';
/**
* Satellite Orbits — Real-time positions via CelesTrak TLE + SGP4 propagation.
*
* Loads six CelesTrak groups (~840 sats): stations, visual, GPS, GLONASS,
* Galileo, and the geosynchronous belt. Optional dense mode (setParams
* catalog:'dense') adds the Starlink shell as points-only extras.
* Loads eleven CelesTrak groups: stations, visual, GPS, GLONASS, Galileo, the
* geosynchronous belt, and the Earth resources, weather, Planet, SAR and
* science groups. Each object is filed under one of six classes
* (src/layers/satellites/classes.js) whose visibility the layer row toggles; dense mode
* (setParams catalog:'dense', the STARLINK toggle) adds the Starlink shell as
* points-only extras.
* Renders positions via PointPrimitiveCollection, orbital paths as polylines.
* Click any satellite to track it with camera follow + orbital path.
*
@@ -49,6 +53,13 @@ export const CATALOG_GROUPS = [
{ tag: 'glonass', path: 'glo-ops' },
{ tag: 'galileo', path: 'galileo' },
{ tag: 'geo', path: 'geo' },
// Earth observation launched after the UCS snapshot, and science probes.
// Each object's class comes from src/layers/satellites/classes.js, not its group.
{ tag: 'resource', path: 'resource' },
{ tag: 'weather', path: 'weather' },
{ tag: 'planet', path: 'planet' },
{ tag: 'sar', path: 'sar' },
{ tag: 'science', path: 'science' },
];
// Dense-catalog mode (setParams({ catalog: 'dense' })): Starlink shell as
@@ -157,6 +168,37 @@ export const POINT_STYLES = {
},
};
const CLASS_COLORS = Object.fromEntries(
SATELLITE_CLASS_IDS.map((id) => [
id,
Cesium.Color.fromCssColorString(SATELLITE_CLASS_DISPLAY[id].color),
]),
);
const _classStyles = new Map();
/**
* A satellite's point style: its group's size and outline, in its class's
* colour (src/layers/satellites/classes.js), so the dots match the class legend and
* toggles. Styles are shared per group and class.
* @param {string|undefined} group Catalog group tag.
* @param {string|undefined} satelliteClass Class id.
*/
export function classPointStyle(group, satelliteClass) {
const base = POINT_STYLES[group] || POINT_STYLES.visual;
const color = CLASS_COLORS[satelliteClass];
if (!color) return base;
const key = `${group}|${satelliteClass}`;
let style = _classStyles.get(key);
if (!style) {
style = Object.freeze({
...base,
color: group === 'dense' ? color.withAlpha(0.9) : color,
});
_classStyles.set(key, style);
}
return style;
}
/**
* Physically DOCKED vehicles are separate real tracks sharing one position: the
* station and everything berthed to it sit within metres of each other. Their