fix(cockpit): the limb check reads the exact look angles; the lease note names both ways back to Recent Imagery

This commit is contained in:
Sameh Khamis committed 2026-11-08 15:55:02 -08:00
1 parent e968233a52
commit 3bf7e9edb7
2 files changed
+9 -2

No files matched your search

+7 -1
View File
@@ -22,6 +22,7 @@ import {
zoomTransitionState,
} from '../cockpitOrbital.js';
import {
clampOrbitalLook,
easeLook,
lookIsOffset,
orbitalLookReadoutParts,
@@ -418,9 +419,14 @@ export function publishOrbitalView(info, transition = IDLE_TRANSITION) {
// Tilted past the limb, the view's centre looks into space: no swath. The
// camera eases toward the target, so both must meet the Earth; the HUD
// republishes on its cadence, so the swath appears once the view arrives.
// Exact angles here, not the whole degrees the readout rounds to.
const target = clampOrbitalLook(state.lookTarget);
const seesEarth =
!offset ||
(offNadirCentreMeetsEarth(info.altitudeM, tilt) &&
(offNadirCentreMeetsEarth(info.altitudeM, {
northDeg: target.pitchDeg,
eastDeg: target.yawDeg,
}) &&
offNadirCentreMeetsEarth(info.altitudeM, {
northDeg: state.lookView?.pitchDeg ?? 0,
eastDeg: state.lookView?.yawDeg ?? 0,