refactor(vessels,satellites,awareness): take vector maths from src/geo

Moves the Cartesian3/Cartographic/Matrix3/Matrix4/Math calls of the vessel, satellite and Contacts (awareness) layers, plus flights controller/enrichment, to src/geo. The satellites-layer package boundary now owns the src/geo modules. Awareness keeps Cesium.Cartesian3.clone for the resolved subject position, which reaches the installations anchor (anchor.test pins a Cesium instance).
This commit is contained in:
German Khokhlov committed 2026-10-15 00:17:17 +04:00
1 parent 1a69368ae6
commit 2b83606765
15 files changed
+97 -86

No files matched your search

+5 -5
View File
@@ -1,4 +1,4 @@
import * as Cesium from 'cesium';
import * as geo from '../../geo/index.js';
export function createState({ services }) {
const { setOverlayEntries, setOverlaySourceVisible, clearOverlaySource } =
@@ -58,7 +58,7 @@ export function createState({ services }) {
state._activeFocusCount = 0;
state._scratchFocusScreen = new Cesium.Cartesian2();
state._scratchFocusScreen = geo.cartesian2.create();
state._enabled = false;
@@ -141,7 +141,7 @@ export function createState({ services }) {
state._trackedFrameGeo = null;
// { longitude, latitude, altitude } or null
state._trackedFrameCartesian = new Cesium.Cartesian3();
state._trackedFrameCartesian = geo.cartesian3.create();
/** Optional deterministic clock used only by the production-frame test seam. */
@@ -149,9 +149,9 @@ export function createState({ services }) {
// Scratch variables
state._scratchCartesian = new Cesium.Cartesian3();
state._scratchCartesian = geo.cartesian3.create();
state._scratchRingRotation = new Cesium.Matrix3();
state._scratchRingRotation = geo.matrix3.create();
/** Update the explicit model only when the rounded altitude line changes. */
/** Epoch of the last shared-context refresh for the tracked satellite. */