mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 09:12:18 +00:00
Move satellites every frame between SGP4 samples
Satellite points were propagated once a second and held still in between, so while the world clock plays faster than real time they jumped: at 1 min/s, about 45 px once a second at globe scale. Each SGP4 call now keeps a sample of the satellite's inertial position, velocity, gravity and its rate of change (src/layers/satellites/motion.js). Every frame each shown point is reckoned from its sample to the world time and turned into the Earth-fixed frame by the sidereal angle, so points glide at any play speed. Core satellites still take a fresh sample every second, and at once when the world time is 30 s from it (fast play, a seek), which keeps every point within about 10 m of SGP4. Starlink extras take their first sample as they load and are resampled round-robin, more per frame the faster time plays (up to 2,000 a frame); a point more than two minutes from its sample waits for the next one. Hidden points are moved when shown again, and the tracked satellite keeps its per-frame path. Measured at globe scale: at 1 min/s points move on every frame, 0.4 px a frame and at most 1.4 px (before: once a second, 45 px). With 11,880 satellites (Starlink on) the scene holds 60 fps, frames 16.7 ms median and 19.7 ms p95; reckoning costs 0.02 ms a frame for 1,342 points.
This commit is contained in:
1 parent
e4708a815d
commit
e31de29ccc
11 files changed
+466
-60
No files matched your search
@@ -31,7 +31,16 @@ export const ISS_OVERLAY_SOURCE_OPTIONS = Object.freeze({
|
||||
export const ORBIT_PATH_STEPS = 180;
|
||||
// points per orbital path
|
||||
|
||||
/** How often every core satellite takes a fresh SGP4 sample (wall ms). */
|
||||
export const POSITION_UPDATE_MS = 1000;
|
||||
/**
|
||||
* Between SGP4 samples every point is reckoned each frame from its last one
|
||||
* (motion.js). A sample this far from the world time is taken again, so a
|
||||
* point is never more than about 10 m off SGP4 however fast time plays.
|
||||
*/
|
||||
export const ORBIT_SAMPLE_HORIZON_MS = 30_000;
|
||||
/** Beyond this from its sample a point is left where it is until sampled again. */
|
||||
export const ORBIT_RECKON_LIMIT_MS = 120_000;
|
||||
/** How far either side of now SGP4 on current element sets stays meaningful. */
|
||||
export const SATELLITE_COVERAGE_MS = 14 * 24 * 3_600_000;
|
||||
|
||||
@@ -41,7 +50,6 @@ export const SATELLITE_COVERAGE_MS = 14 * 24 * 3_600_000;
|
||||
* drifts a few degrees a day.
|
||||
*/
|
||||
export const ORBIT_REBAKE_MS = 30 * 60_000;
|
||||
// re-propagate every 1s (SGP4 is smooth at this rate)
|
||||
|
||||
export const RING_ROTATION_MS = 1000;
|
||||
// re-align baked orbit rings to current GMST every 1s
|
||||
@@ -80,6 +88,14 @@ export const DENSE_GROUP_PATH = 'starlink';
|
||||
export const DENSE_REFRESH_FRAMES = 300;
|
||||
// full dense pass spread over ~300 frames (~5s @ 60fps)
|
||||
|
||||
/**
|
||||
* The most dense extras sampled in one frame while time plays fast (~4 ms).
|
||||
* Past about 10 minutes of world time a second the full dense set no longer
|
||||
* fits within ORBIT_RECKON_LIMIT_MS, and its points move only as they are
|
||||
* sampled.
|
||||
*/
|
||||
export const DENSE_SAMPLES_PER_FRAME_MAX = 2000;
|
||||
|
||||
export const DENSE_CREATE_CHUNK = 1500;
|
||||
// satrec builds per macro-task while loading
|
||||
|
||||
|
||||
Reference in new issue
Block a user