mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-22 03:02:20 +00:00
refactor(launches,cctv,alpr): take vector maths from src/geo
Launches selection/replay/panel/policy/policyHelpers/state/camera, CCTV geometry/model/projection/navigation/cards/geometryQueue/state and ALPR model/visuals now use src/geo for Math, Cartesian2/3, Cartographic, Matrix3/4, Quaternion and ENU frames. launches/paths.js keeps Cesium (EllipsoidGeodesic). In camera.js, EllipsoidGeodesic, BoundingSphere.fromPoints/union and the BoundingSphere constructor stay on Cesium; the geo Cartographics passed into EllipsoidGeodesic are only read field by field and cloned there (computeProperties). The CCTV plane orientation stays a Cesium Quaternion and plane dimensions a Cesium Cartesian2 (entity ConstantProperty values). launches-layer and alpr-cameras own the src/geo files.
This commit is contained in:
1 parent
ee8b94d987
commit
a915bdb3e5
17 files changed
+215
-214
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import * as Cesium from 'cesium';
|
||||
import * as geo from '../../geo/index.js';
|
||||
import { CCTV_FOCUS_RESULT } from './policy.js';
|
||||
|
||||
export function createNavigation({
|
||||
@@ -15,8 +16,8 @@ export function createNavigation({
|
||||
function nearestCameraIdToViewer() {
|
||||
const carto = layerState._viewer?.camera?.positionCartographic;
|
||||
if (!carto || !layerState._records.length) return null;
|
||||
const lat = Cesium.Math.toDegrees(carto.latitude);
|
||||
const lon = Cesium.Math.toDegrees(carto.longitude);
|
||||
const lat = geo.math.toDegrees(carto.latitude);
|
||||
const lon = geo.math.toDegrees(carto.longitude);
|
||||
|
||||
let best = null;
|
||||
for (const record of layerState._records) {
|
||||
|
||||
Reference in new issue
Block a user