Plugin scripts provide a method for incorporating customer-specific, non-generic modeling into STK computations. You create scripts (written in either MATLAB, Perl, 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.
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, a script that outputs force model parameters can be used as an 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 (but even then 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.
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. The remaining aspects of integrating the orbit ephemeris (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, etc.) are handled automatically by STK. 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. Plugin scripts can be used in many other computations to provide customization of many different models.
Sample plugin scripts are located under <STK install folder>\CodeSamples\Extend\PluginScripts. Plugin scripts are available for each of the following areas:
|Astrogator Propagator||Models additional forces (e.g., lift), atmospheric density, time-varying parameters.|
|Astrogator Engine Model||Models engine thrust, mass flow rate, and Isp.|
|Astrogator Calc Objects||Models a user-specific computation.|
|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.|
|Search/Track Constraint||Models a Search/Track Constraint.|
|SAR Constraint||Models a SAR Constraint.|
|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.|