11. Utilities

11.1. exportatcoach utility

The exportatcoach utility will open one or more scenario(s) and create the exported ATCoach/SIME files. It performs the same as the SIME Control File dialog without starting the GSGT GUI.

To run the exportatcoach utility type exportatcoach from a command line.

The following options can be specified for exportatcoach utility:

Usage: exportatcoach [-gifrtSTepvjn] [-O facility[,facility ...]] [-c controlFile] [-N exportedScenName] [-z size] [-R range] 
                                     [-s Test|Cert|Script] [-F file] [-d dir] [-L min,max -L min,max ....] [-l release name]
    -g  gen radar hex
    -r  disable atcoach sensors
    -t  disable atcoach target dynamics (for non-radar file only)
    -i  disable IFDT message generation.
    -f  disable GPIO message generation.
    -T  tts mode (defaults to ops mode)
    -s  ops mode scen type (Test,Cert,Script). default is Test.
    -S  SDRR Mode.  Equivalent to -r -t -i -f.
    -e  turn off ecg emulation (defaults to true).
    -p  preview mode (for atcoach testing)
    -z  font size (for map)
    -R  range (for map)
    -G  training mode
    -F  file containing a list of scenarios, each on a separate line
    -d  directory containing input scenarios
    -L  export messages within list of min and max times
    -n  do not overwrite existing files
    -E  do not overwrite existing files except scenario
    -O  specify ops facility, or when tts mode, list of facilities to sim (comma separated)
    -l  specify release name
    -b  [version] - ADSB version
    -m  gen time tokens in adsb hex file
    -q  ADSB messages delay in millisecons (only works with -m option)
    -v  verbose

11.2. gsgtmanager utility

The gsgtmanager utility opens the GSGT Scenario Manager without starting the GSGT GUI. This will launch the GSGT Scenario Manager. It operates the same as the one launched from within the GSGT GUI.

To run the gsgtmanager utility type gsgtmanager from a command line.

11.3. uplevel utility

The uplevel utility will open one or more scenario(s) using the specified adaptation(s), list any errors, and (optionally) save the scenario(s).

To run the uplevel utility type uplevel from a command line.

The following options can be specified for uplevel utility:

Usage: uplevel [-s] -a adapt[,adapt] [-q] [-C changes_file] [-o] ((-f file) || (-d dir) || (scen[,scen]))

    -s    save scenario(s) after upleveling (optional) default is not to save

    -a    adaptation(s) to convert scenarios to (relative to $ADAPTATION_PATH
          env variable) multiple adaptations are specified using a comma-delimited list

    -q    quick file uplevel - this option will not open scenarios, it simply replaces
          adaptation name(s) in scenario source file(s) - no errors/warnings are displayed

    -C changes_file
          Perform text replacements specified in changes_file on scenario source files prior
          to opening to scenario.  If the -s option has not been specified, text replacements
          are made in a temporary copy of scenario.

          Syntax for changes_file:
             <Changes>
               <replace old_text="text1" new_text="text2" element="ELEMENT" >
             </Changes>
          Where ELEMENT must be one of:
             TARGET_ROUTES, TARGET_MESSAGES, AIRCRAFT_TYPES, EQUIP_QUALIFIERS, EVENT_POSITIONS, or MESSAGE_DEVICES

    -o outfile
          optional file to which all output is written (output written to both the screen and outfile)

    -f    file containing a list of scenarios, each on a separate line ('#' character used for comments)

    -d    directory containing scenarios as subdirectories

    scen  scenarios name(s) to be converted (relative to $GSGT_WORK_PATH env variable) multiple
          scenarios are specified using a comma-delimited list (ignored if -f option is used)

11.4. guplex utility

The GUI Uplevel/ExportATCoach (guplex) utility provides a GUI for users to perform uplevel and exportatcoach functions. The GUI presents all the options available in the command-line versions of the uplevel and exportatcoach utilities, but also provides a convenient method of selecting scenarios, directories, adaptations, options, etc, to construct uplevel and exportatcoach commands, as well as providing a method of viewing/managing the output of uplevel and export operations.

Tu run guplex utility type guplex from a command line.

11.4.1. Utility Startup Environment and Directories

When the GUI UpLevel/ExportATCoach (guplex) utility is launched, it will:

- examine $GSGT_UTIL_PATH and if set but $GSGT_UTIL_PATH directory does not exist, attempt to create it
- if $GSGT_UTIL_PATH directory does not exist, cannot be created, or GSGT_UTIL_PATH is not set, attempt to create: $HOME/.gsgtutil and use that as the value of GSGT_UTIL_PATH

Also at startup, and after the above actions, guplex will look for (and attempt to create if not found) the following directories:

- $GSGT_UTIL_PATH/lists/
- $GSGT_UTIL_PATH /logs/
- $GSGT_UTIL_PATH/changes/
- $GSGT_UTIL_PATH/.cmd/

11.4.2. Performing Scenario UpLevel Operations

To perform an uplevel command:

Step 1

Select one or more scenarios from the 'Scenario' tab on the left side of the GUI

