Using the Calculation Tool
This tutorial will introduce the Calculation Tool and various types of Calculation Objects to approximate the amount of fuel used during an airline flight.
STK Pro, STK Premium (Air), STK Premium (Space), or STK Enterprise
You can obtain the necessary licenses for this tutorial by contacting AGI Support at support@agi.com or 1-800-924-7244.
The results of the tutorial may vary depending on the user settings and data enabled (online operations, terrain server, dynamic Earth data, etc.). It is acceptable to have different results.
Capabilities Covered
This lesson covers the following STK Capabilities:
- STK Pro
- Analysis Workbench
Video Guidance
Watch the following video. Then follow the steps below, which incorporate the systems and missions you work on (sample inputs provided).
Create a Scenario and Insert Objects
Construct a flight between Philadelphia International Airport and Denver International Airport.
- Launch STK.
- Click the Create a Scenario button in the Welcome to STK window.
- Name the scenario “ReturnHome.”
- Change the Start time to 1 Jul 2016 16:00:00.000 UTCG.
- Change the End time to 2 Jul 2016 16:00:00.000 UTCG.
- Click OK.
- From the Insert Object () tool, select Place (). Choose one of the following two methods:
With Internet Access:
- Select Search by Address () and click Insert. The “Search by Address” method uses the Bing Geocoder to create a place object associated with a searchable address, landmark, or region of interest.
- When the “Insert by Address” window opens, type “Philadelphia Airport” (or “PHL”). Select Philadelphia International Airport, PA, and click the Insert Place(s) button.
- Search for the Denver Airport. Select Denver International Airport, CO, and click the Insert Place(s) button.
- Click Close.
Without Internet Access:
- Select From City Database () and click Insert.
- Enter “Philadelphia” for the City Name and click the Search button. Select Philadelphia, PA and click Insert.
- Enter “Denver” for the City Name and click the Search button. Select Denver, CO and click Insert.
- Click Close.
Insert an Aircraft
- From the Insert Object () tool, select the Aircraft () object and the Insert Default method. Click Insert.
- Close the Insert Object Tool.
- Name the Aircraft “PHL_to_DEN”
- To define the route using the 3D Object Editing technique, first locate the 3D Object Editing toolbar:
Select the aircraft in the 3D Object Editing toolbar
If the 3D Object Editing Toolbar is not shown, go to View > Toolbars > and select “3D Object Editing.”
- Select Aircraft/PHL_to_DEN from the 3D Object Editing dropdown.
- Click the Object Edit Start/Accept () button.
- Shift-click on the 3D Globe to add waypoints to the route. Enter a waypoint near Philadelphia, then a waypoint near Denver.
- Click the Object Edit Start/Accept () button to save the changes to the route.
3D View: Flight from Denver to Philadelphia
Creating and Using Calculation Components
The Calculation tool allows you to create custom calculations by combining STK Data Elements and custom variables through a variety of functions. The Calculation tool is comprised of three separate object types:
- Scalar Calculations: Time dependent values resulting from an STK computation, e.g. elapsed time from some reference point
- Conditions: Objects that monitor Scalars over time to determine when they exceed or drop below thresholds you define, e.g. whether an aircraft maintains some minimum altitude over the course of flight
- Parameter Sets: Sets of related scalar calculations, e.g. X, Y, Z, and Radius values of a trajectory
Create a Constant Scalar
Begin by specifying a simple Scalar to define a constant rate of fuel usage for the aircraft (roughly 1 kg/sec for an airliner at cruise).
- Right-click on the aircraft PHL_to_DIA and select Analysis Workbench ().
- Select the Calculation tab.
- Create a new Scalar by clicking on the Create new Scalar Calculation () button.
- Type: Constant
- Name: FuelFlowRate
- Dimension: Mass Per Time
- Constant Value: 1 kg/sec
- Click OK.
Create a Data Element Scalar
To determine how long the aircraft has been in flight, capture an existing Aircraft Data Provider in a new Scalar object.
- Create another Scalar by clicking on the Create new Scalar Calculation () button.
- Type: Data Element
- Name: FlightDuration
- Select Data Element: Expand the Distance data provider and choose “Time from start”
- Click OK.
- Right-click on the new scalar FlightDuration and select Report/Graph…
- In the Calculation Report/Graph window, click Create Report.
Create a Function with Existing Scalars
Use a Scalar Function to calculate the estimated amount of fuel used over time. The function will multiply the Scalars created above (fuel rate and duration of flight).
- Create another Scalar by clicking on the Create new Scalar Calculation () button.
- Type: Function(x,y)
- Name: FuelUsed
- Function: a*x*y
- Arguments > x: Click the () button. Select FuelFlowRate and click OK.
- Arguments > y: Click the () button. Select FlightDuration () and click OK.
- Coefficients > a: 1 (default)
- Output > Inherit Dimension: No
- Output > Dimension: Mass
- Output > Unit: kg
- Click OK.
- Right-click on the new scalar FuelUsed () and select Report/Graph…
- In the Calculation Report/Graph window, change the Type to Graph.
- Click Create Graph. As expected, FuelUsed increases linearly with time.
Create a Condition
Use a Condition object to warn when a certain amount of fuel has been used. The result of the Condition will be a set of Time Components (intervals and instants) that define when the satisfaction criteria are met.
- In the Calculation tool, click on the Create new Condition () button.
- Type: Scalar Bounds
- Name: LowFuelWarning
- Scalar: Click the () button. Select FuelUsed () and click OK.
- Operation: Above Minimum
- Minimum: 10000 kg
- Click OK. The resulting Time components will show when the amount of fuel used exceeds 10000 kg.
- Expand the () the items under the LowFuelWarning Condition (). You will see various Time Components resulting from the condition.
- Right click on the InCrossingTimes () Time Array and select Report. This report shows the precise moment in time when the flight crosses the 10000 kg fuel usage threshold.
Summary
Calculation components can be used to constrain access, alter object behavior, and build compound data products that produce different types of output in a new way.