ISS live telemetry, STATION and LIVE sections, Tiangong model, drawn through the renderer's draw port

Builds on the ISS 3D model (PR #1690) and brings it onto main's renderer
seam: the station models are items of a `models` draw set, posed by
heading, pitch and roll from the station's flight axes
(`headingPitchRollOfAxes`), with the camera, canvas and clicks read from
the renderer's ports; no satellites file reaches Cesium. The joint drivers
write column-major matrices into node poses the model part keeps, for a
renderer that can pose nodes; until the draw contract has that member the
models draw rigid.

- ISS joints take their angles from NASA's ISSLive telemetry, relayed by
  the server behind ISS_TELEMETRY_ENABLED.
- STATION and LIVE sections of Context replace the floating command panel
  and player; both collapse like the Radio section.
- Cockpit rides the ISS from mounts on its model; the LIVE page in the
  Cockpit briefing.
- Tiangong as a second station model, with computed joints.
- Installations: a label-box click selects the site.
This commit is contained in:
Denis Groshev committed 2026-11-16 18:39:39 +01:00
1 parent fd3ca679ec
commit 9cc077964f
103 files changed
+12033 -1775

No files matched your search

+36 -6
View File
@@ -115,8 +115,19 @@ function sitePosition(site) {
: null;
}
/** The mapped site a canvas position shows, through the layer's picks. */
/**
* The mapped site a canvas position shows: through the layer's own lookup
* where it has one (`findAt`: the dot, the site entity or the label box the
* overlay paints, which is what a click lands on from orbit), else through
* its pick ids.
*/
function siteAt(controller, position) {
try {
const found = sitesLayer(controller)?.findAt?.(position) ?? null;
if (found) return found;
} catch {
// Fall through to the pick ids.
}
let picked = null;
try {
picked = findQuery(controller.viewer)?.pick(position.x, position.y) ?? null;
@@ -297,15 +308,26 @@ export function routeSceneClick() {
* held from its last record). Also rebuilds
* the orbital Live Signals rows on their own clock.
* @param {object} state The orbital session.
* @param {{direction: object, up: object, right: object}} nadir This
* frame's nadir frame.
* @param {{x: number, y: number, z: number}} position The satellite, ECEF.
* @param {{direction: object, up: object, right: object}} nadir The frame
* the look turns about this frame: the nadir one, or a station view's.
* @param {{x: number, y: number, z: number}} position Where the camera is,
* ECEF: the satellite, or the station view's point on it.
* @param {number} nowMs
* @param {{direction: object, up: object, right: object}|null} [trueNadir]
* The nadir frame when `nadir` is a station view's: the rows still word
* their angles from straight down.
* @returns {boolean} True when it placed `state.lookView` itself.
*/
export function updateOrbitalFocus(state, nadir, position, nowMs) {
export function updateOrbitalFocus(
state,
nadir,
position,
nowMs,
trueNadir = null,
) {
state.focusFrame = {
nadir,
trueNadir,
position: { x: position.x, y: position.y, z: position.z },
};
// After a satellite switch the first frame on the new satellite (the hop
@@ -459,13 +481,21 @@ export function orbitalSitesInReach(info) {
});
state.listedSites = remembered;
const focusKey = state.focus?.key ?? null;
const positions = new Map(candidates.map((c) => [c.key, c.position]));
// Reach is measured about the frame the look turns in; the angle shown
// is always from straight down, also from a station view.
const shownOffNadir = (key, offNadirDeg) => {
if (!frame.trueNadir) return offNadirDeg;
const look = focusLook(frame.trueNadir, frame.position, positions.get(key));
return Number.isFinite(look?.offNadirDeg) ? look.offNadirDeg : offNadirDeg;
};
return {
entries: pointsInReach(candidates, {
nadir: frame.nadir,
satellite: frame.position,
}).map(({ key, offNadirDeg }) => ({
site: byId.get(key),
offNadirDeg,
offNadirDeg: shownOffNadir(key, offNadirDeg),
focused: key === focusKey,
})),
};