Scenarios are presented in light green text, while directories are presented in black text. Multiple scenarios can be selected simply by clicking on them (i.e., Ctrl-click is not required), and scenarios can be de-selected by clicking on them while they are selected. The selection status of all scenarios/directories in a given directory may be toggled by clicking on the directory. All scenario selections may be cleared by clicking the 'Clear' button in the 'Scenario' tab. The current scenario/directory selection(s) can be saved to a text file by clicking the 'Save List' button, and the scenario/directory selection can be populated from such a text file by clicking on the 'Load List' button and selecting the desired list file.

Step 2

Select one or more adaptations from the 'Adaptation' tab on the left side of the GUI

Adaptations (i.e., for ERAM local releases whose parent is $DSSC_REL) are presented in light green text, and directories (if any) are presented in black text. The first adaptation selected is shown with a diamond to the left of the adaptation name, and is considered the 'airspace' adaptation. Additional adaptations may be selected by holding down 'Ctrl' and clicking on the adaptation item - these additional adaptations are considered 'facility' adaptations.

Step 3

Select an UpLevel Option from the 'UpLevel' tab on the right side of the GUI. For more detail see section UpLevel Options.

Step 4

(Optional) Compose or load specific Changes to be made to scenario source files in the Changes File tab on the lower portion of the UpLevel tab. For more detail see section Using an UpLevel Changes File.

Step 5

(Optional) Use the 'Select Log File' button below the 'UpLevel Log' pane to choose the name/location of the uplevel log file. For more detail see section Saving/Managing GUI UpLevel/ExportATCoach Files.

Step 6

Click the 'Run UpLevel' button

The GUI will launch the requested uplevel command, echoing output to the 'UpLevel Log' display pane. Note that certain uplevel commands may take a significant amount of time, especially when multiple scenarios have been selected. While an uplevel command is running, no user action is permitted in the GUI.

11.4.2.1. UpLevel Options

UpLevel Options are selected from the 'UpLevel' tab on the right side of the GUI:

Preview UpLevel

This option will open each selected scenario using the selected adaptation(s) and display all warnings and errors to aid the user in determining what the impact of up-leveling to the selected adaptation(s) would be. No scenario files are changed.

Full UpLevel

This option will open each selected scenario using the selected adaptation(s), display all warnings and errors, and re-save the selected scenarios using the selected adaptation(s). Note that scenario files are updated, and any warnings or errors may indicate that targets, messages, etc were not able to be created using the new adaptation and are likely to be dropped from the scenario. An UpLevel Preview is highly recommended prior to running this option.

Quick File UpLevel

This option will NOT open the selected scenarios, rather, it will update the scenario source files to reflect the selected adaptation(s). Scenario files are updated and no warnings or errors are displayed (although any warnings and errors will be displayed when the resulting scenario is first opened). An UpLevel Preview is highly recommended prior to running this option.

Perform Text Replacement

Selecting this option causes all search/replace text replacement specified in the Changes File tab to be performed in scenario source files prior to opening/upleveling the scenario. If the 'Preview' option has been selected a temporary copy of each scenario will be created, modified, and opened to preview the effect of the up-level operation without updating the selected scenarios.

11.4.2.2. UpLevel Changes File

As adaptation changes it may occasionally be necessary to make certain changes to scenario source files prior to opening or upleveling the scenario in order to avoid losing information. For example if the name of a heavily used STAR changes it would be necessary to update any targets in a scenario that used that STAR in a route (or target message). The UpLevel Changes File is designed to allow the user to make very specific changes to scenario source files without having to edit the files directly.

The 'Compose Change' bar of the 'Changes File' tab allows the user to compose specific scenario changes in a simple "search/replace-like" syntax. After supplying "Replace" and "with" values in the 'Compose Change' bar, clicking the 'Add' button will format the change and insert it into a "Changes" file. The syntax used in a "Changes" file is:

<replace old_text="OLD" element="SCENARIO_ELEMENT" new_text="NEW" />

Changes may be composed for the following scenario elements:

TARGET_ROUTES

