-
Notifications
You must be signed in to change notification settings - Fork 135
feat: add Satellite Fragmentation Database Plugin #1251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
feat: add Satellite Fragmentation Database Plugin #1251
Conversation
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
|
|
There was a problem hiding this 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".
| // Create a search string to highlight debris | ||
| const debrisIds = debrisFragments.map((sat) => sat.id); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
| // Use SelectSatManager to select the parent | ||
| const selectSatManager = PluginRegistry.getPlugin(SelectSatManager); | ||
|
|
||
| if (selectSatManager) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 👍 / 👎.
There was a problem hiding this 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_ = []; |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
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.
| dependencies_ = []; | |
| dependencies_ = [SelectSatManager.name]; |
| } | ||
|
|
||
| // Use SelectSatManager to select the parent | ||
| const selectSatManager = PluginRegistry.getPlugin(SelectSatManager); |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
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';| } | ||
|
|
||
| // Create a search string to highlight debris | ||
| const debrisIds = debrisFragments.map((sat) => sat.id); |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
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.
| const debrisIds = debrisFragments.map((sat) => sat.id); |
| satName.includes('DEB') && satName.includes(event.cosparId.split('-')[0]) || | ||
| objectName.startsWith(event.cosparId.slice(0, 8)) && objectName !== event.cosparId |
Copilot
AI
Nov 17, 2025
There was a problem hiding this comment.
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.cosparIdShould 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)| 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) |
| 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
AI
Nov 17, 2025
There was a problem hiding this comment.
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)| 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) |
|



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