Utilizing Plugin Scripts | Script Location
STK already provides numerous Access constraints that can be used to model visibility between objects. However, new mission proposals may involve new visibility requirements that cannot be readily configured using the existing Access constraints. Access constraint plugin scripts provide a method for adding these non-generic, customized constraints directly into visibility computations. The access constraint plugin script functionality is designed to be a seamless extension of the basic constraint processing.
When configured for an object, STK processing will utilize the plugin script when computing Access between objects. The plugin script appears as a Min/Max constraint to the rest of the STK processing.
An access constraint plugin script processes inputs (which it has requested) and returns a single result (a double), for each access processing step. The value provides a (continuous) measure of visibility between the FromObject and the ToObject at each requested sample time. This value is utilized by the access algorithms during sampling to predict and detect whether the value crosses the Min or Max value set for the constraint.
For further information on scripting in STK, see the Engine Plugin Scripts topic in the Programming Interface Help, which is accessible from the Help menu. For instructions on the setup and use of plugin points, see the Plugin Scripting Guide (in PDF format). To develop a custom script from a sample template, select the appropriate sample plugin script, in MATLAB, Perl, VBScript or Python, from <STK install folder>\CodeSamples\Extend\PluginScripts.
There are three steps to utilizing an access constraint plugin script:
The first two steps make the constraint available for certain classes of objects.
You can edit an access constraint plugin script's specific implementation in the current scenario by clicking Edit Settings... and making the desired changes in the window that appears.
The script source files must reside in the proper directory search path to be able to utilize the plugin script functionality. They must be located in one of the following directories:
[STKHOME]/STKData/Scripting/Constraints
[CONFIGDIR]/Scripting/Constraints
where [STKHOME] refers to the directory path that is the parent of STKData,and [CONFIGDIR] refers to the user's configuration directory.