feat(earth): add predicted orbit display for locked satellites
- Calculate orbital period from meanMotion - Generate predicted orbit points with 10s sampling - Show complete orbit line when satellite is locked - Hide orbit when satellite is unlocked - Color gradient: bright (current) to dark (end) - Fix TLE epoch format issue with fallback circle orbit - Add visibility change handler to clear trails on page hide - Fix satellite count display after loading - Merge predicted-orbit plan into single file
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
} from './ui.js';
|
||||
import { createEarth, createClouds, createTerrain, createStars, createGridLines, toggleTerrain, getEarth } from './earth.js';
|
||||
import { loadGeoJSONFromPath, loadLandingPoints, handleCableClick, clearCableSelection, getCableLines, getCablesById, lockedCable as cableLocked, getCableState, setCableState, clearAllCableStates, applyLandingPointVisualState, resetLandingPointVisualState, getAllLandingPoints, getShowCables } from './cables.js';
|
||||
import { createSatellites, loadSatellites, updateSatellitePositions, toggleSatellites, toggleTrails, getShowSatellites, selectSatellite, getSatelliteData, getSatellitePoints, setSatelliteRingState, updateLockedRingPosition, updateHoverRingPosition, getSatellitePositions } from './satellites.js';
|
||||
import { createSatellites, loadSatellites, updateSatellitePositions, toggleSatellites, toggleTrails, getShowSatellites, getSatelliteCount, selectSatellite, getSatelliteData, getSatellitePoints, setSatelliteRingState, updateLockedRingPosition, updateHoverRingPosition, getSatellitePositions, showPredictedOrbit, hidePredictedOrbit } from './satellites.js';
|
||||
import { setupControls, getAutoRotate, getShowTerrain, zoomLevel, setAutoRotate, toggleAutoRotate, resetView } from './controls.js';
|
||||
import { initInfoCard, showInfoCard, hideInfoCard, getCurrentType, setInfoCardNoBorder } from './info-card.js';
|
||||
|
||||
@@ -34,6 +34,7 @@ let dragStartTime = 0;
|
||||
let isLongDrag = false;
|
||||
|
||||
export function clearLockedObject() {
|
||||
hidePredictedOrbit();
|
||||
hoveredCable = null;
|
||||
hoveredSatellite = null;
|
||||
hoveredSatelliteIndex = null;
|
||||
@@ -202,6 +203,7 @@ async function loadData(showWhiteSphere = false) {
|
||||
(async () => {
|
||||
const satCount = await loadSatellites();
|
||||
console.log(`卫星数据加载完成: ${satCount} 颗`);
|
||||
document.getElementById('satellite-count').textContent = satCount + ' 颗';
|
||||
updateSatellitePositions();
|
||||
console.log('卫星位置已更新');
|
||||
toggleSatellites(true);
|
||||
@@ -438,6 +440,7 @@ function onClick(event, camera, renderer) {
|
||||
lockedObjectType = 'satellite';
|
||||
lockedSatellite = sat;
|
||||
lockedSatelliteIndex = index;
|
||||
showPredictedOrbit(sat);
|
||||
setAutoRotate(false);
|
||||
|
||||
const satPositions = getSatellitePositions();
|
||||
|
||||
Reference in New Issue
Block a user