fix(cockpit): the swath waits for the eased view to reach the Earth, not only the look target

This commit is contained in:
Sameh Khamis committed 2026-11-08 15:55:02 -08:00
1 parent 85d0f84066
commit e968233a52
1 file changed
+10 -2
+10 -2
View File
@@ -415,8 +415,16 @@ export function publishOrbitalView(info, transition = IDLE_TRANSITION) {
? lookTilt(orbitalLookReadoutParts(state.lookTarget))
: null;
const swathScale = offset ? offNadirSwathScale(tilt) : 1;
// Tilted past the limb, the view's centre looks into space: no swath.
const seesEarth = !offset || offNadirCentreMeetsEarth(info.altitudeM, tilt);
// 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.
const seesEarth =
!offset ||
(offNadirCentreMeetsEarth(info.altitudeM, tilt) &&
offNadirCentreMeetsEarth(info.altitudeM, {
northDeg: state.lookView?.pitchDeg ?? 0,
eastDeg: state.lookView?.yawDeg ?? 0,
}));
this.publishOrbital({
name: info.name,
classLabel: info.classLabel || '',