mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 08:42:21 +00:00
Main brings satellites and vessels moving every frame, smooth rewind for contacts, global clouds drawn to the level a feed names, and search for degrees-minutes-seconds, UTM, MGRS and plus codes. They keep this branch's renderer work: satellites write their reckoned positions into the points set once a frame; vessels move every frame and ask for frames from the camera pose and canvas, and a vessel not there yet is hidden through its icon; flights and military keep the branch's rendering, with main's timeline fixes, trail top-up and grounded lift; the cloud tiles keep their infrared transfer. The timeline history module uses the geo helpers instead of Cesium, and main's new tests use the draw port's items.
This commit is contained in:
commit
4b47d5e058
49 files changed
+3367
-348
No files matched your search
@@ -24,6 +24,13 @@
|
||||
* freshness and staleness judged against `atMs`, and `atMs` echoed back. A
|
||||
* vessel snapshot at a time reports `transportStatus: 'live'`. getTrack then
|
||||
* receives `{ signal, atMs }` and returns only points at or before `atMs`.
|
||||
*
|
||||
* A timeline that declares `spanMs` lets each record of a snapshot at a time
|
||||
* carry `fixes`: `{atMs, lat, lon, altitudeM?}` in time order, its own track
|
||||
* from `spanMs` before the time to `spanMs` after it (see
|
||||
* src/time/timelineFixes.js). The layer places the contact on them at any
|
||||
* time they span, earlier ones too, so the clock can move within them,
|
||||
* forwards or back, without a new snapshot.
|
||||
*/
|
||||
// Messages are English data (AI tools read them too); the Layers panel shows
|
||||
// them translated by their shape (translateFeedError in src/ui/statusText.js),
|
||||
@@ -164,10 +171,13 @@ export function httpError(response, source) {
|
||||
* null while it does not know yet; `stepMs` is the spacing of its snapshots;
|
||||
* the optional `subscribe(listener)` tells of a change in coverage, or of a
|
||||
* better answer for a time already answered (a paused layer then loads the
|
||||
* time shown again), and returns the unsubscribe.
|
||||
* time shown again), and returns the unsubscribe. The optional `spanMs` is
|
||||
* how far either side of its time a snapshot's records carry their `fixes`
|
||||
* (0 when they carry none).
|
||||
* @param {object|null|undefined} source
|
||||
* @returns {{coverage: () => ({start: number, end: number}|null),
|
||||
* stepMs: number, subscribe: ((listener: () => void) => () => void)|null}|null}
|
||||
* stepMs: number, spanMs: number,
|
||||
* subscribe: ((listener: () => void) => () => void)|null}|null}
|
||||
*/
|
||||
export function readSnapshotTimeline(source) {
|
||||
const timeline = source?.timeline;
|
||||
@@ -177,9 +187,14 @@ export function readSnapshotTimeline(source) {
|
||||
if (!Number.isFinite(stepMs) || stepMs <= 0) return null;
|
||||
if (timeline.subscribe != null && typeof timeline.subscribe !== 'function')
|
||||
return null;
|
||||
const spanMs =
|
||||
Number.isFinite(timeline.spanMs) && timeline.spanMs > 0
|
||||
? timeline.spanMs
|
||||
: 0;
|
||||
return {
|
||||
coverage: () => timeline.coverage(),
|
||||
stepMs,
|
||||
spanMs,
|
||||
subscribe: timeline.subscribe
|
||||
? (listener) => timeline.subscribe(listener)
|
||||
: null,
|
||||
|
||||
Reference in new issue
Block a user