Skip to content
Merged

v12.1.1 #1297

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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)

<picture>
<source media="(prefers-color-scheme: dark)" srcset="./public/img/logo.png">
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
48 changes: 34 additions & 14 deletions src/plugins/sat-info-box-sensor/sat-info-box-sensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}
Comment on lines +300 to +309
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When obj.rae(sensor, time) returns null for an OemSatellite, this code falls back to {az:0, el:0, rng:0} and forces isInView=false. This both diverges from the PR description (“falls back to the old method if interpolation is unavailable”) and can incorrectly mark an OEM sat out-of-view / hide range/az/el even when obj.position is available. Consider falling back to the legacy eci2rae(simTime, obj.position, sensor) (or another non-interpolated look-angle computation) when raeResult is null, similar to the lla() fallback below, or update the PR description if returning N/A is intentional.

Copilot uses AI. Check for mistakes.
} else {
rae = {
az: 0,
Expand All @@ -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,
Expand Down Expand Up @@ -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;
}

/*
Expand All @@ -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'),
Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/plugins/short-term-fences/short-term-fences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ export class ShortTermFences extends KeepTrackPlugin {
uiName: 'STF',
zoom: maxrange > 6000 ? ZoomValue.GEO : ZoomValue.LEO,
volume: true,
isVolumetric: true,
});

if (
Expand Down
Loading