Script components are a subset of Calculation Object components. They include Custom Functions and MATLAB, VBScript, Perl, or JScript Inline Functions.
ComponentBrowser */ SetValue "Calculation Objects" {Component} {Attribute} <Value> [{Unit}]
ComponentBrowser */ Duplicate "Calculation Objects" {Component} <Duplicate Component Name>
The Script components are:
Component | Description |
---|---|
CustomFunctionCalcObject | Calculation produced by a Custom Function. See more details in the Custom Functions table below. |
JScript | Calculation produced by a JScript inline function |
MATLAB | Calculation produced by a MATLAB inline function |
Perl | Calculation produced by a Perl inline function |
VBScript | Calculation produced by a VBScript inline function |
The attributes for each component have the same names and value selections that appear in the Astrogator graphical user interface.
To use any MATLAB function, even an in-line function, you must be able to connect to MATLAB; STK will automatically start a session and connect when required. Inline functions are used for very simple computations that are not presently available as Calculation Objects in the Component Browser. They have three attributes:
When an inline Calculation Object is used, STK creates a function with the inputs listed in CalcArguments, returning the value computed by the InlineFunc, with a name derived from the Calculation Object name itself.
Astrogator makes the following custom functions available:
Function | Description |
---|---|
MATLAB Custom Function | A custom function implemented using a MATLAB M-file. |
MATLAB DLL Custom Function | A custom function implemented using a MATLAB DLL. |
Perl Custom Function | A custom function implemented using a Perl script. |
Python Custom Function | A custom function implemented using a Python script. |
Script Engine Custom Function | A custom function implemented using an IScriptEngine interface. |
VB Script Custom Function | A custom function implemented using Visual Basic Script. |
These functions can be used, for example, in defining Propagators, Engines, and Calculation Objects. The interfaces for these functions can be found in Plugin Scripts.
In order to produce a MATLAB DLL function that will be compatible with Astrogator, you must meet the following conditions:
ComponentBrowser */ Duplicate "Calculation Objects" Perl "My Perl"
ComponentBrowser */ SetValue "Calculation Objects" "My CustomFunctionCalcObject" UnitDimension Temperature
STK Programming Interface 11.0.1