Automating STK – a quick guide

STK is a great analysis tool that you can use from the preliminary mission design phase up to the operational phase of your mission. Thousands of metrics are available from its analytical engine, providing an unmatched awareness about any possible aspect you may need to consider during each phase.

Despite STK's huge size (more than 7 million lines of code and 30 years of development…), there are ways to tailor STK to meet your needs, such as creating a specific pattern or workflow (e.g., importing data from other tools or performing a Montecarlo analysis) or adding a specific computational capability that is not available by default. When you have this need, you definitively need to get into the automation/integration domain. First, I’d like to define what I mean with the words automation and integration.

Automation is the ability to automatically perform repetitive tasks; for example, you’d like to get the coverage performance of a LEO satellite while systematically changing its inclination. While this is a potentially applicable approach even without automation, it’s very useful to embed all the necessary actions (such as coverage calculation and data provider retrieval) into a for loop, in such a way that you only need to run a script to get all the data.

Integration is the ability to connect STK with the external world and exchange data in real time; for example, you may need to output real-time satellite attitude data to an attitude controller designed in Simulink.

There is no fixed border between the two classifications, most of the time we use automation and integration together in a seamless way, defining a complex, fully customized simulation infrastructure.

STK can be automated / integrated by using two different approaches to manipulate parameters and perform analysis:

API set, using the STK Object Model. When in automation mode, the link is established through the COM layer.

Connect commands set. An ASCII based command string dictionary that works either from inside STK or from outside (using either TCP/IP or COM).

Different reasons to automate and/or integrate

Why you should automate or integrate STK? Well, there are so many possible reasons that I cannot list all of them. You may need a specific calculation parameter that is not available by default (e.g., the cross-sectional area of a tumbling spacecraft) or a custom form to input/output data to a database. On the other hand, if you need orbit related inputs in your custom project (e.g., to optimize the data collection schedule of your ground station), it is good to know that STK has a rich API set through which you can use the powerful STK analytical engine inside your application. Finally, if you’re designing a specific guidance law to implement into your interceptor system, you can have STK provide a target’s position over time, and display and collect data for real-time and post processing analysis.

Possible approaches

Below is a (partial) list of possible approaches for automating/integrating STK.

UI Plugin. A compiled library in STK, with additional windows/menus as a graphical front end, useful for data entry/retrieval.

HTML interface. Embed custom code into HTML pages.

Automation. Use third party software (MATLAB, Excel, custom .NET app,...) and run it side by side with STK.

Which approach is best to me?

It mostly depends on two factors:

Your coding experience. You can use Java, C++, C#, vb.NET, MATLAB, Python and other programming languages to deploy your project. The STK object model is available in any of them, so you are free to choose which one best fits your needs. In case you don’t have any coding skills, then Connect is the right approach since it is purely string based.

Complexity of the customization. For easy tasks, a script approach (e.g., VBScript into an HTML page) would be faster and less code demanding, but when the complexity rises above a certain threshold (e.g., manual data entry from a custom interface is needed), compiled code is much better.