fix: 更新卫星和地面站管理器中的选项解构,确保 showOrbit 属性的正确性
This commit is contained in:
@ -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[] = [];
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user