Export an Attitude File with Yaw, Pitch, and Roll

« Go Back

Information

 
QuestionHow do I export an Attitude file with yaw, pitch, and roll instead of quaternions?
Answer
When exporting an attitude file from STK, you can only export in quaternions, which is not intuitive compared to having the yaw, pitch, and roll. The custom script attached to this article will enable you to export an attitude file with yaw, pitch, and roll. The following steps provide an example of how to apply the custom script as part of the process of creating an attitude file in yaw, pitch, and roll format.
  1. Create a custom report for an aircraft.
  2. On the Content properties page for the report, expand the Axes Choose Axes Data Provider.
  3. Expand the Body subfolder.
  4. Within the Body subfolder, select:
• Time
• Euler321 precession
• Euler321 nutation
• Euler321 spin
 User-added image
  1. Select the Output properties page for the report and enable Use Script.
  2. Browse to and select the script provided with this article, AttitudeEuler.vbs. This script changes the report style to add the proper header and footer of an attitude file (Note: When you download the file, it will be called CustomScript, and it will not be saved as a VBS file. You must go to File Explorer and add the .vbs extension in order for STK to interpret it as a script).
 
 User-added image
 
  1. Generate the report.
  2. In the window that appears, select Axes within the NorthEastDown folder as the reference axes.
 
User-added image
  1. Click OK and view the generated report.
  2. Because of the custom script, the report should look like an attitude file instead of a report, as shown below. The "stk.v.5.0" at the top doesn't affect the script and does not need to match your version of STK.

User-added image
  1. Save the generated report by clicking the Save as text button in the top left of the report screen.
  2. Append ".a" to the end of the file name to save it as an attitude file rather than a .txt file.
  3. Open the .a file using Notepad or a similar utility.
  4. You should see the .a file arranged with data points in time, yaw, pitch, and roll.
  5. Finally, on the line listing the coordinate axes, change "Aircraft/TestAircraft" to "Aircraft/<your vehicle name here>".

User-added image
  1. The attitude file should now be arranged with the order of time, yaw, pitch, and roll, which is much more intuitive than quaternions.
TitleExport an Attitude File with Yaw, Pitch, and Roll
URL NameExport-an-Attitude-File-with-Yaw-Pitch-and-Roll

Related Files

CustomScript