Plugin Scripts
Plugin scripts provide a method for incorporating customer-specific, nongeneric modeling into STK computations. You create scripts, written in either MATLAB, VBScript or Python, that are executed at specified times during a computation to integrate your own models within STK's computational framework. Plugin scripts provide a simple-to-use mechanism for customizing STK while leveraging its generic computational algorithms.
The use of Perl as a scripting language for Plugin Scripts has been deprecated. Python is the recommended replacement language.
Each plugin script chooses its own inputs and outputs from a group of available variables. The outputs of a plugin script define its intended use; for example, you can use a script that generates force model parameters as a Propagator plugin script but not as an Access Constraint plugin script. Because each plugin script has a very specific task, its possible outputs have been limited by design. Even so, there are still quite a few. The inputs to a script are another matter entirely: calling user-created scripts during computations would be of little use if the inputs that were needed to create the outputs were unavailable. The plugin points described below provide a very large number of possible inputs. In many cases, virtually all ephemeris- and attitude-related data from any object in the scenario can be accessed as an input.
By providing all the required input data and leveraging existing computational algorithms, plugin scripts provide a simple, elegant, quick solution for customizing models within STK.
Example of customizing your models without rewriting the software for each case
Consider modeling the forces on the International Space Station (ISS). The ISS has large solar panel arrays that rotate to align with the Sun as it travels in its orbit. Thus, the area of the vehicle that is exposed to atmospheric drag varies periodically over each orbit due to the changing orientation of the solar panels. Normally, STK Astrogator assumes a constant area when computing the drag force, like almost all orbit propagators. It is not that the computations involved with varying drag area are difficult—they are not. Rather, the reason that most integrators don't handle varying area is that there is no generic model of variable satellite area for a user to choose. Every satellite's drag area is very much dependent on its moving surfaces, their attitudes, and the satellite's own attitude. That is, it is highly specific to the satellite and not generic at all.
By using plugin scripts, you can create a plugin script that just models the surface area as a function in time and have STK Astrogator calculate the drag force using this new surface area model. Because you have complete control over the script, the model can be as complicated or as simple as you need it to be. STK automatically handles the remaining aspects of integrating the orbit ephemeris, such as the following:
- computing the drag force based on the area computed within the script
- computing other forces
- numerically integrating the equations of motion
- maintaining accuracy using a step error control method
This gives you complete flexibility in modeling just the task at hand without requiring the development and testing of other supporting code.
This example is specific to one particular problem. You can use plugin scripts in many other computations to provide customization of many different models.
Plugin script applications
Sample plugin scripts are located under <STK install folder>\CodeSamples\Extend\PluginScripts. Plugin scripts are available for each of the following areas:
STK Astrogator
Application | Script Description |
---|---|
Astrogator Propagator | Models additional forces (e.g., lift), atmospheric density, and time-varying parameters. |
Astrogator Engine Model | Models engine thrust, mass flow rate, and Isp. |
Astrogator Calc Objects | Models a user-specific computation. |
STK Communications
Application | Script Description |
---|---|
Transmitter | Models a user-defined transmitter. |
Receiver | Models a user-defined receiver. |
Custom Antenna Gain | Models Custom Antenna Gain. |
Absorption Loss Model | Models a user-specific Absorption Loss Model. |
Rain Loss Model | Models a user-specific Rain Loss Model. |
Antenna Multibeam Selection Strategy | Models a user-defined Antenna Multibeam Selection Strategy. |
CommSystem Link Selection Strategy | Models a user-defined CommSystem Link Selection Strategy. |
Comm Constraint | Models user-specific Comm Constraint. |
Filter | Models a user-defined filter. |
Modulator | Models a user-defined modulator. |
Demodulator | Models a user-defined demodulator. |
STK Radar
Application | Script Description |
---|---|
Search/Track Constraint | Models a Search/Track Constraint. |
SAR Constraint | Models a SAR Constraint. |
STK
Application | Script Description |
---|---|
Vector Geometry Tool Custom Vector | Models a time-varying vector. |
Vector Geometry Tool Custom Axes | Models time-varying axes. |
Vector Geometry Tool Custom Scalars | Models scalar time-varying calculations. |
Access Constraint | Models a visibility constraint that is utilized during access computations. |
Attitude Simulator | Models external torques and implementing attitude control laws. |