Attitude Simulator Plugin Points

Attitude Simulator, introduced in STK version 4.3, is available for a Satellite object. The tool provides users the ability to incorporate their own torque models (e.g. gravity gradient, aerodynamic, etc.) and momentum biases, and implement customized control laws (including static and dynamic feedback, dynamic compensators, etc.) when generating attitude trajectories.

The tool numerically integrates an attitude state (represented by a quaternion) and its body angular velocity components as well as other optional variables. Attitude Simulator plugin scripts may supply these variables and generally perform custom computations during numerical integration.

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:

where <STK install folder> refers to the STK installation directory, <STK user area> refers to the STK User's directory, <STK all users area> refers to the directory that contains STK application data for all users, and <scenario folder> refers to the scenario directory.

Do not place your scripts directly in the Scenario folder. Doing so may cause errors with your script.

Outputs

The Attitude Simulator Plugin Point has the following available outputs:

Torque Descriptors

Keyword
Value
ArgumentType Output
Type Parameter
Name Torque
BasicType Vector

The torque is Double:3 and has units of N-m. The Torque output is used during the attitude simulation when integrating the attitude dynamics. The attitude simulator allows many different plugin scripts to be used within the same simulation: all the Torque outputs from all scripts are added together when integrating the attitude dynamics. The torque is expected to be in the vehicle's body frame.

Parameter Descriptors

Keyword
Value
ArgumentType Output
Type Parameter
Name Name of the parameter when accessed by this or other scripts
BasicType Double, Int, String, Vector, Quat or Matrix
Size String containing numberOfRows numberOfColumns

The Parameter output is used to share information in the current script to other plugin scripts. Other scripts can request this script's output as an input. The parameter may be a Double, integer (Int), String, Vector (Double:3), Quat (Double:4), or Matrix. If the BasicType is Matrix, then a 3x3 matrix is assumed if the Size keyword is not given. Other sizes can be specified using the Size keyword (whose value is a String containing two integers separated by a space representing the number of rows and the number of columns in the matrix).

Integrated Parameter Descriptors

Keyword
Value
ArgumentType Output
Type Parameter
Name Name of the parameter when accessed by this or other scripts
BasicType Double, Vector or Quat
IntegralName Name given to the integral of this parameter
InitialCondition String containing initial values of the integrated parameter separated by spaces

An Integrated Parameter is parameter that the Attitude Simulator will add to its integrator state to be integrated along with the attitude and attitude rate. The descriptor actually creates two Parameters that can be accessed as inputs: itself (accessed by Name) and its integral (accessed by IntegralName). The InitialCondition keyword is optional: if not given, zeroes are used. MomentumBias is a special value for IntegralName that allows user to integrate internal angular momentum due to momentum bias devices.

Several Parameters, each with different Names, can all affect the same integrated state by specifying the same IntegralName (in such cases the values of all Parameters with the same IntegralName are added to create the derivative information).

Inputs

The Attitude Simulator Plugin Point has the following available inputs:

Attitude State Descriptors

Keyword
Value
ArgumentType Input
Type Attitude
Derivative Yes or No
RefName Name of axes: the attitude state will be transformed into these Axes
RefSource STK path of the object that owns the RefName axes

The attitude state refers to the attitude being integrated within the simulator. The Derivative keyword is optional (default is No). If the value of Derivative is Yes, the input is Double:7 (the first 4 doubles being the quaternion, the last 3 being the angular velocity in units of radians per sec); otherwise the input is Double:4 (the quaternion). The RefName keyword is optional: if not specified, then vehicle's central body inertial axes are used. The RefSource keyword is optional: if not specified, it refers to the attitude simulator vehicle.

Parameter Descriptors

Keyword
Value
ArgumentType Input
Type Parameter
Name Name of the parameter when accessed by this or other scripts
Source The filename of the script where the Parameter Name has been declared to be an Output

The Parameter input is used to access information in the current script from another script's Output Parameter.

Integral Parameter Descriptors

Keyword
Value
ArgumentType Input
Type Integral
Name IntegralName of an Integrated Parameter Output

The Integral Parameter input is used to access the integrated parameter from the attitude simulator state. Note that the Name of the input must be the same as the IntegralName of some script's integrated parameter output.

Inertia Descriptors

Keyword
Value
ArgumentType Input
Type Inertia
Source STK path for the object whose inertia is being requested

The inertia is a 3 by 3 matrix of Doubles in units of kg-m^2.

Mass Descriptors

Keyword
Value
ArgumentType Input
Type Mass
Source STK path for the object whose mass is being requested

The mass is a Double in units of kg.

Density Descriptors

Keyword
Value
ArgumentType Input
Type Density

The density is a Double in units of kg/m^3. The attitude simulator allows the user to configure the density modeling.

Inputs Available from the Vector Geometry Tool

All Vector Geometry Tool inputs are also available for the Attitude Simulator. In addition, those descriptors in the Vector Geometry Tool that use the keywords RefName and RefSource to refer to an Axes object can now optionally use a new keyword RefType. Rather than specifying the RefName and RefSource to choose the references axes that the input will be transformed into, the script can specify to use RefType with the value Attitude. This designation causes the transformation to use the Attitude Simulator's state as the reference.

In addition, if you are using a Visibility argument, such that:

  1. the Source of the Visibility argument is a sensor, and
  2. the sensor is attached to the satellite for which the Attitude Simulator is computing the attitude,

then, if you specify the keyword RefType with the value Attitude, the sensor's attitude will be computed relative to the attitude state information that is being integrated by the Attitude Simulator.

For information on requesting an input from the Vector Geometry Tool, see Vector Geometry Tool Plugin Points.

STK 11.2.1 Programming Interface