diff --git a/README.md b/README.md index fd461e078..14da163e9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Latest Version](https://img.shields.io/badge/version-12.1.0-darkgreen?style=flat-square) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/thkruz/keeptrack.space?style=flat-square) ![language](https://img.shields.io/github/languages/top/thkruz/keeptrack.space?style=flat-square) ![Languages](https://img.shields.io/github/languages/count/thkruz/keeptrack.space?style=flat-square) ![GitHub issues](https://img.shields.io/github/issues/thkruz/keeptrack.space?style=flat-square) ![License](https://img.shields.io/github/license/thkruz/keeptrack.space?style=flat-square) +![Latest Version](https://img.shields.io/badge/version-12.1.1-darkgreen?style=flat-square) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/thkruz/keeptrack.space?style=flat-square) ![language](https://img.shields.io/github/languages/top/thkruz/keeptrack.space?style=flat-square) ![Languages](https://img.shields.io/github/languages/count/thkruz/keeptrack.space?style=flat-square) ![GitHub issues](https://img.shields.io/github/issues/thkruz/keeptrack.space?style=flat-square) ![License](https://img.shields.io/github/license/thkruz/keeptrack.space?style=flat-square) diff --git a/package-lock.json b/package-lock.json index dbafbef07..0f47eb19f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "keeptrack.space", - "version": "12.1.0", + "version": "12.1.1", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 56d204833..55b987311 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "keeptrack.space", - "version": "12.1.0", + "version": "12.1.1", "type": "module", "description": "Complex astrodynamics tools designed for non-engineers to make learning about orbital mechanics and satellite operations more accessible.", "author": "Theodore Kruczek", diff --git a/src/plugins/sat-info-box-sensor/sat-info-box-sensor.ts b/src/plugins/sat-info-box-sensor/sat-info-box-sensor.ts index d6a31b1d9..f74adcee4 100644 --- a/src/plugins/sat-info-box-sensor/sat-info-box-sensor.ts +++ b/src/plugins/sat-info-box-sensor/sat-info-box-sensor.ts @@ -17,7 +17,7 @@ import { KeepTrack } from '@app/keeptrack'; import { keepTrackApi } from '@app/keepTrackApi'; import { BaseObject, cKmPerMs, DEG2RAD, - eci2lla, eci2rae, + eci2lla, RadecTopocentric, Satellite, SpaceObjectType, Sun, SunTime, @@ -122,7 +122,7 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { const hasSatSelected = selectSatManager && selectSatManager.selectedSat >= 0; const sensorManagerInstance = ServiceLocator.getSensorManager(); - if (!settingsManager.isDisableSensors && hasSatSelected && sensorManagerInstance.isSensorSelected()) { + if (hasSatSelected && sensorManagerInstance.isSensorSelected()) { showEl(SECTIONS.SENSOR); // Immediately update sun status so the placeholder is never visible @@ -137,7 +137,7 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { } private updateSensorInfo_(obj: BaseObject) { - if (obj === null || typeof obj === 'undefined' || settingsManager.isDisableSensors) { + if (obj === null || typeof obj === 'undefined') { return; } @@ -297,8 +297,16 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { if (ServiceLocator.getSensorManager().isSensorSelected()) { const sensor = ServiceLocator.getSensorManager().currentSensors[0]; - rae = eci2rae(timeManagerInstance.simulationTimeObj, obj.position, sensor); - isInView = sensor.isRaeInFov(rae.az, rae.el, rae.rng); + // Use SpaceObject.rae() which properly interpolates the ephemeris at the exact time + const raeResult = obj.rae(sensor, timeManagerInstance.simulationTimeObj); + + if (raeResult) { + rae = raeResult; + isInView = sensor.isRaeInFov(rae.az, rae.el, rae.rng); + } else { + rae = { az: 0, el: 0, rng: 0 }; + isInView = false; + } } else { rae = { az: 0, @@ -308,7 +316,7 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { isInView = false; } - const lla = eci2lla(obj.position, ServiceLocator.getTimeManager().gmst); + const lla = obj.lla(timeManagerInstance.simulationTimeObj) ?? eci2lla(obj.position, ServiceLocator.getTimeManager().gmst); const currentTearr: TearrData = { time: timeManagerInstance.simulationTimeObj.toISOString(), az: rae.az, @@ -355,14 +363,10 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { sensorManagerInstance.currentSensors[0].objName !== uiManagerInstance.lastNextPassCalcSensorShortName) && !obj.isMissile() ) { - const sat = obj as Satellite; - - if (sat.perigee > sensorManagerInstance.currentSensors[0].maxRng) { - if (nextPassElement) { - nextPassElement.innerHTML = 'Beyond Max Range'; - } - } else if (nextPassElement) { - nextPassElement.innerHTML = SensorMath.nextpass(sat, sensorManagerInstance.currentSensors, 2, 5); + const nextPassText = this.calculateNextPassText_(obj, sensorManagerInstance); + + if (nextPassElement) { + nextPassElement.innerHTML = nextPassText; } /* @@ -381,6 +385,20 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { } } + private calculateNextPassText_(obj: BaseObject, sensorManagerInstance: SensorManager): string { + if (obj instanceof OemSatellite) { + return 'N/A (OEM)'; + } + + const sat = obj as Satellite; + + if (sat.perigee > sensorManagerInstance.currentSensors[0].maxRng) { + return 'Beyond Max Range'; + } + + return SensorMath.nextpass(sat, sensorManagerInstance.currentSensors, 2, 5); + } + private updateSatelliteTearrData_(obj: BaseObject, sensorManagerInstance: SensorManager, timeManagerInstance: TimeManager) { const elements = { az: getEl('sat-azimuth'), @@ -515,6 +533,8 @@ export class SatInfoBoxSensor extends KeepTrackPlugin { if (elements.vmag) { if (obj.isMissile()) { elements.vmag.innerHTML = 'N/A'; + } else if (obj instanceof OemSatellite) { + elements.vmag.innerHTML = 'N/A'; } else { const sat = obj as Satellite; diff --git a/src/plugins/short-term-fences/short-term-fences.ts b/src/plugins/short-term-fences/short-term-fences.ts index 79b6a5694..fcbd999fb 100644 --- a/src/plugins/short-term-fences/short-term-fences.ts +++ b/src/plugins/short-term-fences/short-term-fences.ts @@ -262,6 +262,7 @@ export class ShortTermFences extends KeepTrackPlugin { uiName: 'STF', zoom: maxrange > 6000 ? ZoomValue.GEO : ZoomValue.LEO, volume: true, + isVolumetric: true, }); if (