diff --git a/public/config.json b/public/config.json index b24e03b..714efe6 100644 --- a/public/config.json +++ b/public/config.json @@ -3,7 +3,8 @@ "pushHistory": false, "logLevel": "info", "satWorker": { - "runOnce": false + "runOnce": false, + "propergateIntervalMs": 16 }, "satelliteGroups": [ { diff --git a/src/viewer/Satellites.ts b/src/viewer/Satellites.ts index 3d565a9..dcd7460 100644 --- a/src/viewer/Satellites.ts +++ b/src/viewer/Satellites.ts @@ -1,4 +1,4 @@ -import { SatelliteGroup } from '@satellite-viewer/SatelliteGroup'; +import SatelliteGroup from '@satellite-viewer/SatelliteGroup'; import { Points, BufferGeometry, diff --git a/src/viewer/workers/SatCruncherWorker.ts b/src/viewer/workers/SatCruncherWorker.ts index f665de0..e8baa40 100644 --- a/src/viewer/workers/SatCruncherWorker.ts +++ b/src/viewer/workers/SatCruncherWorker.ts @@ -2,10 +2,9 @@ import { jday, twoline2satrec, eciToGeodetic, gstime, sgp4, SatRec } from 'satellite.js'; import logger from '../../utils/logger'; -import constants from '../../config'; const satCache: SatRec[] = []; -const propergateInterval = constants.propergateInterval || 500; +let propergateInterval = 500; let runOnce = false; let config: Record = {}; let satPos: Float32Array; @@ -101,6 +100,10 @@ onmessage = function (message) { if (config.logLevel) { logger.setLogLevel(config.logLevel); } + if (config.propergateIntervalMs) { + propergateInterval = config.propergateIntervalMs; + logger.debug(`Adjusting propergateIntervalMs to be ${propergateInterval} ms`); + } } if (satData.state) { if (typeof satData.state.running === 'boolean') {