feat(cockpit): keep the orbital camera on a ground target

In the satellite orbital view a single click on a mapped ground point (a
ground point of a layer that is on, such as a Mapped Installations site, a
fire or a local data pack feature) keeps the camera on it. Each frame the
look is aimed from the satellite's position to the point's Earth-fixed
position in the track-up nadir frame the arrows tilt, so the point stays
at the centre as the satellite moves. The swing onto the point, or between
points, uses the arrows' easing on a slower clock and then holds the point
exactly; reduced motion cuts.

A click elsewhere, FOCUS on the focused point, NADIR, Home or 0 ends the
focus and the view eases back to nadir; an arrow ends it and tilts on from
where the view is. The focus also ends, easing back, when the point leaves
the ±45° reach or the satellite's horizon, when its layer is turned off or
its record is dropped, and with the view. While focused the readout gives
the single off-nadir angle to the point (OFF-NADIR 23.4°), names it in a
polite live region, and the swath reads approximate as for a tilt. Clicks
still reach Cesium's own handler and never untrack the satellite; a click
a tool owns is ignored.

Under the readout, IN REACH lists the mapped points facing the satellite
that are within the reach or in the frame, nearest to nadir first and at
most 12, rebuilt once a second. A row opens the point's position, source
and OpenStreetMap tags (or its layer's properties); FOCUS focuses it,
switches to it, or ends the focus held on it, and is unavailable for a
point in frame but beyond the reach.
This commit is contained in:
Denis Groshev committed 2026-11-09 01:56:29 +01:00
1 parent 745c11969b
commit 567c833582
24 files changed
+2132 -19

No files matched your search

+23 -2
View File
@@ -93,7 +93,8 @@ export const useCockpitStore = defineStore('gev-cockpit', () => {
* zoom, zoomSteps: number[], maxZoom, footprintKm|null,
* sensor: { label|null, swathKm, stripFraction|null, zoom|null }|null,
* transition: { active, blurPx, lockTick },
* look: { offset, readout, swathScale, swathKm|null }, trackUp, northDeg,
* look: { offset, readout, swathScale, swathKm|null,
* focus: { key, label }|null }, trackUp, northDeg,
* place: { kind: 'country'|'sea'|'ocean', name, countryCode,
* division?|null, near?|null }|null|undefined,
* noradId|null, cosparId|null, tle: { line1, line2, epochMs }|null,
@@ -117,7 +118,9 @@ export const useCockpitStore = defineStore('gev-cockpit', () => {
* src/cockpitOrbital.js), `look` says whether the view is tilted off
* nadir and words the tilt (`readout`, '' at nadir), with the approximate
* ground width at the tilted view's centre (`swathKm`, null at nadir) and
* its ratio to the nadir footprint (`swathScale`, 1 at nadir), `trackUp`
* its ratio to the nadir footprint (`swathScale`, 1 at nadir) and the
* mapped point a ground focus holds the view on (`focus`; the readout
* then gives the single off-nadir angle to it), `trackUp`
* whether the view is turned to the ground track (false for a satellite with none,
* which stays north-up) and `northDeg` where north sits, in degrees
* clockwise from the top (0 when north-up).
@@ -129,6 +132,22 @@ export const useCockpitStore = defineStore('gev-cockpit', () => {
orbital.value = next && markRaw(next);
}
/**
* The mapped points the orbital view shows or can be turned to: null
* outside orbit. Shape: `{ count, focusKey|null, entries: [{ key, label,
* layerName, source, latitude, longitude, offNadirDeg, reachable,
* focused, osm, details: [{ key, value }] }] }`, nearest to nadir first
* and at most 12 (`count` is all of them); `reachable` is false for a
* point in the frame but beyond the off-nadir reach, `osm` marks details
* that are OpenStreetMap tags (src/ui/cockpitOrbitalFocus.js).
*/
const orbitalReach = shallowRef(null);
/** @param {?object} next A fresh list of the mapped points in reach. */
function publishOrbitalReach(next) {
orbitalReach.value = next && markRaw(next);
}
/**
* The utility strip's measured layout: its top and height limits as CSS
* lengths (null leaves the stylesheet's), whether only the expanded control
@@ -168,6 +187,8 @@ export const useCockpitStore = defineStore('gev-cockpit', () => {
publishRadar,
orbital,
publishOrbital,
orbitalReach,
publishOrbitalReach,
utilityLayout,
publishUtilityLayout,
};