fix: 更新卫星和地面站管理器中的选项解构,确保 showOrbit 属性的正确性

This commit is contained in:
严浩
2025-04-03 13:29:25 +08:00
parent 61e6b21d90
commit b742597f61
3 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ export class SatelliteCalculator {
options: Pick<I卫星, 'orbitDurationSeconds' | 'showOrbit' | 'timeStepSeconds'>,
satelliteId: string,
): null | OrbitCalculationResult {
const { orbitDurationSeconds = , timeStepSeconds = , showOrbit = true } = options;
const { orbitDurationSeconds = , timeStepSeconds = , showOrbit } = options;
const sampledPositionProperty = new Cesium.SampledPositionProperty();
const orbitPositions: Cesium.Cartesian3[] = [];

View File

@ -11,7 +11,7 @@ export interface I站点 {
export interface I卫星 {
id: string; // 卫星的唯一标识符
orbitDurationSeconds?: number; // 轨道显示时长
showOrbit?: boolean; // 是否显示完整轨道线,默认为 true
showOrbit: boolean; // 是否显示完整轨道线
timeStepSeconds?: number; // 轨道计算步长(秒),默认为 30
tle: string; // 包含卫星名称和两行 TLE 数据的字符串,格式如下:
// NAME

View File

@ -36,7 +36,7 @@ export class HCesiumSatelliteManager {
return existingEntry.entity;
}
const { id, tle, showOrbit = true } = options;
const { id, tle, showOrbit } = options;
// --- 解析 TLE 和计算轨道 ---
const satrec = this.calculator.parseTle(tle, id);