Rotate and Translate an Aviator (AMM) Route

« Go Back

Information

 
QuestionHow can I rotate and translate a defined Aviator route?
Answer

The following steps assume that your scenario has:

• an Aviator aircraft called Base with a predefined route using several waypoints 
• a Facility object called Center located at the center of Base aircraft's route; this is the point about which the route will be rotated

First, create a custom system for defining the new Aviator route:

  1. Right-click the Center facility object.
  2. Open Analysis Workbench.
  3. Create new axes with the following information:
    • Type: Fixed in Axes
    • Name: CustomTopo
    • Coordinate Type: Euler Angles
    • Euler Angles A, B, C: 0 deg
    • Sequence: 321
    • Reference Axes: Center TopoCentric
  4. Click OK.
  5. Create a new system with the following information:
    Type: Assembled
    Name: Center_Coordinate
    Origin Point: Center Center
    Reference Axes: Center CustomTopo
  6. Click OK.
  7. Close Analysis Workbench.

Next, create an ephemeris report of the original route.

  1. Right-click the Base aircraft.
  2. Select Report and Graph Manager.
  3. Right-click the Scenario Styles folder.
  4. Create a new report and name it "EphemerisTimePosVel".
  5. This will open up a window to have you select the report contents. On the left, expand the Points Choose System folder.
  6. Expand Center.
  7. Select Time, x, y, z, Velocity x, Velocity y, and Velocity z. Click the blue arrow to add them to the report. User-added image
  8. On the right, select Time and click the Units button at the bottom.
  9. In the dialog box, clear the Use Defaults check box and select Epoch Seconds (EpSec).
  10. Click OK and then click OK again to return to the Report and Graph Manager.
  11. With the report highlighted, click the Generate button to generate the report.
  12. A dialog box will appear asking you to select the systems. Make sure Center is selected on the left and click Center_Coordinate on the right.
  13. Click OK.
User-added image

Create an ephemeris file from the report.

  1. Open up a text editor (eg., Notepad++) and create a new file. Name it Template_Ephemeris
  2. Copy and paste just the data from the EphemerisTimePosVel report into the text file; exclude the column labels.
  3. Scroll all the way down to the bottom of the file; you can see the number of points there are by looking at the line number. Write down this number.
  4. Back at the top of the file, add the ephemeris file information so the format is correct. You can see the proper format here
  5. AGI recommends setting these preferences (header items) for the Template_Ephemeris.e file:
• stk.v.12.2
• BEGIN Ephemeris
• NumberOfEphemerisPoints 947
• ScenarioEpoch           22 Nov 2021 17:00:00.0000
• InterpolationMethod     Hermite
• InterpolationOrder      1
• DistanceUnit            Kilometers
• CentralBody             Earth
• CoordinateSystem        Custom Center_Coordinate Facility/Center  
• CoordinateSystemEpoch    22 Nov 2021 17:00:00.0000
• EphemerisTimePosVel

Create an attitude report for the aircraft.

  1. Right-click the Base aircraft.
  2. Select Report and Graph Manager.
  3. Right-click the Scenario Styles folder.
  4. Create a new report and name it "Attitude". A dialog box will appear.
  5. Expand the Axes Choose Axes folder and then expand VVLH(CBF).
  6. Select Time, q1, q2, q3, and q4 and click the blue arrow to move these into the report.
  7. On the right, select Time and click the Units button at the bottom.
  8. In the dialog box, clear the Use Defaults check box and select Epoch Seconds (EpSec).
  9. Click OK then click OK again to return to the Report and Graph Manager.
  10. Generate the report. Make sure Center is selected on the left and select CustomTopo on the right.

Create an attitude file.

  1. Open up a text editor (eg., Notepad++) and create a new file. Name it Template_Attitude
  2. Copy and paste just the data from the Attitude report into the text file; exclude the column labels.
  3. Scroll all the way down to the bottom of the file; you can see the number of points there are by looking at the line number. Write down this number.
  4. Click OK.
  5. For the attitude file format information, look here.
  6. AGI recommends the preferences (header items) for the Template_Attitude.a:
    • stk.v.12.2
    • BEGIN Attitude
    • NumberOfAttitudePoints  947
    • ScenarioEpoch           22 Nov 2021 17:03:51.000000
    • BlockingFactor          20
    • InterpolationOrder      1
    • CentralBody             Earth
    • CoordinateAxes            J2000
    • CoordinateSystem        Custom CustomTopo Facility/Center     
    • AttitudeTimeQuaternions 

Create a new aircraft.

  1. Insert a new aircraft called "UAV_Template" with the default settings.
  2. In the UAV_Template properties, change the Propagator to StkExternal.
  3. Click the ellipsis button next to Filename, browse to the ephemeris file, and open it.
  4. Go to Basic > Attitude and select the Override Basic & Target Pointing check box.
  5. Click the ellipses button, browse to the attitude file, and open it.
  6. The UAV_Template should now be centered on the Center facility and should look like the Base aircraft.

Rotate and translate the route and save the route under a new name.

Rotate the route.

  1. Open up Analysis Workbench.
  2. Make sure Center is selected on the left.
  3. Open up the CustomTopo properties.
  4. Change the Euler Angle A to a rotation angle you want to analyze. Positive values will rotate the route counter-clockwise, while negative values will rotate the route clockwise.

Translate the route.

  1. Open up the Center properties from the Object Browser.
  2. Change its position values to one you want to analyze. As the Center facility moves, the route will move.

Extract the ephemeris and attitude files.
Once you have the route rotated and translated where you want it, you can extract the ephemeris and attitude files from the new UAV_Template route.

  1. Right-click the UAV_Template aircraft in the Object Browser and select Export Ephemeris/Attitude. A dialog box will appear.
  2. At the top of the dialog box, set the External STK File Type to Ephemeris.
  3. Make sure the Coordinate System is set to Fixed.
  4. Click the Export ellipsis next to Output File (at the bottom) and save the ephemeris file as an appropriate different name.
  5. Change the External STK File Type at the top of the window to Attitude.
  6. Make sure the Coordinate System is set to Fixed.
  7. Click the ellipsis next to Output File and save the attitude file as an appropriate different name.

Create a new aircraft to represent the new rotated and translated route.

  1. Copy and paste the UAV_Template object in the Object Browser.
  2. Rename the new aircraft to represent the new route.
  3. Open this new aircraft's properties.
  4. Under Basic > Route, set Propagator to StkExternal.
  5. Set the external ephemeris file to the one you just saved. Click the ellipsis button next to Filename. Browse to and open the new ephemeris file.
  6. Go to the Basic > Attitude section. 
  7. Go to the Precomputed panel and select the check box for "Override Basic & Target Pointing Attitude for specific times".
  8. Click the ellipsis button next to Filename. Browse to and open the new attitude file.
  9. Once you have ephemeris and attitude set, click OK in the properties window.

You can try out other rotation-and-translation settings relative to the original route. When you change the center location and Euler Angle A, it will only change the UAV_Template aircraft. Then you can save a new aircraft representation for each instance. Repeat this process for whatever routes you want to analyze!


 
TitleRotate and Translate an Aviator (AMM) Route
URL NameRotate-and-Translate-an-Aviator-AMM-Route

Related Files