Torque File Format (*.tq)

A torque file is an ASCII text file formatted for compatibility with STK that ends in a .tq extension. Torque files define a time-ordered list of body-fixed torques to be applied to a satellite. Torque, as a function of time, is generated using Lagrangian interpolation. Torque files can be useful when you need to provide STK with data for a satellite to model environmental impacts to attitude.

You can import a torque file into STK using the format below. STK will then apply this torque when generating attitude data, using the integrated attitude options.

Keywords

Each torque file must contain some common elements called keywords. These are described below. Keywords, and their associated values, must precede the specification of the torque format and the actual data points.

Keywords used in torque files are not case-sensitive; the capitalization used in this topic is for readability.

Keyword Required Description
stk.v.<major release number>.<minor release number> Yes

This is the version of STK that the file is formatted for. Files can be created in, and imported into, STK software versions consistent with the file version keyword or higher. The version keyword must be the first line in the torque file.

Example: stk.v.12.0

This setting means that you can import the file to any version of STK software from 12.0 to the most recent version.
BEGIN Torques
END Torques
Yes These set off the beginning and end of the torque data. All other keyword phrases and data point specification, except the version keyword, will be inside these two keyword phrases. See the sample file for an example.
NumberOfTorques No

AGI recommends that you specify this keyword. This value indicates the number of torque data points for STK to read from the file. When not specified, STK uses all data points in the file.

Example:

If you enter
    NumberOfTorques 1000

then STK will read 1,000 torque data points and then stop.

ScenarioEpoch Yes This is the reference epoch time for the time values of the torque data in the file. Specify the scenario epoch using Gregorian UTC time (dd mmm yyyy hh:mm:ss.s). There is no relationship between the scenario epoch specified in the torque file and the actual scenario epoch in your STK scenario.

Example:

    ScenarioEpoch 1 Jan 2003 00:00:00.0
In this case, a time of 5.5 for a particular torque data point would correspond to a time of 1 Jan 2003 00:00:05.5.
InterpolationOrder No

This is the interpolation order to be used (0 or greater). By default, STK uses first-order interpolation. Override the default by specifying a different interpolation order.

Example:

InterpolationOrder 2

File format

There is only one file format available for specifying torques. In a properly formatted torque file, torques are specified in body-fixed coordinates. You should include the TorquesTimeBodyFixed keyword phrase in the file directly before the data points.

TorquesTimeBodyFixed format

Individual data points following the TorquesTimeBodyFixed keyword look like this:

<TimeInSeconds> <XTorque> <YTorque> <ZTorque>

where,

A torque file using the TorquesTimeBodyFixed format would look like this sample file.