diff --git a/package.json b/package.json index 7f84ce8..0fbc7f1 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "lucide-vue-next": "^0.485.0", "mitt": "^3.0.1", "nprogress": "^0.2.0", - "orbpro": "^1.126.0", "page-stack-vue3": "^2.5.6", "pinia": "^3.0.1", "pinia-plugin-persistedstate": "^4.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f67c409..c2df7a1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -79,9 +79,6 @@ importers: nprogress: specifier: ^0.2.0 version: 0.2.0 - orbpro: - specifier: ^1.126.0 - version: 1.126.0 page-stack-vue3: specifier: ^2.5.6 version: 2.5.6(vue-router@4.5.0(vue@3.5.13(typescript@5.8.2)))(vue@3.5.13(typescript@5.8.2)) @@ -3537,10 +3534,6 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - orbpro@1.126.0: - resolution: {integrity: sha512-qmv+LEXOii2EOwJqEQXj8H3d33Fac/clJ4QGLNbZUymtpQDMQ0wExRlSIe71lZccIEiM3B7TG2eFHg620INvdg==} - engines: {node: '>=18.18.0'} - oxc-resolver@4.2.0: resolution: {integrity: sha512-x9bzmn1rQRu2cRT6dC6qOCKyStDVubXsf5H3UloUG/UFjzufmNu8DHTxafYDaSlA9Y+rorD+EnmF7sWSaFdd7g==} @@ -8190,8 +8183,6 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - orbpro@1.126.0: {} - oxc-resolver@4.2.0: optionalDependencies: '@oxc-resolver/binding-darwin-arm64': 4.2.0 diff --git a/src/pages/Satellite/OrbPro/CesiumViewer.vue b/src/pages/Satellite/OrbPro/CesiumViewer.vue deleted file mode 100644 index 566de82..0000000 --- a/src/pages/Satellite/OrbPro/CesiumViewer.vue +++ /dev/null @@ -1,60 +0,0 @@ - - - - - diff --git a/src/pages/Satellite/OrbPro/Initialization options for the Viewer constructor.ts b/src/pages/Satellite/OrbPro/Initialization options for the Viewer constructor.ts deleted file mode 100644 index 7272765..0000000 --- a/src/pages/Satellite/OrbPro/Initialization options for the Viewer constructor.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Initialization options for the Viewer constructor - * @property [animation = true] - If set to false, the Animation widget will not be created. - * @property [baseLayerPicker = true] - If set to false, the BaseLayerPicker widget will not be created. - * @property [fullscreenButton = true] - If set to false, the FullscreenButton widget will not be created. - * @property [vrButton = false] - If set to true, the VRButton widget will be created. - * @property [geocoder = IonGeocodeProviderType.DEFAULT] - The geocoding service or services to use when searching with the Geocoder widget. If set to false, the Geocoder widget will not be created. - * @property [homeButton = true] - If set to false, the HomeButton widget will not be created. - * @property [infoBox = true] - If set to false, the InfoBox widget will not be created. - * @property [sceneModePicker = true] - If set to false, the SceneModePicker widget will not be created. - * @property [selectionIndicator = true] - If set to false, the SelectionIndicator widget will not be created. - * @property [timeline = true] - If set to false, the Timeline widget will not be created. - * @property [navigationHelpButton = true] - If set to false, the navigation help button will not be created. - * @property [navigationInstructionsInitiallyVisible = true] - True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button. - * @property [scene3DOnly = false] - When true, each geometry instance will only be rendered in 3D to save GPU memory. - * @property [shouldAnimate = false] - true if the clock should attempt to advance simulation time by default, false otherwise. This option takes precedence over setting {@link Viewer#clockViewModel}. - * @property [clockViewModel = new ClockViewModel(clock)] - The clock view model to use to control current time. - * @property [selectedImageryProviderViewModel] - The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true. - * @property [imageryProviderViewModels = createDefaultImageryProviderViewModels()] - The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true. - * @property [selectedTerrainProviderViewModel] - The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if `baseLayerPicker` is set to true. - * @property [terrainProviderViewModels = createDefaultTerrainProviderViewModels()] - The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if `baseLayerPicker` is set to true. - * @property [baseLayer = ImageryLayer.fromWorldImagery()] - The bottommost imagery layer applied to the globe. If set to false, no imagery provider will be added. This value is only valid if `baseLayerPicker` is set to false. Cannot be used when `globe` is set to false. - * @property [ellipsoid = Ellipsoid.default] - The default ellipsoid. - * @property [terrainProvider = new EllipsoidTerrainProvider()] - The terrain provider to use - * @property [terrain] - A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined. - * @property [skyBox] - The skybox used to render the stars. When undefined and the WGS84 ellipsoid used, the default stars are used. If set to false, no skyBox, Sun, or Moon will be added. - * @property [skyAtmosphere] - Blue sky, and the glow around the Earth's limb. Enabled when the WGS84 ellipsoid used. Set to false to turn it off. - * @property [fullscreenElement = document.body] - The element or id to be placed into fullscreen mode when the full screen button is pressed. - * @property [useDefaultRenderLoop = true] - True if this widget should control the render loop, false otherwise. - * @property [targetFrameRate] - The target frame rate when using the default render loop. - * @property [showRenderLoopErrors = true] - If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs. - * @property [useBrowserRecommendedResolution = true] - If true, render at the browser's recommended resolution and ignore window.devicePixelRatio. - * @property [automaticallyTrackDataSourceClocks = true] - If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently. - * @property [contextOptions] - Context and WebGL creation properties passed to {@link Scene}. - * @property [sceneMode = SceneMode.SCENE3D] - The initial scene mode. - * @property [mapProjection = new GeographicProjection(options.ellipsoid)] - The map projection to use in 2D and Columbus View modes. - * @property [globe = new Globe(options.ellipsoid)] - The globe to use in the scene. If set to false, no globe will be added and the sky atmosphere will be hidden by default. - * @property [orderIndependentTranslucency = true] - If true and the configuration supports it, use order independent translucency. - * @property [creditContainer] - The DOM element or ID that will contain the {@link CreditDisplay}. If not specified, the credits are added to the bottom of the widget itself. - * @property [creditViewport] - The DOM element or ID that will contain the credit pop up created by the {@link CreditDisplay}. If not specified, it will appear over the widget itself. - * @property [dataSources = new DataSourceCollection()] - The collection of data sources visualized by the widget. If this parameter is provided, - * the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed. - * @property [shadows = false] - Determines if shadows are cast by light sources. - * @property [terrainShadows = ShadowMode.RECEIVE_ONLY] - Determines if the terrain casts or receives shadows from light sources. - * @property [mapMode2D = MapMode2D.INFINITE_SCROLL] - Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction. - * @property [projectionPicker = false] - If set to true, the ProjectionPicker widget will be created. - * @property [blurActiveElementOnCanvasFocus = true] - If true, the active element will blur when the viewer's canvas is clicked. Setting this to false is useful for cases when the canvas is clicked only for retrieving position or an entity data without actually meaning to set the canvas to be the active element. - * @property [requestRenderMode = false] - If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, but requires using {@link Scene#requestRender} to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}. - * @property [maximumRenderTimeChange = 0.0] - If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See {@link https://cesium.com/blog/2018/01/24/cesium-scene-rendering-performance/|Improving Performance with Explicit Rendering}. - * @property [depthPlaneEllipsoidOffset = 0.0] - Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation. - * @property [msaaSamples = 1] - If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets. - * @property [animationContainer = false] - If provided, will include the animationContainer without the widget. - * @property [timelineContainer = false] - If provided, will include the timelineContainer without the widget. - * @property [bottomContainer] - The DOM element or ID that will contain the bottomContainer. If not specified, the bottomContainer is added to the widget itself. - */ - -export {}; diff --git a/src/pages/Satellite/OrbPro/README.md b/src/pages/Satellite/OrbPro/README.md deleted file mode 100644 index fe2c2de..0000000 --- a/src/pages/Satellite/OrbPro/README.md +++ /dev/null @@ -1 +0,0 @@ -- https://github.com/DigitalArsenal/SDA-TAP-LAB/deployments diff --git a/src/pages/Satellite/OrbPro/fns/demo.ts b/src/pages/Satellite/OrbPro/fns/demo.ts deleted file mode 100644 index 9a5a601..0000000 --- a/src/pages/Satellite/OrbPro/fns/demo.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { PromiseConfirmationService } from '@/utils'; -import { - Cartesian2, - Cartesian3, - Color, - MakeBillboardLabel, - NearFarScalar, - SpaceCatalogDataSource, - SpaceEntity, - VerticalOrigin, - type Viewer, - viewerReferenceFrameMixin, -} from 'orbpro'; - -declare global { - interface Window { - spaceCatalog: SpaceCatalogDataSource; - } -} - -export async function demoOrbitGeneration(viewer: Viewer) { - // @ts-expect-error globalThis - globalThis.spaceCatalog = new SpaceCatalogDataSource({ name: 'celestrak' }); - viewer.extend(viewerReferenceFrameMixin); - viewer.referenceFrame = 1; - - // https://spacedatastandards.org/#/standards?search=OMM - const ISS = new SpaceEntity({ - id: '25544', - label: { - backgroundColor: new Color(0.1, 0.1, 0.1, 0.9), - font: `1rem Helvetica`, - pixelOffset: new Cartesian2(10, 0), - pixelOffsetScaleByDistance: new NearFarScalar(1.5e2, 3, 1.5e7, 0.5), - scaleByDistance: new NearFarScalar(1.5e2, 1.5, 13e7, 0), - show: false, - showBackground: true, - }, - name: 'ISS', - point: { - pixelSize: 1, - }, - viewFrom: new Cartesian3(-1_678_500.749_350_715_4, -17_680_994.634_034_64, 24_667_690.486_357_275), - }); - - ISS.position.loadOMM({ - /* CCSDS OMM版本 */ ARG_OF_PERICENTER: 149.2285, - /* 创建日期(ISO 8601 UTC格式) */ BSTAR: 0.000_282_17, - /* 创建者 */ CCSDS_OMM_VERS: 0, - /* 卫星名称 */ CENTER_NAME: null, - /* 国际标识符(YYYY-NNNAAA) */ CLASSIFICATION_TYPE: 'U', - /* 中心名称(例如:EARTH, MARS) */ COMMENT: null, - /* 参考坐标系 */ COV_REFERENCE_FRAME: 23, - /* 参考坐标系历元(ISO 8601 UTC格式) */ CREATION_DATE: null, - /* 时间系统[M, UTC] */ CX_DOT_X: 0, - /* 平均元素理论 */ CX_DOT_X_DOT: 0, - /* 注释 */ CX_DOT_Y: 0, - /* 平均开普勒根数的历元(ISO 8601 UTC格式) */ CX_DOT_Z: 0, - /* 半长轴(km) */ CX_X: 0, - /* 平均运动(圈/天) */ CY_DOT_X: 0, - /* 偏心率(无量纲) */ CY_DOT_X_DOT: 0, - /* 轨道倾角(度) */ CY_DOT_Y: 0, - /* 升交点赤经(度) */ CY_DOT_Y_DOT: 0, - /* 近地点幅角(度) */ CY_DOT_Z: 0, - /* 平近点角(度) */ CY_X: 0, - /* 引力常数(km³/s²) */ CY_Y: 0, - /* 质量(kg) */ CZ_DOT_X: 0, - /* 太阳辐射面积(m²) */ CZ_DOT_X_DOT: 0, - /* 太阳辐射压系数(无量纲) */ CZ_DOT_Y: 0, - /* 大气阻力面积(m²) */ CZ_DOT_Y_DOT: 0, - /* 大气阻力系数(无量纲) */ CZ_DOT_Z: 0, - /* 星历类型(SGP,SGP4等) */ CZ_DOT_Z_DOT: 0, - /* 分类类型,默认'U' */ CZ_X: 0, - /* NORAD编号 */ CZ_Y: 0, - /* 根数组编号 */ CZ_Z: 0, - /* 历元时的圈次 */ DRAG_AREA: 0, - /* 气阻系数(1/地球半径) */ DRAG_COEFF: 0, - /* 平均运动一阶导数(圈/天²) */ ECCENTRICITY: 0.000_334_9, - /* 平均运动二阶导数(圈/天³) */ ELEMENT_SET_NO: 999, - /* 协方差矩阵参考坐标系 */ EPHEMERIS_TYPE: 0, - /* --- 位置/速度协方差矩阵(6x6下三角) --- */ - /* 位置协方差矩阵元素(km²) */ EPOCH: '2024-05-08T19:52:52.426848', - /* 位置协方差矩阵元素(km²) */ GM: 0, - /* 位置协方差矩阵元素(km²) */ INCLINATION: 51.6355, - /* 位置协方差矩阵元素(km²) */ MASS: 0, - /* 位置协方差矩阵元素(km²) */ MEAN_ANOMALY: 210.8902, - /* 位置协方差矩阵元素(km²) */ MEAN_ELEMENT_THEORY: 0, - /* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION: 15.510_256_15, - /* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION_DDOT: 0, - /* 速度-位置协方差矩阵元素(km²/s) */ MEAN_MOTION_DOT: 0.000_162_75, - /* 速度协方差矩阵元素(km²/s²) */ NORAD_CAT_ID: 25_544, - /* 速度-位置协方差矩阵元素(km²/s) */ OBJECT_ID: '1998-067A', - /* 速度-位置协方差矩阵元素(km²/s) */ OBJECT_NAME: 'ISS (ZARYA)', - /* 速度-位置协方差矩阵元素(km²/s) */ ORIGINATOR: null, - /* 速度协方差矩阵元素(km²/s²) */ RA_OF_ASC_NODE: 150.5366, - /* 速度协方差矩阵元素(km²/s²) */ REFERENCE_FRAME: 2, - /* 速度-位置协方差矩阵元素(km²/s) */ REFERENCE_FRAME_EPOCH: null, - /* 速度-位置协方差矩阵元素(km²/s) */ REV_AT_EPOCH: 45_244, - /* 速度-位置协方差矩阵元素(km²/s) */ SEMI_MAJOR_AXIS: 0, - /* 速度协方差矩阵元素(km²/s²) */ SOLAR_RAD_AREA: 0, - /* 速度协方差矩阵元素(km²/s²) */ SOLAR_RAD_COEFF: 0, - /* 速度协方差矩阵元素(km²/s²) */ TIME_SYSTEM: 11, - /* --- 用户自定义字段 --- */ - /* 用户自定义BIP-0044类型 */ USER_DEFINED_BIP_0044_TYPE: 0, - /* 用户自定义对象标识符 */ USER_DEFINED_EARTH_MODEL: null, - /* 用户自定义地球模型 */ USER_DEFINED_EPOCH_TIMESTAMP: 0, - /* 用户自定义历元时间戳 */ USER_DEFINED_MICROSECONDS: 0, - /* 用户自定义微秒数 */ USER_DEFINED_OBJECT_DESIGNATOR: null, - }); - - ISS.point!.pixelSize = 10 as any; - ISS.point!.color = Color.WHITE as any; - - MakeBillboardLabel({ - entity: ISS, - fontSize: 36, - text: 'ISS-text', - verticalOrigin: VerticalOrigin.CENTER, - }); - - const issDataSource = new SpaceCatalogDataSource({ name: 'issSource' }); - Object.assign(globalThis, { issDataSource }); - issDataSource.entities.add(ISS); // FIXME: add后有问题。 - await viewer.dataSources.add(issDataSource); - - // await new Promise((_r) => setTimeout(_r, 1000)); - // viewer.camera.flyTo({ - // destination: ISS.position.getValue(viewer.clock.currentTime)!, - // orientation: { - // heading: 0.0, - // pitch: -Math.PI / 2, - // roll: 0.0, - // }, - // duration: 2, - // }); - - viewer.extend(viewerReferenceFrameMixin); - viewer.referenceFrame = 1; - - const shshowOrbitow = await PromiseConfirmationService({ message: '要显示轨道吗?' }); - ISS.showOrbit({ show: shshowOrbitow }); - - const showCoverage = await PromiseConfirmationService({ message: '要显示覆盖区吗?' }); - ISS.showCoverage({ show: showCoverage }); - - // /* let dynamicTimeline = */ new DynamicTimeline(viewer.timeline.container, viewer); - - const track = await PromiseConfirmationService({ message: '要追踪卫星吗?' }); - if (track) viewer.trackedEntity = ISS; -} diff --git a/src/pages/Satellite/OrbPro/fns/index.ts b/src/pages/Satellite/OrbPro/fns/index.ts deleted file mode 100644 index cabe1dd..0000000 --- a/src/pages/Satellite/OrbPro/fns/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './demo.ts'; diff --git a/src/pages/Satellite/OrbPro/index.page.vue b/src/pages/Satellite/OrbPro/index.page.vue deleted file mode 100644 index 93a912f..0000000 --- a/src/pages/Satellite/OrbPro/index.page.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - diff --git a/typed-router.d.ts b/typed-router.d.ts index 248e596..24da8d1 100644 --- a/typed-router.d.ts +++ b/typed-router.d.ts @@ -33,7 +33,6 @@ declare module 'vue-router/auto-routes' { 'PkgsUsageI18n': RouteRecordInfo<'PkgsUsageI18n', '/PkgsUsage/I18n', Record, Record>, 'PkgsUsageTsEnumUtil': RouteRecordInfo<'PkgsUsageTsEnumUtil', '/PkgsUsage/ts-enum-util', Record, Record>, 'SatelliteCesium': RouteRecordInfo<'SatelliteCesium', '/Satellite/Cesium', Record, Record>, - 'SatelliteOrbPro': RouteRecordInfo<'SatelliteOrbPro', '/Satellite/OrbPro', Record, Record>, 'UIComponentsAntdV': RouteRecordInfo<'UIComponentsAntdV', '/UI-components/AntdV', Record, Record>, 'UIComponentsComponents': RouteRecordInfo<'UIComponentsComponents', '/UI-components/Components', Record, Record>, 'UIComponentsInfiniteLoading': RouteRecordInfo<'UIComponentsInfiniteLoading', '/UI-components/infinite-loading', Record, Record>,