Merge Core main into denis/gev-sensor-zoom

# Conflicts:
#	src/cockpitOrbital.test.mjs
This commit is contained in:
Sameh Khamis committed 2026-11-08 16:20:37 -08:00
commit 9a16fb8cbc
111 files changed
+4022 -207

No files matched your search

+15
View File
@@ -448,6 +448,21 @@ export function offNadirAngleDeg({ northDeg = 0, eastDeg = 0 } = {}) {
return (Math.acos(cosine) * 180) / Math.PI;
}
/**
* Whether the view's centre, tilted off nadir, still meets the Earth: its
* angle from nadir (`offNadirAngleDeg`) is within the Earth's angular radius
* from the satellite, asin(R / (R + altitude)).
* @param {number} altitudeM
* @param {{northDeg?: number, eastDeg?: number}} [offset]
* @returns {boolean}
*/
export function offNadirCentreMeetsEarth(altitudeM, offset = {}) {
if (!Number.isFinite(altitudeM) || altitudeM <= 0) return false;
const R = ORBITAL_EARTH_RADIUS_M;
const limbDeg = (Math.asin(R / (R + altitudeM)) * 180) / Math.PI;
return offNadirAngleDeg(offset) < limbDeg;
}
/**
* Roughly how much wider the ground across the frame is at the centre of a
* tilted view than at nadir, on a flat Earth: tilting across the frame (east,