Plugin Constraints
STK provides many Access constraints that you can use to model visibility between objects. However, new mission proposals may involve new visibility requirements that cannot be readily configured using the existing STK Access constraints. Access constraint plugin scripts provide a method for adding these nongeneric, 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.
For each access processing step, an access constraint plugin script processes inputs (that it has requested) and returns a single result (a double). 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 Extend the Engine. For instructions on the setup and use of plugin points, see Plugin Scripts. To develop a custom script from a sample template, select the appropriate sample plugin script, in MATLAB, VBScript, or Python, from <STK install folder>\CodeSamples\Extend\PluginScripts.
Utilizing an access constraint plugin script
There are three steps to utilizing an access constraint plugin script:
- The script must be written to conform to a well-defined calling convention.
- The script source file must be placed in a specific directory path, which STK searches at application startup.
- A particular object's constraints must be configured to use the plugin script by setting the Min and/or Max value on the Constraint-Active property page.
The first two steps make the constraint available for certain classes of objects.
Editing an access constraint plugin script
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.
Script source file location
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:
<STK install folder>\STKData\Scripting\Constraints
<STK user area>\Scripting\Constraints
<STK all users area>\Scripting\Constraints