Skip to content

Conversation

@thkruz
Copy link
Owner

@thkruz thkruz commented Nov 17, 2025

Add new plugin to track and analyze satellite breakup events and debris:

  • Hardcoded database of 6 major breakup events (Fengyun-1C, Cosmos 2251, Iridium 33, Cosmos 1408, etc.)
  • Filter debris by parent object selection
  • Fragment dispersion analysis (altitude range, eccentricity, inclination)
  • Breakup event timeline showing launch date to breakup date
  • Display debris field on globe
  • Statistical analysis of tracked vs estimated debris counts

Add new plugin to track and analyze satellite breakup events and debris:
- Hardcoded database of 6 major breakup events (Fengyun-1C, Cosmos 2251, Iridium 33, Cosmos 1408, etc.)
- Filter debris by parent object selection
- Fragment dispersion analysis (altitude range, eccentricity, inclination)
- Breakup event timeline showing launch date to breakup date
- Display debris field on globe
- Statistical analysis of tracked vs estimated debris counts
Copilot AI review requested due to automatic review settings November 17, 2025 10:27
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +523 to +525
// Create a search string to highlight debris
const debrisIds = debrisFragments.map((sat) => sat.id);

Choose a reason for hiding this comment

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

P1 Badge Remove unused debrisIds declaration

The new debris highlighting code declares const debrisIds = debrisFragments.map((sat) => sat.id); but never uses the array. With noUnusedLocals enabled in tsconfig.base.json, this triggers a TypeScript compile error and prevents the plugin from building. Drop the unused variable or use it in the highlighting logic.

Useful? React with 👍 / 👎.

Comment on lines +554 to +557
// Use SelectSatManager to select the parent
const selectSatManager = PluginRegistry.getPlugin(SelectSatManager);

if (selectSatManager) {

Choose a reason for hiding this comment

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

P1 Badge Import PluginRegistry before use

In selectParentObject_ the code calls PluginRegistry.getPlugin(SelectSatManager) but this module never imports PluginRegistry, so TypeScript will fail with “Cannot find name 'PluginRegistry'” when compiling (tsconfig.json includes src/**/*.ts). Add the missing import from the plugin registry to restore compilation.

Useful? React with 👍 / 👎.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new "Satellite Fragmentation Database" plugin to track and analyze debris from major satellite breakup events. The plugin includes a hardcoded database of 6 historical breakup events (Fengyun-1C, Cosmos 2251, Iridium 33, Cosmos 1408, Thor Burner 2, and CZ-4B R/B) with detailed information about each event.

Key changes:

  • New plugin providing debris fragment analysis with statistics on altitude range, eccentricity, and inclination
  • Interactive UI allowing users to filter debris by parent object and display debris fields on the globe
  • Event timeline visualization showing time from launch to breakup

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
src/plugins/satellite-fragmentation/satellite-fragmentation.css Defines styling for the fragmentation plugin UI including menu layout, info rows, and button styles
src/plugins/satellite-fragmentation/satellite-fragmentation-plugin.ts Implements the core plugin functionality with breakup event database, debris matching logic, and statistical analysis
src/plugins/plugins.ts Registers the new SatelliteFragmentationPlugin in the plugin initialization array
src/plugins/keeptrack-plugins-configuration.ts Adds configuration type definition for the SatelliteFragmentationPlugin
Comments suppressed due to low confidence (1)

src/plugins/satellite-fragmentation/satellite-fragmentation-plugin.ts:524

  • Unused variable debrisIds.
    const debrisIds = debrisFragments.map((sat) => sat.id);

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

*/
export class SatelliteFragmentationPlugin extends KeepTrackPlugin {
readonly id = 'SatelliteFragmentationPlugin';
dependencies_ = [];
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Missing dependency declaration. The plugin uses SelectSatManager (via PluginRegistry.getPlugin(SelectSatManager) on line 555) but doesn't declare it as a dependency. The dependencies_ array on line 67 is empty but should include SelectSatManager.name to ensure proper plugin initialization order.

Suggested change
dependencies_ = [];
dependencies_ = [SelectSatManager.name];

Copilot uses AI. Check for mistakes.
}

// Use SelectSatManager to select the parent
const selectSatManager = PluginRegistry.getPlugin(SelectSatManager);
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Missing import for PluginRegistry. The code uses PluginRegistry.getPlugin(SelectSatManager) on line 555, but PluginRegistry is not imported. Add the import statement:

import { PluginRegistry } from '@app/engine/core/plugin-registry';

Copilot uses AI. Check for mistakes.
}

// Create a search string to highlight debris
const debrisIds = debrisFragments.map((sat) => sat.id);
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The variable debrisIds is declared but never used. It's created on line 524 but not referenced anywhere in the function. Consider removing this line if it's not needed.

Suggested change
const debrisIds = debrisFragments.map((sat) => sat.id);

Copilot uses AI. Check for mistakes.
Comment on lines +418 to +419
satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0]) ||
objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Operator precedence issue in the filter condition. The logical AND (&&) has higher precedence than OR (||), which may cause unexpected matching behavior. The current condition:

satName.includes(event.name.toUpperCase()) ||
satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0]) ||
objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId

Should likely use parentheses to clarify intent:

satName.includes(event.name.toUpperCase()) ||
(satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0])) ||
(objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId)
Suggested change
satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0]) ||
objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId
(satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0])) ||
(objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId)

Copilot uses AI. Check for mistakes.
Comment on lines +511 to +513
satName.includes(this.selectedEvent_.name.toUpperCase()) ||
satName.includes('DEB') && satName.includes(this.selectedEvent_.cosparId.split('-')[0]) ||
objectName.startsWith(this.selectedEvent_.cosparId.slice(0, 8)) && objectName !== this.selectedEvent_.cosparId
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

Operator precedence issue in the filter condition. The logical AND (&&) has higher precedence than OR (||), which may cause unexpected matching behavior. The current condition should use parentheses to clarify intent:

satName.includes(this.selectedEvent_.name.toUpperCase()) ||
(satName.includes('DEB') && satName.includes(this.selectedEvent_.cosparId.split('-')[0])) ||
(objectName.startsWith(this.selectedEvent_.cosparId.slice(0, 8)) && objectName !== this.selectedEvent_.cosparId)
Suggested change
satName.includes(this.selectedEvent_.name.toUpperCase()) ||
satName.includes('DEB') && satName.includes(this.selectedEvent_.cosparId.split('-')[0]) ||
objectName.startsWith(this.selectedEvent_.cosparId.slice(0, 8)) && objectName !== this.selectedEvent_.cosparId
(satName.includes(this.selectedEvent_.name.toUpperCase())) ||
(satName.includes('DEB') && satName.includes(this.selectedEvent_.cosparId.split('-')[0])) ||
(objectName.startsWith(this.selectedEvent_.cosparId.slice(0, 8)) && objectName !== this.selectedEvent_.cosparId)

Copilot uses AI. Check for mistakes.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants