Skip to content

Commit e135394

Browse files
committed
feat: add satellite selection plugin for TOCA/POCA analysis
Create a new plugin that allows users to select a primary satellite and a target satellite to compute the Time of Closest Approach (TOCA) and Point of Closest Approach (POCA) between them. Features: - Propagates both satellites' ECI positions using SGP4 - Calculates distance between satellites at each time step - Identifies local minima in distance to find closest approaches - Displays next 10 TOCAs and POCAs in a side menu - Clicking on an entry changes simulation time to that event - Highlights both satellites in the search bar when an event is clicked - Side menu styled similar to collisions plugin - 7-day lookahead with 60-second time steps Files added: - src/plugins/satellite-selection/satellite-selection.ts - src/plugins/satellite-selection/satellite-selection.css - public/img/icons/satellite-selection.png Files modified: - src/plugins/plugins.ts (plugin registration) - src/plugins/keeptrack-plugins-configuration.ts (plugin configuration)
1 parent ab8ffd2 commit e135394

File tree

5 files changed

+406
-0
lines changed

5 files changed

+406
-0
lines changed
4.44 KB
Loading

src/plugins/keeptrack-plugins-configuration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export type KeepTrackPluginsConfiguration = {
6262
NextLaunchesPlugin?: PluginConfiguration;
6363
OrbitReferences?: PluginConfiguration;
6464
SatellitePhotos?: PluginConfiguration;
65+
SatelliteSelection?: PluginConfiguration;
6566
Planetarium?: PluginConfiguration;
6667
EciPlot?: PluginConfiguration;
6768
EcfPlot?: PluginConfiguration;

src/plugins/plugins.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import { SatInfoBoxSensor } from './sat-info-box-sensor/sat-info-box-sensor';
5555
import { SatInfoBox } from './sat-info-box/sat-info-box';
5656
import { SatelliteFov } from './satellite-fov/satellite-fov';
5757
import { SatellitePhotos } from './satellite-photos/satellite-photos';
58+
import { SatelliteSelection } from './satellite-selection/satellite-selection';
5859
import { ScenarioManagementPlugin } from './scenario-management/scenario-management';
5960
import { ScreenRecorder } from './screen-recorder/screen-recorder';
6061
import { Screenshot } from './screenshot/screenshot';
@@ -187,6 +188,7 @@ export class PluginManager {
187188
{ init: () => new ProximityOps().init(), config: plugins.ProximityOps },
188189
{ init: () => new OrbitReferences().init(), config: plugins.OrbitReferences },
189190
{ init: () => new Collisions().init(), config: plugins.Collisions },
191+
{ init: () => new SatelliteSelection().init(), config: plugins.SatelliteSelection },
190192
{ init: () => new OrbitGuardMenuPlugin().init(), config: plugins.OrbitGuardMenuPlugin },
191193
{ init: () => new TrackingImpactPredict().init(), config: plugins.TrackingImpactPredict },
192194
{ init: () => new Breakup().init(), config: plugins.Breakup },
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Styling for the Satellite Selection (TOCA/POCA) Plugin
3+
*/
4+
5+
#SatelliteSelection-menu {
6+
min-width: 600px;
7+
}
8+
9+
#SatelliteSelection-table {
10+
line-height: 1.5;
11+
font-size: 14px;
12+
margin-top: 15px;
13+
margin-bottom: 20px;
14+
width: 100%;
15+
}
16+
17+
#SatelliteSelection-table td {
18+
text-align: center;
19+
padding: 8px 5px;
20+
}
21+
22+
#SatelliteSelection-table th {
23+
text-align: center;
24+
padding: 8px 5px;
25+
}
26+
27+
#SatelliteSelection-satellite-info {
28+
margin-bottom: 15px;
29+
padding: 10px;
30+
background-color: rgba(0, 0, 0, 0.1);
31+
border-radius: 5px;
32+
}
33+
34+
#SatelliteSelection-satellite-info p {
35+
margin: 5px 0;
36+
font-weight: bold;
37+
font-size: 14px;
38+
}
39+
40+
#SatelliteSelection-primary-sat {
41+
color: #4CAF50;
42+
}
43+
44+
#SatelliteSelection-target-sat {
45+
color: #2196F3;
46+
}
47+
48+
#SatelliteSelection-set-target-btn {
49+
margin-top: 10px;
50+
margin-bottom: 15px;
51+
}
52+
53+
.SatelliteSelection-event {
54+
cursor: pointer;
55+
transition: background-color 0.2s ease;
56+
}
57+
58+
.SatelliteSelection-event:hover {
59+
background-color: rgba(255, 255, 255, 0.1);
60+
}

0 commit comments

Comments
 (0)