STK二次开发

STK二次开发

引言

内容摘自AGI官网,仅供参考。

1. 开发者工具

ArchitectureDiagram.png

2022-01-23_175650.png

STK主要提供了三种开发工具(方式),下面分别介绍。

1.1 STK集成

Automate STK and integrate it with other applications to extend its capabilities.

自动化操作STK(不需要手动点击界面进行操作),并将其与其他应用程序集成(如Matlab等),以扩展其功能。

STK Integration enables you to automate repetitive tasks from outside Systems Tool Kit (STK), integrate other applications with STK, and access STK’s capabilities from other applications. Integration provides access to two APIs — the STK Object Model and Connect. All the components of Integration are fully documented, and AGI maintains a GitHub repository of code samples to help you get started with the STK Object Model.

通过与STK集成,可以在STK外部自动化执行重复的任务,也可以通过其他应用程序调用STK的功能。提供两类API—STK对象模型和Connect连接,关于STK Object Model的发展历史可以参见:A History of the Development of the STK Object Model,其中重点如下:

Originally, the only way to programmatically modify STK was through “Connect Commands”. The outside applications were able to establish TCP/IP connection with STK and exchange string commands. While STK OM was created as replacement for the Connect commands, the Connect commands can still be used as part of the STK OM. The Connect commands are still important as they fill current gaps in the STK OM.

虽然STK OM是用来替代Connect commands,但两者并不独立,在STK OM中仍旧可以使用Connect

2022-01-23_182839.png

注:这种开发方式依赖于STK桌面端。

1.2 STK Engine

STK Engine gives you access to STK’s analytical and visualization capabilities without the weight of STK’s graphical user interface. Using the Connect or STK Object Model APIs, you can achieve a seamless integration with an existing application or design an entirely new application to support a specific workflow. And to achieve even more efficient computation speeds, you can deactivate visualization.

STK Engine可以看作是没有用户界面的STK。

2022-01-23_190151.png

注:STK Engine在Windows、Linux环境下均可以使用,在Windows环境下安装STK后,就已经包含STK Engine,在Linux环境下STK Engine是单独压缩包。

1.3 STK Components

STK Components is a collection of native Java and .Net libraries designed to provide an extensible, open architecture for analyzing and visualizing complex  problems. Use the STK Components libraries in conjunction with your proprietary business logic to accelerate the development and deployment of software solutions for your enterprise or programs.

STK Components是Java、.Net库的集合。

2022-01-24_102401.png

注:STK Components独立于STK桌面端,对其没有依赖,就是纯资源库。

STK Engine与STK Components的区别:

虽然两个产品都提供了API用来扩展和自动化操作STK,但是两者在有些方面还是有很大不同的,在实际项目中可以根据两者的强项来选择更适合的产品。

You should use STK Engine if the STK fits into your workflow already. You need less programming knowledge to create a custom application using Engine because it works with the STK user interface. If you are familiar with the STK Object Model and Connect, you can use both of those APIs with Engine. By default, Engine enables graphics, but you can disable them to speed up computations.

如果STK的工作流程已经满足需要,就可以选择STK Engine。

You should use STK Components if you want to customize STK down to the core. To achieve this level of customization, you will need to rely on strong programming skills to adapt Components to your needs. Your reward is simple but powerful — full control over the capabilities of STK. With Components, you have the flexibility to create an application completely specialized to your mission. By default, Components does not include graphics, but it’s easy to integrate them.

STK Components相对来说更底层一些,如果想要深入到STK内核进行定制化,就需要选择STK Components。

三者关系:STK Engine可以看成是没有用户界面的STK,STK Components的大部分可以看成是STK Engine的底层依赖。

2. 应用场景

2.1 STK集成

依赖于STK桌面端,通过自动化的方式解决一些重复性的工作。比如原来可能需要手动在STK内创建100个Facility,现在可以通过Matlab脚本或者其他语言的接口直接自动化创建。

2.2 STK Engine

想要使用STK中的已有功能,但是用户界面根据自己的业务需要进行开发。适合桌面端系统开发,不适合作为B/S系统的服务端(作为后端服务需要向前端提供CZML,Windows环境下CZML的生成依赖于Connect命令,就是说需要STK桌面端的支持,显然无法满足STK桌面端替代的需求;STK Engine提供Linux版本,解压后可用,可以满足不安装STK的需求,应该也可以导出CZML;但是STK Engine的操作首先建立在 AgStkObjectRoot上,在其之上有场景的加载或新建、场景对象的创建等,后端可能需要同时维护多个rootObject,类似于运行多个STK,极其耗费资源。因此不适合作为后端服务。)。

2.3 STK Components

想要对STK进行更深层次的定制化功能开发。适合桌面端系统开发,也可以作为B/S系统的服务端,后端将分析结果生成czml文档,前端通过Cesium对结果进行可视化展示。

参考链接

[1]. STK Developer Tools

[2]. A History of the Development of the STK Object Model

[3]. STK Components

[4]. STK Integration

[5]. STK Engine

猜你喜欢

转载自blog.csdn.net/wml00000/article/details/122666656