Model Articulation File
Articulation keyword blocks and commands are an integral part of a model file. A separate file, called the model articulation file, contains the information needed to animate the articulation commands contained in the model file. The model articulation file contains a time-ordered list of data about each articulation that can be applied to the associated object.
Articulation file names are identical to the name of the object (not the model file), and have an object-specific extension. For example, if the object for which articulations are being specified is a satellite named LEOSat and the model file name is
vehicle1.mdl
, the articulation file name should be
LEOSat.sama
.
You can create model files using either the standard or spreadsheet format.
Note that the articulation file is directly related to a particular STK object instance and NOT to the model file that contains the articulation commands.
Object Extensions for Articulation Files
Object | Articulation Extension |
---|---|
aircraft | .acma |
facility | .fma |
ground vehicle | .gvma |
launch vehicle | .lvma |
missile | .mima |
place | .plcma |
satellite | .sama |
ship | .shma |
target | .tma |
Model File Formats
Articulation files must be stored in the scenario directory. These scripts are stored as <vehicle>.sama, .fma, .gvma, and similar files. You can use either a standard format or a spreadsheet format to create a model file.
The following sample files show how to use both the standard format and the spreadsheet format to create a single articulation that starts at Epoch Time 0, runs for 300 seconds, and moves a model component called "MainArm" from -66.3 degrees to -45 degrees.
Standard Model Format
NEW_ARTICULATION
STARTTIME 0
DURATION 300
DEADBANDDURATION 0.000000
ACCELDURATION 0.000000
DECELDURATION 0.000000
DUTYCYCLEDELTA 0.000000
PERIOD 0.0
ARTICULATION MainArm
TRANSFORMATION Roll
STARTVALUE -66.3
ENDVALUE -45
We recommend placing articulation arguments on a single line to improve readability, especially when editing times.
Spreadsheet Model Format
The spreadsheet format is much more compressed than the text file format and can be used with spreadsheet applications, such as Microsoft Excel. If you use a spreadsheet application to create an articulation file, you must then save it as a text file.
The file begins with the keyword SPREADSHEET, to indicate that it is in a spreadsheet-friendly format. Each line starts with the word ARTICULATION, followed by the usual articulation parameters in a particular order (the same order as shown in the standard example). Use spaces, commas, or tabs to separate the values.
Avoid having extraneous white space in an articulation spreadsheet file or you may see unexpected results.
In the following example, a tab character separates each of the values.
SPREADSHEET
ARTICULATION 0 300 0 0 0 0 0 MainArm Roll -66.3 -45
ARTICULATION 360 210 0 0 0 0 0 MainArm Roll -45 -70
ARTICULATION 570 210 0 0 0 0 0 MainArm Roll -70 -45
ARTICULATION 840 300 0 0 0 0 0 MainArm Roll -45 -66.3
In the following example, commas instead of tabs separate each of the values.
SPREADSHEET
ARTICULATION,0,300,0,0,0,0,0,MainArm,Roll,-66.3,-45
ARTICULATION,360,210,0,0,0,0,0,MainArm,Roll,-45,-70
ARTICULATION,570,210,0,0,0,0,0,MainArm,Roll,-70,-45
ARTICULATION,840,300,0,0,0,0,0,MainArm,Roll,-45,-66.3
The benefit of using a spreadsheet is that you can make values ripple down the rows, affecting other values and recalculating as needed when changes are made. Typically, you must save both an Excel-format and a tab-separated format version of the same file to preserve such automatic behavior. (Formulas needed to recalculate various values will not be saved into a tab- or comma-separated file.) You can also cut and paste from the spreadsheet to a text file.
Using STK Time Components
When creating an articulation file you can use STK Time Instants to specify the start time of the articulation. By using time components you can make the articulation time relative to the scenario start time or to any object time event.
Add the following at the top of an articulation file to make the articulation relative to the scenario epoch.
BEGIN SMARTEPOCH BEGIN EVENT Type EVENT_LINKTO Name ReferenceEpoch RelativePath Scenario/<scenario name> END EVENT END SMARTEPOCH
The Name parameter can refer to any available time instant component. The RelativePath parameter can contain the path to any object or access in the scenario. Removing or commenting out the RelativePath parameter will cause the relative path to default to the object the articulation is attached to. The RelativePath parameter requires an associated value or no articulation will take place.