mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Merge branch 'main' into sameh/vessel-photos
This commit is contained in:
10 files changed
+151
-10
No files matched your search
@@ -29,6 +29,7 @@ export const writeCalibrationStoreV2 = layer.writeCalibrationStoreV2;
|
||||
export const deriveCalBadge = layer.deriveCalBadge;
|
||||
export const computeFrustumGeometry = layer.computeFrustumGeometry;
|
||||
export const activationProbeClampRange = layer.activationProbeClampRange;
|
||||
export const flatGroundAxisDistance = layer.flatGroundAxisDistance;
|
||||
export const frameSignatureFromPixels = layer.frameSignatureFromPixels;
|
||||
export const _createCctvProjectionPlaneForTest =
|
||||
layer._createCctvProjectionPlaneForTest;
|
||||
|
||||
@@ -35,6 +35,7 @@ import cctvLayer, {
|
||||
_pushAmbientCardEntriesForTest,
|
||||
_setCctvOverlayHostForTest,
|
||||
activationProbeClampRange,
|
||||
flatGroundAxisDistance,
|
||||
bindCctvWorldClickGesture,
|
||||
clearProbeClampOnDeactivation,
|
||||
computeFrustumGeometry,
|
||||
@@ -655,6 +656,17 @@ test('activation obstruction clamp uses the field-derived 12 m floor', () => {
|
||||
assert.equal(activationProbeClampRange(210, 250), null);
|
||||
});
|
||||
|
||||
test('on a globe map the axis ends on flat ground at the mount ground', () => {
|
||||
// A 24 m mount pitched 30° down meets the ground 48 m along its axis.
|
||||
assert.ok(Math.abs(flatGroundAxisDistance(24, -30) - 48) < 1e-9);
|
||||
// The default 700 m range then clamps just short of that, not 700 m out.
|
||||
const clamp = activationProbeClampRange(700, flatGroundAxisDistance(24, -30));
|
||||
assert.ok(Math.abs(clamp - 44) < 1e-9);
|
||||
assert.equal(flatGroundAxisDistance(24, 0), null);
|
||||
assert.equal(flatGroundAxisDistance(24, 10), null);
|
||||
assert.equal(flatGroundAxisDistance(0, -30), null);
|
||||
});
|
||||
|
||||
test('deactivation clears the probe clamp and restores nominal frustum geometry', () => {
|
||||
const record = {
|
||||
camera: { ...UNCLAMPED_CAMERA },
|
||||
|
||||
Reference in new issue
Block a user