Any route element of any target that exactly matches the value specified by the "old_text" attribute of the change is replaced with the value of the "new_text" attribute. Note that TARGET_ROUTES changes are applied only to the "target dynamics" route (i.e., the path the simulated target will actually fly. Frozen target messages are not altered by a TARGET_ROUTES change, although derived target messages will be altered by a TARGET_ROUTES change. If route elements in frozen FP messages need to be updated, then TARGET_MESSAGES change(s) must be composed (see below).

TARGET_MESSAGES

Any occurrence of "old_text" in any frozen target message in the scenario is replaced with the value specified by the "new_text" attribute.

AIRCRAFT_TYPES

Any target with a "target dynamics achar" type exactly matching the "old_text" attribute value of the change will be replaced by the "new_text" attribute value. Note that the "target dynamics achar" type is the type of aircraft the simulated target will behave like, not necessarily the aircraft type specified in any frozen FP message for the target.

EQUIP_QUALIFIERS

Any target with "NAV Equipment" value (as specified on the Main tab of the GSGT Target Editor Dialog) that exactly matches the "old_text" attribute value of the change will be replaced by the "new_text" attribute value. Note that the equipment suffix in any frozen target FP message is not affected by an EQUIP_QUALIFIER change - instead a TARGET_MESSAGE change would be needed.

EVENT_POSITIONS

Replaces any "Position" trigger value exactly matching "old_text" attribute of the change with the "new_text" attribute value in target events. For example, a "Change Altitude" target event can be triggered at a particular position on the target's route of flight.

Change items displayed in the lower pane of the 'Changes File' tab may be edited by selecting them, editing the contents of the change in the 'Compose Change' bar, and selecting the 'Apply' button.

Change items displayed in the lower pane of the 'Changes File' tab may be deleted by right-clicking on the item and selecting delete.

The contents of the lower pane of the 'Changes File' tab may be saved to a file by clicking the 'Save Changes File' button, and populated by clicking 'Load Changes File' button and selecting such a file.

11.4.3. Performing Export ATCoach Operations

To perform an exportatcoach command:

Step 1

Select one or more scenarios from the 'Scenario' tab on the left side of the GUI

Scenarios are presented in light green text, while directories are presented in black text. Multiple scenarios can be selected simply by clicking on them (i.e., Ctrl-click is not required), and scenarios can be de-selected by clicking on them while they are selected. The selection status of all scenarios/directories in a given directory may be toggled by clicking on the directory. All scenario selections may be cleared by clicking the 'Clear' button in the 'Scenario' tab. The current scenario/directory selection(s) can be saved to a text file by clicking the 'Save List' button, and the scenario/directory selection can be populated from such a text file by clicking on the 'Load List' button and selecting the desired list file.

Step 2

Select Export ATCoach Options from the 'UpLevel' tab on the right side of the GUI. For a brief explanation of exportatcoach command-line options see section 17.1.2.

Step 3

(Optional) Use the 'Select Log File' button below the 'Export Log' pane to choose the name/location of the exportatcoach log file. For more detail see section 17.4.5 Saving/Managing GUI UpLevel/ExportATCoach Files.

Step 4

Click the 'Export Selected Scenarios' button

The GUI will launch the requested exportatcoach command, echoing output to the 'Export Log' display pane. Note that exportatcoach commands may take a significant amount of time, especially when multiple scenarios have been selected. While an exportatcoach command is running no user action is permitted in the GUI.

[Note]Note

selecting an adaptation from the 'Adaptation' tab is not required for an exportatcoach operation, since scenarios will be exported on the local release specified in scenario source files. However, if an adaptation is selected while the 'Export ATCoach' tab is active then each scenario that has been exported on the selected release will display an indication in the 'Export Information' column of the 'Scenario' tab. Dwelling over the export information with the mouse will display a tooltip containing the type (Ops/TTS) and date of exports that were found.

11.4.4. Saving/Managing guplex Files

When the user selects 'Save List' from the Scenario Tree and accepts the default filename, guplex will save the selected scenarios and/or directories (text file where each line contains the full path of the scenario or directory) to the file:

$GSGT_UTIL_PATH/lists/scenlist.txt

When the user selects 'Select Log File' from either the UpLevel or Export Log pane a standard 'File Dialog' is presented allowing the user to select the location and name of the log file. The default location/name of the uplevel and exportatcoach logs are:

$GSGT_UTIL_PATH/logs/uplevel.out
$GSGT_UTIL_PATH/logs/exportatcoach.out

When the user selects 'Save Changes File' from the Changes File pane, a standard 'File Dialog' is presented allowing the user to select the location and name for the Changes file. The default location/name of the Changes file is:

$GSGT_UTIL_PATH/changes/Changes.xml

Any of the above standard 'File Dialogs' may be used to manage (i.e., rename, or delete) guplex output files by right-clicking on the desired file(s).

When the user issues an uplevel or exportatcoach command from the GUI, guplex will create the following files as needed (files are overwritten for each command):

$GSGT_UTIL_PATH/.cmd/scenlist.cmd
$GSGT_UTIL_PATH/.cmd/Changes.cmd

When the command-line uplevel utility is invoked (either from the command line or by guplex), and the user has specified that text replacement 'Changes' are to be performed but the source scenario is NOT to be saved, then the uplevel utility will:

- examine $GSGT_UTIL_PATH and if set but $GSGT_UTIL_PATH directory does not exist, attempt to create it
- if $GSGT_UTIL_PATH directory does not exist, cannot be created, or GSGT_UTIL_PATH is not set, attempt to create: $HOME/.gsgtutil and use that as the value of GSGT_UTIL_PATH
- look for and remove $GSGT_UTIL_PATH/.tmp directory
- create $GSGT_UTIL_PATH/.tmp directory
- for each scenario provided as input:
* remove any previous copy of the scenario in $GSGT_UTIL_PATH/.tmp directory
* copy the specified source scenario to $GSGT_UTIL_PATH/.tmp directory
* perform changes on the copy of the scenario