mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 10:42:22 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
afdecfbd6d | ||
|
|
4cded65064 |
No files matched your search
@@ -14,8 +14,6 @@ _The window through which we see our world._
|
||||
|
||||
Click any satellite, plane, ship or public camera and you can track it. Turn on FLIR mode and suddenly you're wondering, holy crap, is this real? And it's free, and open source.
|
||||
|
||||
God’s Eye View™ is a trademark of Metaversity LLC, used under license by Halfpixel, Inc. [Official download page](https://godseyeview.ai/download/).
|
||||
|
||||
**[One-click install with Pinokio](https://pinokio.co/apps/github-com-bilawalsidhu-gods-eye-view)** · **[Run it from the terminal](#-quick-start)** · **[Hosted version waitlist](https://godseyeview.ai/online/)**
|
||||
|
||||
🏆 **#1 on GitHub Trending**, daily and weekly · **[#8 Product of the Day](https://www.producthunt.com/products/god-s-eye-view?launch=god-s-eye-view)**, hunted by Chris Messina · _“pretty cool”_ — [Brendan Eich](https://x.com/BrendanEich/status/2094592096401490266), creator of JavaScript · Featured on **[Pinokio](https://pinokio.co/posts/01m1m4p9xxm3qw7dnnpj2wr93g)**
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
- Stop the Satellites layer row reading `DEGRADED` with "1 CelesTrak group
|
||||
unavailable" on every update: the core catalog asked CelesTrak for a `sar`
|
||||
group that does not exist, so that read always failed (asturksever, #1883).
|
||||
@@ -7803,7 +7803,7 @@ silently demoting every later lookup for the session.
|
||||
- **Satellite classes** (`src/layers/satellites/classes.js`): every satellite is filed under one of six classes, each with its own point colour, legend swatch and toggle: STATIONS (warm white), IMAGING (cyan), TELECOM (violet; communications and navigation, so GPS, GLONASS, Galileo and BeiDou read as one family), STARLINK (dim slate), PROBES (muted blue-gray) and DEBRIS (receding brown-gray). That module is the single source of truth for class, label and colour, so the dot, the card and the legend swatch cannot disagree. Two deliberate palette rules: no class may sit in the 40–48° amber band, which is the app-wide known-military convention; and STARLINK stays far below PROBES in Rec.601 luminance so the dense shell stays separable when NVG/FLIR collapse the scene to one channel. The ISS keeps its long-standing red hero dot rather than the STATIONS colour — it carries a permanent name label and its card still reads `STATIONS · ISS`; it is a station whichever group ingested it, so a stations-feed outage cannot refile it. `src/data/satelliteClass.js` keeps the group-based labels beneath the classes: the constellation subtype and a group's own label for a satellite with no class. The tracked satellite's dot keeps that colour too: tracking draws it larger (14 px), white-outlined and over everything, never in another colour (`_addTrackedEntity`, `src/layers/satellites/rendering.js`).
|
||||
- Class is also a **text field**, not just a color: `TELECOM · GPS` / `STARLINK` / `STATIONS · ISS` leads the tracked card's detail block and replaces the raw CelesTrak tag on the detection-overlay label. Because that canvas composites above the post-FX chain, the class stays readable in NVG/FLIR after the in-scene dot colors are flattened.
|
||||
- The satellites row in DATA LAYERS carries per-layer sub-controls (`DataLayerManager._syncRowControls`, the first consumer of the optional `getRowControls()` layer hook): one chip per class (the STARLINK chip exposes the existing `catalog` param), a swatch legend with live per-class counts, and an info line while SATCAT is stale or unavailable (`Classes may lag: SATCAT is a cached copy` / `Classes may lag: SATCAT unavailable`). Default is the sparse core catalog. The chips are stateless — each declares the params to apply and the manager owns the write — so the Space Missions capture/restore path over the same param stays authoritative. Controls stay hidden while the layer is off. An explicit CORE or DENSE choice participates in versioned local and share-link state; temporary Space Missions overrides do not.
|
||||
- **Class toggles** (`src/layers/satellites/classes.js`): the layer row carries one chip per class — STATIONS, IMAGING, TELECOM (communications and navigation), PROBES (science, technology development and demonstration, unknown purpose) and DEBRIS (rocket bodies, fragments, unknown objects launched before last year and dead payloads) on by default, so the layer shows what it did before classes; STARLINK off, as DENSE was. Points of a hidden class stay built and are only hidden, so a toggle needs no reload; hidden classes are left out of the detection overlay, the voice/framing position lists and analyst answers (the tracked satellite still answers), and the legend keys only the classes on screen. The class comes, strongest evidence first, from CelesTrak SATCAT (object type and operational status, fetched per group through `/api/celestrak-satcat/<group>`, cached a day by the proxy; the layer keeps a current read six hours rather than asking on every five-minute update), the bundled UCS Satellite Database pack (UCS-Satellite-Database 5-1-2023: operator, owner country and purpose; `src/data/local_data/ucs_satellites/`), name patterns for satellites launched after May 2023, and finally the CelesTrak groups the TLE came in (a mission group such as `weather` before the orbit group `geo`; a UCS purpose of "Unknown" counts as none). Only crewed stations and the craft that visit them, by name, are STATIONS: the CubeSats CelesTrak's stations group also carries after their deployment from the ISS are classed like any other satellite. A payload whose SATCAT record gives no status, with no UCS record and no recognisable name, that launched 20 or more years ago (SATCAT's launch date, else the TLE designator's year) is presumed dead and filed as debris; without a SATCAT record (a failed read) nothing is presumed. To cover imaging launched after the UCS snapshot the core catalog also reads CelesTrak's `resource`, `weather`, `planet`, `sar` and `science` groups. Debris can be tracked but is never ridden: the orbital entry gate (`orbitEntryAllowed`) refuses it, so no ORBIT entry is offered and double-click does nothing for it. Retired stations and the shuttles have re-entered and have no orbit to show. An explicit class choice is kept in local and share-link state as the `classes` option, one letter per class shown (`sitpd`: stations, imaging, telecom, probes, debris; `0`: none; `src/data/satelliteClassMask.js`), and the layer takes those letters back through `setParams({classes})`; STARLINK maps to the existing `catalog: 'dense'` param instead.
|
||||
- **Class toggles** (`src/layers/satellites/classes.js`): the layer row carries one chip per class — STATIONS, IMAGING, TELECOM (communications and navigation), PROBES (science, technology development and demonstration, unknown purpose) and DEBRIS (rocket bodies, fragments, unknown objects launched before last year and dead payloads) on by default, so the layer shows what it did before classes; STARLINK off, as DENSE was. Points of a hidden class stay built and are only hidden, so a toggle needs no reload; hidden classes are left out of the detection overlay, the voice/framing position lists and analyst answers (the tracked satellite still answers), and the legend keys only the classes on screen. The class comes, strongest evidence first, from CelesTrak SATCAT (object type and operational status, fetched per group through `/api/celestrak-satcat/<group>`, cached a day by the proxy; the layer keeps a current read six hours rather than asking on every five-minute update), the bundled UCS Satellite Database pack (UCS-Satellite-Database 5-1-2023: operator, owner country and purpose; `src/data/local_data/ucs_satellites/`), name patterns for satellites launched after May 2023, and finally the CelesTrak groups the TLE came in (a mission group such as `weather` before the orbit group `geo`; a UCS purpose of "Unknown" counts as none). Only crewed stations and the craft that visit them, by name, are STATIONS: the CubeSats CelesTrak's stations group also carries after their deployment from the ISS are classed like any other satellite. A payload whose SATCAT record gives no status, with no UCS record and no recognisable name, that launched 20 or more years ago (SATCAT's launch date, else the TLE designator's year) is presumed dead and filed as debris; without a SATCAT record (a failed read) nothing is presumed. To cover imaging launched after the UCS snapshot the core catalog also reads CelesTrak's `resource`, `weather`, `planet` and `science` groups. Debris can be tracked but is never ridden: the orbital entry gate (`orbitEntryAllowed`) refuses it, so no ORBIT entry is offered and double-click does nothing for it. Retired stations and the shuttles have re-entered and have no orbit to show. An explicit class choice is kept in local and share-link state as the `classes` option, one letter per class shown (`sitpd`: stations, imaging, telecom, probes, debris; `0`: none; `src/data/satelliteClassMask.js`), and the layer takes those letters back through `setParams({classes})`; STARLINK maps to the existing `catalog: 'dense'` param instead.
|
||||
- The satellite Cockpit subject (`getCockpitSubject()`) also carries `satelliteClass`, `cosparId` (from SATCAT, else TLE line 1), `tle` (`{line1, line2, epochMs}`), `owner` (`{countryCode, label}`: ISO 3166-1 alpha-2 for a single country, `null` code for organisations such as ESA, EUMETSAT or Intelsat and for joint owners) and `operator` (UCS; SpaceX for Starlink). UCS names the operator's country and wins over the SATCAT owner code; CelesTrak's CIS (former USSR) is filed under Russia.
|
||||
- **The STARLINK chip (formerly DENSE) reports the dense LOAD, not the catalog param.** The param flips synchronously while the Starlink shell takes seconds to arrive over a chunked load, and CelesTrak 502s that feed regularly. So the chip reads `STARLINK ···` (busy, disabled) while loading, ACTIVE only once dense points are actually on screen, and `STARLINK ✕` with the reason on hover when the load fails — a failure also reverts `catalog` to `core`, drops any partial chunk, and leaves the chip clickable to retry. A load is judged by points added, not by HTTP status: a 200 carrying an empty body, a passed-through HTML error page, or only TLEs the core catalog already owns fails with the same revert semantics as a 502. Any explicit request for `core` clears a latched error even when the mode does not change, so a Space Missions restore of an already-core snapshot never leaves the user with a failure they did not cause. Because the load settles asynchronously, the layer pushes a re-render through the optional `setRowControlsListener()` hook; nothing else would repaint that row before the 5-minute catalog refresh, so the count and legend would otherwise sit stale.
|
||||
- **A dependency owner takes the row with it.** Space Missions borrows this layer for TLE lookup with `showPoints:false`; while points are hidden the layer returns empty row controls, so the legend never describes an empty sky and the chip cannot accept a write that the owner's restore would silently revert.
|
||||
|
||||
@@ -49,7 +49,6 @@ export function celestrakProxy() {
|
||||
'resource',
|
||||
'weather',
|
||||
'planet',
|
||||
'sar',
|
||||
'science',
|
||||
];
|
||||
const feeds = [
|
||||
|
||||
@@ -136,7 +136,6 @@ const GROUP_CLASS = Object.freeze({
|
||||
resource: 'imaging',
|
||||
weather: 'imaging',
|
||||
planet: 'imaging',
|
||||
sar: 'imaging',
|
||||
'gps-ops': 'telecom',
|
||||
glonass: 'telecom',
|
||||
'glo-ops': 'telecom',
|
||||
|
||||
@@ -381,7 +381,6 @@ test('every ingested group names the class its unnamed members fall back to', ()
|
||||
resource: 'imaging',
|
||||
weather: 'imaging',
|
||||
planet: 'imaging',
|
||||
sar: 'imaging',
|
||||
science: 'probes',
|
||||
};
|
||||
assert.deepEqual(
|
||||
|
||||
@@ -16,7 +16,7 @@ export const SATCAT_WAIT_MS = 3000;
|
||||
/**
|
||||
* How long a complete, current SATCAT read is kept before the layer asks
|
||||
* again, ms. SATCAT changes daily and the proxy caches it a day, so the
|
||||
* five-minute TLE update does not read all eleven groups each time.
|
||||
* five-minute TLE update does not read all ten groups each time.
|
||||
*/
|
||||
export const SATCAT_KEEP_MS = 6 * 60 * 60 * 1000;
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import { SATELLITE_CLASS_DISPLAY, SATELLITE_CLASS_IDS } from './classes.js';
|
||||
/**
|
||||
* Satellite Orbits — Real-time positions via CelesTrak TLE + SGP4 propagation.
|
||||
*
|
||||
* Loads eleven CelesTrak groups: stations, visual, GPS, GLONASS, Galileo, the
|
||||
* geosynchronous belt, and the Earth resources, weather, Planet, SAR and
|
||||
* science groups. Each object is filed under one of six classes
|
||||
* Loads ten CelesTrak groups: stations, visual, GPS, GLONASS, Galileo, the
|
||||
* geosynchronous belt, and the Earth resources, weather, Planet and science
|
||||
* groups. Each object is filed under one of six classes
|
||||
* (src/layers/satellites/classes.js) whose visibility the layer row toggles; dense mode
|
||||
* (setParams catalog:'dense', the STARLINK toggle) adds the Starlink shell as
|
||||
* points-only extras.
|
||||
@@ -211,6 +211,9 @@ export const RING_ROTATION_MS = 1000;
|
||||
* proxy; `tag` is the internal group key used for POINT_STYLES lookup.
|
||||
* Note: CelesTrak's GLONASS group is named 'glo-ops' (not
|
||||
* 'glonass-operational' — that name 404s upstream).
|
||||
* Every entry must be a group CelesTrak serves: one that is not fails on every
|
||||
* update, so the layer row reads DEGRADED ("1 CelesTrak group unavailable")
|
||||
* for good. CelesTrak has no `sar` group (`sarsat` is search and rescue).
|
||||
*/
|
||||
|
||||
export const CATALOG_GROUPS = [
|
||||
@@ -225,7 +228,6 @@ export const CATALOG_GROUPS = [
|
||||
{ tag: 'resource', path: 'resource' },
|
||||
{ tag: 'weather', path: 'weather' },
|
||||
{ tag: 'planet', path: 'planet' },
|
||||
{ tag: 'sar', path: 'sar' },
|
||||
{ tag: 'science', path: 'science' },
|
||||
];
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ const GROUPS = new Set([
|
||||
'resource',
|
||||
'weather',
|
||||
'planet',
|
||||
'sar',
|
||||
'science',
|
||||
]);
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ const GROUPS = [
|
||||
'resource',
|
||||
'weather',
|
||||
'planet',
|
||||
'sar',
|
||||
'science',
|
||||
];
|
||||
/** The core catalog's groups, one owned satellite each. */
|
||||
|
||||
@@ -2150,6 +2150,50 @@ test('a hold resumed partway waits for a clip that starts again, else only its r
|
||||
assert.deepEqual(await hold(0), [2000]);
|
||||
});
|
||||
|
||||
/** Drive frame-by-frame camera motion headlessly for one test. */
|
||||
function installAnimationFrames() {
|
||||
const original = globalThis.requestAnimationFrame;
|
||||
const originalCancel = globalThis.cancelAnimationFrame;
|
||||
globalThis.requestAnimationFrame = (callback) => setTimeout(callback, 16);
|
||||
globalThis.cancelAnimationFrame = (handle) => clearTimeout(handle);
|
||||
return () => {
|
||||
globalThis.requestAnimationFrame = original;
|
||||
globalThis.cancelAnimationFrame = originalCancel;
|
||||
};
|
||||
}
|
||||
|
||||
test('a run resumed inside a flight goes on from that point of the path and clock', async () => {
|
||||
const { director, viewer, restore } = makeDirector();
|
||||
const restoreFrames = installAnimationFrames();
|
||||
const clock = [];
|
||||
director.subscribeSceneClock((snap) => clock.push(snap));
|
||||
const poses = [];
|
||||
const setView = director._setCameraView.bind(director);
|
||||
director._setCameraView = (pose) => {
|
||||
poses.push(pose);
|
||||
return setView(pose);
|
||||
};
|
||||
try {
|
||||
// 0.75 of a 0.4 s scene: halfway along shot B's 0.2 s flight.
|
||||
const run = director.startScene('scene-1', {
|
||||
single: true,
|
||||
fromProgress: 0.75,
|
||||
preview: false,
|
||||
});
|
||||
await settle(40);
|
||||
const first = clock.find((snap) => snap.running);
|
||||
assert.equal(first.shotId, 'shot-b', 'starts in the shot that moment is in');
|
||||
assert.ok(Math.abs(first.sceneElapsedSec - 0.3) < 1e-9, 'the clock starts at the moment');
|
||||
// The first frame is the seek's own framing, halfway from A to B.
|
||||
assert.ok(poses.length, 'the camera is driven from where it is');
|
||||
assert.ok(Math.abs(poses[0].lat - -10) < 0.5, 'halfway from A to B');
|
||||
assert.deepEqual(await run, { started: true, shots: 1 });
|
||||
assert.equal(poses.at(-1).lat, -30, 'and ends on shot B');
|
||||
assert.equal(viewer.flights.length, 0, 'no fresh flight from the shot start');
|
||||
assert.equal(director._lastRun.wasCancelled, false);
|
||||
} finally { await director.destroy(); restoreFrames(); restore(); }
|
||||
});
|
||||
|
||||
test('a run resumed inside a hold plays its layers on from the seek’s state and waits only the rest of it', async () => {
|
||||
const project = structuredClone(PROJECT_FIXTURE);
|
||||
project.scenes[0].shots[0].holdSec = 0.6;
|
||||
|
||||
@@ -374,7 +374,10 @@ test('a SATCAT failure never holds off the TLEs, but CelesTrak throttling holds
|
||||
: new Response(tle);
|
||||
});
|
||||
const request = install(celestrakProxy());
|
||||
assert.equal((await request('/api/celestrak-satcat', '/sar')).status, 502);
|
||||
assert.equal(
|
||||
(await request('/api/celestrak-satcat', '/science')).status,
|
||||
502,
|
||||
);
|
||||
const starlink = await request('/api/celestrak', '/starlink');
|
||||
assert.equal(starlink.status, 200, 'the TLE feed is not cooling down');
|
||||
assert.equal(starlink.body, tle);
|
||||
|
||||
@@ -28,20 +28,8 @@ body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(
|
||||
.hud-readout:has(> #hud-mode) {
|
||||
display: none;
|
||||
}
|
||||
/* The globe actions sit on the title row, level with the title, with the
|
||||
loading line under them (status.css). Narrower, where the row would reach
|
||||
the title, they drop to the HUD's top rows and the loading line drops
|
||||
with them, so it never covers the actions. */
|
||||
#top-center-actions {
|
||||
top: 32px;
|
||||
}
|
||||
@media (max-width: 1179px) {
|
||||
#top-center-actions {
|
||||
top: clamp(86px, 9.55vh, 108px);
|
||||
}
|
||||
#global-loading-status {
|
||||
top: calc(clamp(86px, 9.55vh, 108px) + 42px);
|
||||
}
|
||||
top: clamp(86px, 9.55vh, 108px);
|
||||
}
|
||||
#left-panel-stack.layout-focus {
|
||||
bottom: var(--left-stack-safe-bottom, 4vh);
|
||||
|
||||
Reference in new issue
Block a user