mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
feat(cockpit): zoom the orbital view to the imaging sensor's swath
An imaging satellite with a known sensor can now zoom past 8x, up to 128x, as far as the view stays at least as wide as the sensor's narrowest standard swath at its live altitude; only swaths confirmed on a cited page open those steps. The top step follows the altitude and window shape and steps back when it falls below the zoom shown. The view draws the sensor's swath to scale along the ground track with a SENSOR SWATH readout (approximate off nadir), and a SENSOR button zooms to exactly that width when it lies in range at nadir. From 16x the imagery tiles the view will need 5 to 20 s ahead along the ground track are pre-loaded at the matching level. The mouse wheel steps the zoom one notch at a time, and the identity line shows how old the TLE is. The sensor figures come from a new bundled pack of 46 Earth-observation platforms, each value cited to its operator or agency, with its own data credit.
This commit is contained in:
1 parent
d0ef5250ac
commit
fe5470a852
39 files changed
+1985
-31
No files matched your search
@@ -4,6 +4,7 @@ import { msg } from '../../i18n/index.js';
|
||||
import { noradIdFromSatnum, tleLineLaunchYear } from '../../sources/tle.js';
|
||||
import { CATALOG_GROUPS, ISS_NORAD, POINT_STYLES } from './policy.js';
|
||||
import { classifySatellite, parseSatcatCsv } from './classes.js';
|
||||
import { matchImagingSensor } from './sensors.js';
|
||||
|
||||
/**
|
||||
* How long a catalog rebuild waits for SATCAT before it classifies without
|
||||
@@ -26,20 +27,38 @@ export function createIngestion({
|
||||
source,
|
||||
}) {
|
||||
/**
|
||||
* The local pack the classes are read from: the UCS pack. It is not needed
|
||||
* to render: a failed read leaves the last pack (or none) and
|
||||
* classification falls back to names and groups.
|
||||
* The local packs the classes and zoom steps are read from: the UCS pack
|
||||
* and the imaging-sensor pack. Neither is needed to render: a failed read
|
||||
* leaves the last pack (or none) and classification falls back to names
|
||||
* and groups.
|
||||
*/
|
||||
async function _readLocalEvidence() {
|
||||
if (layerState._ucs) return;
|
||||
const pack = await Promise.resolve()
|
||||
.then(() => source.readUcs?.())
|
||||
.then((loaded) => (loaded instanceof Map ? loaded : null))
|
||||
.catch((error) => {
|
||||
console.warn('[Data:Satellites] UCS pack unavailable:', error);
|
||||
return null;
|
||||
});
|
||||
const ucs = layerState._ucs
|
||||
? Promise.resolve(layerState._ucs)
|
||||
: Promise.resolve()
|
||||
.then(() => source.readUcs?.())
|
||||
.then((pack) => (pack instanceof Map ? pack : null))
|
||||
.catch((error) => {
|
||||
console.warn('[Data:Satellites] UCS pack unavailable:', error);
|
||||
return null;
|
||||
});
|
||||
// The sensor pack only adds zoom steps in the orbital view; without it
|
||||
// every satellite keeps the base steps.
|
||||
const sensors = layerState._sensors
|
||||
? Promise.resolve(layerState._sensors)
|
||||
: Promise.resolve()
|
||||
.then(() => source.readSensors?.())
|
||||
.then((index) => (index?.byNorad instanceof Map ? index : null))
|
||||
.catch((error) => {
|
||||
console.warn(
|
||||
'[Data:Satellites] Imaging sensor pack unavailable:',
|
||||
error,
|
||||
);
|
||||
return null;
|
||||
});
|
||||
const [pack, sensorIndex] = await Promise.all([ucs, sensors]);
|
||||
if (pack) layerState._ucs = pack;
|
||||
if (sensorIndex) layerState._sensors = sensorIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,6 +356,10 @@ export function createIngestion({
|
||||
}),
|
||||
ucs,
|
||||
satcat,
|
||||
sensor: matchImagingSensor(layerState._sensors, {
|
||||
noradId,
|
||||
name: entry.name,
|
||||
}),
|
||||
});
|
||||
|
||||
coreStale ||= entry.stale;
|
||||
|
||||
Reference in new issue
Block a user