FLIGHT Flight Simulator Order Number: TBD May 1991 This manual describes the invocation and use of the FLIGHT Flight Simulator as well as how to customize certain aspects of the simulation. COPYRIGHT © DIGITAL EQUIPMENT CORPORATION ALL RIGHTS RESERVED Revision/Update This is a new document Operating System and VMS Version 5.4 Version: Software Version: FLIGHT, Version 2.5 digital equipment corporation Table of Contents 1 The Flight Simulator 1.1 1-2 1.1.1 1-4 1.1.2 Configurations 1.1.3 1-8 1.2 1-10 FLIGHT/SIMULATOR 1.3 1-13 1.4 1-14 1.4.1 1-14 1.4.2 1-14 1.4.3 Simulation 1.4.4 1-15 1.5 1-15 1.5.1 1-15 1.5.2 1-16 1.5.3 1-16 1.5.4 1-16 1.5.5 1-17 0-1 Text of Level 1 Head 1.5.6 1-17 1.5.7 1-17 1.5.8 1-17 1.5.9 1-17 2 Customizing the Keyboard and Mouse 2.1 2-2 ABORT SEQUENCE CAPTURE FRAME CYCLE VIEW ENGINE EXIT IF INVOKE ASSIST LOAD SEQUENCE SET ALTERNATE_VIEW SET BRAKES SET CONTROL HOME SET CONTROL LOCK SET FLAPS SET PILOT_VIEW SET RECORDER SET RUDDER SET STALL_WARNING SET THROTTLE SET USER_VALUE SET VIEW_MODE SUSPEND WEAPONS ARM WEAPONS FIRE WEAPONS SELECT ZOOM 3 Session Customization 3.1 3-1 3.2 3-1 List of Figures Figure 1-1 1-14 List of Tables Table 2-1 2-6 Table 2-2 2-8 Table 2-3 2-12 Table 2-4 2-16 Table 2-5 2-19 Table 2-6 2-21 Table 2-7 2-25 ight Simulator The simulator component is invoked by issuing the DCL command FLIGHT/SIMULATOR. It causes an interactive program to be run which 1 Identifies itself as FLIGHT V2.5 2 Loads the keyboard and mouse bindings ii The logical name FLT$KEYMAP points to the keyboard bindings. The bindings file determines what key sequences invoke what functions. By default, this file is SYS$LIBRARY:FLT$KEYMAP.DAT. FLIGHT displays error messages for any parsing errors that occur while it loads the keyboard bindings. See Chapter 2 for a description of the commands which are found in a keyboard binding file. 3 Connects to the DECwindows workstation FLIGHT follows the same rules as any DECwindows application for determining which workstation it will display the simulation output on. See the available documentation on DECwindows for more information on this area. If FLIGHT cannot successfully connect to a DECwindows workstation, the simulator exits. 4 Loads the default hangar of aircraft Your last-saved preferences are inspected for the hangar to load. If you do not have a set of preferences saved, FLIGHT will use whatever hangar the logical name FLT$HANGAR points to. Errors encountered while loading the hangar are displayed to the user. If the HANGAR qualifier is specified, that hangar file will be loaded instead of the one specified above. 5 Connects to a FLIGHT server Your last-saved preferences are inspected for the server to connect to. If you do not have a set of preferences saved, FLIGHT will use whatever server the logical name FLT$SERVER points to. If FLT$SERVER is not defined, the server installed on the local system will be used. Errors encountered while connecting to the server are displayed to the user. If the SERVER qualifier is specified, the supplied server will be connected to instead of the one specified above. 6 Presents the Flight Simulator dialog. Through this dialog you can start simulations, resume old ones, playback simulation recordings, change your iii simulator control preferences as well as save and restore sets of preferences. See Chapter 1.2 for more information about the interactive simulator interface. lator Configurations There are three components to any FLIGHT simulation. They are: 1 The FLIGHT flight simulator. This is the interactive program which performs the aircraft simulation and generates the display. 2 The FLIGHT server. This is the program which coordinates multi-user simulations and provides the world environment as well as other services. 3 The X server. This is the program which does the actual display of the scenes that the FLIGHT simulator is generating. The minimum configuration on which the simulator will run is a single VAXstation running DECwindows. In this minimum configuration, the FLIGHT simulator, FLIGHT server and X server are running on the same VMS machine. You may change this basic configuration to allow FLIGHT to access more computing resources. Each of the three components may run on a different machine. The following rules must be observed,however: 1 The display must be sent to a workstation which is running the X Window System11The X Window System is a trademark of MIT . This means that it does not have to be a VAXstation, nor does it have to be running VMS. Examples of this type of machine are all varieties of VAXstations and DECstations. 2 The FLIGHT simulator must be running on a VAX running VMS. It does not have to be DECwindows display-capable, but it must have DECwindows installed on it. Examples of this type of machine are all varieties of VAX computers. iv 3 The FLIGHT server must be running on a VAX running VMS. It does not have to be running DECwindows at all. Examples of this type of machine are all varieties of VAX computers. Assuming that a display rate of 10 frames per second is the desired target simulation rate, expect that the following compute resources will be needed for each component of FLIGHT: 1 The FLIGHT flight simulator will require 4 VUPs 2 The FLIGHT server will require 1 VUP per simulator connected to it which is requesting collision detection be performed. Only 0.3 VUPS are required per simulator connected to it which does not request collision detection. 3 The X server will require 2 VUPs or 1 VUP and a graphic accelerator (the GPX or SPX option). This means that a total of 4 + 1 + 2 = 7 VUPs are needed to maintain a 10 frame per second update rate for a single simulation of an aircraft of moderate complexity in a world of moderate complexity.22Complexity of an aircraft is a function of the number and type of instruments on the aircraft and the complexity of the aircraft geometry. Complexity of a world is a function of the number of world objects and the complexity of the objects' geometry. The Flight Simulator 1-1 If all components are being run on a single machine, it must be able to deliver 7 VUPs performance. On a 1 VUP machine, assume that you will get no better than 10/7 = 1.42 frames per second for worlds and aircraft of moderate complexity. These figures are approximations intended to give you an idea of how well FLIGHT will run given any particular configuration. Simple aircraft and simple worlds will give higher rates, while more complex aircraft and more complex worlds will give lower rates. 1.1.1 Example Configurations As an example of a low-end configuration, assume a single VAXstation II is the only compute resource available. The resulting display rate will approximate the 1.42 frames per second figure. As an example of a high-end configuration, assume three machines are available. The flight simulator will run on an 8810, which is a 5 VUP machine, the FLIGHT server will run on a microVAX II, which is a 1 VUP machine, and the X server will run on a VAXstation 3100, which is a 3 VUP machine. Assume that all are 'close' to each other on the network. In this configuration, each component of the simulation has the necessary resources that it requires. Therefore, we can expect display rates in excess of 10 frames per second on the average. In order to understand how the three machines would be used, the following scenario is presented of actions that a user would take. 1 The initial state of the scenario is that DECwindows is installed on the VAX 8810 (called BIGVAX) and also on the VAXstation 3100 (called SHOVAX). We'll 1-2 The Flight Simulator call the microVAX SMLVAX. SMLVAX:: SHOVAX:: BIGVAX:: 2 Install the FLIGHT flight simulator component and whatever hangars are desired on BIGVAX. 3 Install the FLIGHT server component and whatever worlds are desired on SMLVAX. FLIGHT Server SMLVAX:: DECwindows SHOVAX:: FLIGHT Simulator BIGVAX:: The Flight Simulator 1-3 4 Log into BIGVAX 5 Set the DECwindows display to be SHOVAX by use of the SET DISPLAY command. See the DECwindows documentation for details of this command. 6 Issue the command FLIGHT/SERVER=SMLVAX which starts the simulator. SMLVAX:: Use world environment defined on SMLVAX SHOVAX:: Display from BIGVAX to SHOVAX BIGVAX:: 7 When the simulator is started, two things will happen a The hangar specified by the logical name FLT$HANGAR as defined on BIGVAX will be loaded by the flight simulator. b A simulation connection to SMLVAX is created and the world specified by FLT$WORLD as defined on SMLVAX will be loaded by the FLIGHT server. 8 When the above is completed, a configuration dialog box will appear on SHOVAX. It is from that machine that the simulations will be controlled. SMLVAX:: 1-4 The Flight SimulatFLIGHT server runs on SMLVAX SHOVAX:: Simulation runs on BIGVAX Dialog box appears on SHOVAX BIGVAX:: 1.1.2 Multi-user Configurations FLIGHT has the ability to allow multiple users to fly in the same environment and interact with each other. In order to be able to fly with other simulation clients, all that is required is that the simulation clients use the same FLIGHT server. The following diagram illustrates this by using a VAX 8810 as the FLIGHT server for 4 simulation clients running on VAXstation 3100s: FLIGHT clients FLIGHT server Note that the environment which is flown in is defined by the VAX 8810's definition of the FLT$WORLD logical name. In the case of multiple clients, it is suggested that they be on the same physical Ethernet. This will ensure the maximum communication speed between the clients and the server. FLIGHT will run over a Local Area Network (LAN) and even a Wide Area Network (WAN), but the longer the communication time and the higher the traffic between a client and the server, The Flight Simulator 1-5 the less reliable the client's view of the world. 1.1.3 Crew Configurations FLIGHT has the ability to allow multiple users to fly the same physical aircraft. That is, each user is considered a crew member of the same aircraft. This is accomplished through the aircraft configuration dialog. In that dialog, you may specify the names of up to three workstations running the X windowing system. When the simulation starts, those workstations may have displays created on them, according to the objects created during the simulation. For example, an aircraft may have two displays defined, one for the pilot and one for the copilot. The first would appear on the same workstation as the simulation was configured from. The second would appear on the workstation that was indicated in the aircraft configuration dialog. The following figure shows how multiple workstations can be used by a single simulation: Optional crew stations FLIGHT server FLIGHT client 1-6 The Flight Simulator Note that the machine labeled FLIGHT client is the machine which must do the vast majority of the work for the four workstations shown. This is because the crew stations are only being used to display information. No computation load has been transfered to those workstations in the areas of simulation or scene generation. They only perform a display function. Therefore, each crew station used places a higher load on the FLIGHT client machine. Note also that in this configuration, the crew stations do not need to have FLIGHT installed on them, nor do they need to even be DEC workstations. Lastly, note that in the above configuration, this is treated as a single connection to the FLIGHT server, allowing up to 7 more connections. Each of those connections could be configured as above, causing a total of (8 connections * 4 workstations per connection) = 32 workstations to be used for display of a multi-user simulation. The total number of computers which FLIGHT is capable of using in a multi-user simulation is 41: the FLIGHT server CPU, 8 FLIGHT clients, and from 1 to 4 crew stations, including the pilot. 1.2 DCL Command The following is a description of the DCL command which invokes the FLIGHT flight simulator. FLIGHT/SIMULATOR Invokes FLIGHT's flight simulator The Flight Simulator 1-7 FORMAT FLIGHT/SIMULATOR Command Qualifiers Defaults /[NO]STATISTICS[=file-spec] see text /[NO]RESUME[=file-spec]/NORESUME /[NO]PLAYBACK[=file-spec] /NOPLAYBACK /SERVER[=node] see text /HANGAR[=file-spec] see text /[NO]COLLISION see text PARAMETERS None DESCRIPTION The FLIGHT/SIMULATOR command invokes FLIGHT's interactive flight simulator. It is a real time, three dimensional aircraft simulator with support for a broad range of aircraft types and world environments. All of the qualifiers on the FLIGHT/SIMULATOR command serve as local overrides to your saved preferences. Preferences may be saved through the Customize pulldown menu in the flight simulator main dialog. QUALIFIERS /[NO]STATISTICS[=file-spec] Specifies whether or not the simulator should generate statistics. A statistics file contains a summary of significant parameters of a simulation run. The following is an example of the information that is written at the end of each simulation run: Type: F-16C Fighting Falcon Duration: 00:01:31.90 Display Rate:5.26 fps. 1-8 The Flight Simulator Takeoff Speed:185 kts. (Mach 0.28) Top Speed: 604 kts. (Mach 0.91) Best Rate of Climb: 568 kts. (Mach 0.86) Surface Distance: 22.7 mi. Distance: 23.0 mi. Max Altitude:3534 ft. (0.7 mi.) The default output for statistics is to SYS$OUTPUT. If a file is specified, consecutive simulation runs will have their statistics appended. /[NO]RESUME[=file-spec] Specifies whether or not the simulator immediately resumes a simulation as soon as the flight simulator is invoked. This option bypasses the initial configuration dialog completely, and at the end of a resumed simulation, the simulator exits. Interactive resumes may be performed through the flight simulator main dialog. Once a suspended simulation is resumed, the user sees a normal simulation except that no weapons are available. Suspended simulations may be created by any user. See The FLIGHT User's Guide for more information on suspending a simulation. Resumed simulations have some limitations. For example, instrument switches may not be in the correct position relative to the function they control. /[NO]PLAYBACK[=file-spec] Specifies whether or not the simulator immediately begins to play back a previously-recorded simulation. This option bypasses the initial configuration dialog completely, and at the end of a recording playback, the simulator exits. Interactive playbacks may be performed through the flight simulator main dialog. Simulations may be recorded by any user. See The FLIGHT User's Guide for more The Flight Simulator 1-9 information about flight recordings. Once a recorded simulation has begun playback, the playback may be interactively controlled through the default keyboard bindings. The controls are very much like those found on a cassette tape player, including reverse and forward play, pause and single step. If the playback is stopped, the aircraft controls become 'live', allowing you to fly the aircraft interactively. /SERVER[=node] Specifies which node the simulator should use as the simulation server. This server determines what environment you will fly in. If multiple users specify the same node, they will be flying in the same space and may interact with each other. Note that a simulation may not be started unless you are successfully connected to a server. /HANGAR[=file-spec] Specifies which hangar the simulator should load. A hangar contains a set of aircraft from which you may begin your simulation. Note that a simulation may not be started unless you have successfully loaded a hangar. /[NO]COLLISION Specifies whether or not contact with other aircraft or objects in the world should be considered as damaging. If you specify COLLISION, the simulator will damage or destroy object and aircraft that you come in contact with or shoot at. Of course, you may be damaged or destroyed in the same way. You will not be able to damage or destroy any aircraft which were 1-10 The Flight Simulator originated by a user who specified NOCOLLISION. You may change your preference for this setting through the interactive simulator interface. Note that in a world, there are objects and there is terrain. This qualifier does not affect the solidity of terrain. You are never able to fly through the ground or through mountains, etc. 1.3 Interactive Use The following figure shows the dialog displayed when the simulator is invoked. It allows operation of the simulator. Figure 1-1 Flight Simulator Dialog 1.4 The Control Menu The Control menu allows you to · Run an interactive simulation, using the settings which are currently in effect. · Playback the currently-loaded flight recording. · Resume a simulation from the currently-loaded flight recording. The first frame in the flight recording is where the resumed simulation begins. · Quit the flight simulator. The Flight Simulator 1-11 1.4.1 Run Simulation Select this option to begin an interactive simulation. The settings which you have established through the Customize pulldown or have implicitly declared from having saved your settings from an earlier session will be used. Only one simulation session may be in progress at one time. 1.4.2 Playback Recording Select this option to cause FLIGHT to begin playback of the contents of the currently-loaded flight recording. Flight recordings are complete in that they capture all aspects of an interactive simulation, including release of weapons. Whatever happened in the recorded simulation will be played back exactly as before. In order for a playback to make sense, you must be using the same world as when the recording was made. Playback in a world other than the one in which the recording was made will produce undefined results. You do not need to load a hangar before playing back a recording because the recording knows what hangar to use. 1.4.3 Resume Suspended Simulation Select this option to cause FLIGHT to resume a simulation according to the information in the currently-loaded flight recording. Simulations may be suspended. When they are, the current flight recording file is filled in with enough information to allow resumption of the simulation at the exact moment that it was suspended. Note that this does not include other simulators which you happened to be flying with. That is, you can only suspend and resume your own simulations, not multi-user dogfights. 1-12 The Flight Simulator The same rules about worlds and hangars applies to resumed simulations as in playing back recordings above. 1.4.4 Quit Select this option to quit from the current simulator session. Do not use this to stop the simulation in progress. 1.5 The Customize Menu The Customize menu allows you to: · Configure your access to the simulation environment · Configure your aircraft · Change hangars, allowing access to different sets of aircraft · Change flight recorder files · Change film canister files · Configure aspects of the simulation display 1.5.1 World... Select this option to bring up a dialog which allows for interactive changing of the world server to use, whether or not your next simulation should request collision detection from the world server, and where in the world you want to begin the next simulation. Note that specifying a world server does not control which world that server makes available to you. Which world is determined by the owner of the server machine. You cannot change what world a server makes available to you while in the simulator. Be sure to OK or Apply the changes that you have made in the dialog before starting the next simulation or the changes will not take effect. The Flight Simulator 1-13 1.5.2 Aircraft... Select this option to bring up a dialog which allows for interctive changing of the aircraft to use in the next simulation as well as the amount of fuel that it should begin with. You are also able to specify the workstations to be used for additional crew stations. What appears on a particular crew member's display is up to the designer of the aircraft that you have selected. Other crew stations should be listed in the dialog by the crew member's node name. Be sure to OK or Apply the changes that you have made in the dialog before starting the next simulation or the changes will not take effect. 1.5.3 Hangar... Select this option to bring up a dialog which allows for interactive specification of a new collection of aircraft to load for the current session. Only one such collection may be loaded at any one time during a session, but you may freely change hangars during the session. 1.5.4 Flight Recording... Select this option to bring up a dialog which allows for interactive specification of a new or existing flight recording file. Flight recording files are used for both recording interactive simulations and for storing suspended simulations. Any time you write to a flight recording file, any other information already in that recording file is lost, so you are encouraged to be careful in your management of these files. Once loaded, you must interactively start the recorder during an interactive simulation or invoke the simulator Suspend 1-14 The Flight Simulator function in order to get any information into the recorder file. If you load an existing flight recording file, you may resume or play it back through the options available in the Control pulldown. Flight recording files grow at the rate of approximately 1 block per frame. If your simulator is running at 10 frames per second, then this means disk space is being consumed at the rate of 10 blocks per second. Be careful about your use of disk space. 1.5.5 Film Canister... Select this option to bring up a dialog which allows for interactive specification of a new film canister file. Film canister files are written to whenever the Capture Frame function is invoked during an interactive simulation. Each captured frame is saved in color PostScript and may be printed on standard PostScript printers such as the LPS40 and LN03R. Film canisters may contain an arbitrary number of frames from a simulation, subject only to disk space limitations. Film canister files grow at the rate of approximately 10 blocks per captured frame, depending on the complexity of the scene being viewed when the capture was made. Because frames are only captured once each time the Capture Frame function is invoked, disk space utilization is not as high as in the case of flight recordings, where every frame is automatically being recorded. 1.5.6 Window... Select this option to bring up a dialog which allows for interactive specification of the maximum display rate which the The Flight Simulator 1-15 simulator should be allowed to run at, as well as controls specifying how the simulator should attempt to perform animation on your workstation. 1.5.7 Use Last Saved Settings Select this option to reestablish the preferences which you last saved to disk. 1.5.8 Use System Defaults Select this option to set the preferences for the current setting to the defaults defined by FLIGHT. If you had no preferences saved to disk prior to starting the simulator, the defaults would be in effect. 1.5.9 Save Current Settings Select this option to save your preferences set through the Customize menu to disk. The file created is DECW$USER_DEFAULTS:FLT$DEFAULTS.DAT 2 Customizing the Keyboard and Mouse FLIGHT allows you to customize the definitions of the keys on the keyboard as well as the buttons on the mouse. When reading this section, note that key will be used to refer to both keyboard keys and mouse buttons. When FLIGHT starts the flight simulator, it looks at the file SYS$LIBRARY:FLT$KEYMAP.DAT for the definitions of the keys. This file contains commands describing key sequences and the simulator functions which should be invoked when the user presses that key 1-16 The Flight Simulator sequence. There is no processor which needs to be invoked on the keymap file. FLIGHT reads the file and processes it whenever the simulator is invoked, so to change key definitions, you only need to edit the file and invoke the simulator again. FLIGHT allows you to define a logical name FLT$KEYMAP so that you can place the keymap file anywhere on your system. If different users want to use different keymap files, they can do so by defining the FLT$KEYMAP logical to point to whatever keymap file they want to use. If you wish to use a private keymap file, you should manually modify the file DECW$USER_DEFAULTS:FLT$DEFAULTS.DAT to point to the file you want to use. For example, the following line might be entered: FLIGHT.keymap_file:USER:[DIRECTORY]FLT$KEYMAP.DAT The flow of a keymap file is a series of key sequence definitions, where each definition begins with a SEQUENCE command to declare the key sequence being defined, followed by one or more simulator function commands. It is those commands which are invoked when the user presses the specified key sequence. See the following example of the flow of a keymap file. Command lines may be a maximum of 132 characters long and may not be continued across lines. EXAMPLES SEQUENCE KP3 SET FLAPS INCREASE SEQUENCE PF1,KP4 SET BRAKES FULL The Flight Simulator 1-17 SEQUENCE PF2,KP4 SET ALTERNATE_VIEW 4 SEQUENCE PF3,KP4 SET PILOT_VIEW LEFT SEQUENCE KP4 SET BRAKES INCREASE SEQUENCE PF2,KP5 SET ALTERNATE_VIEW 5 SEQUENCE PF3,KP5 SET PILOT_VIEW UP SEQUENCE MB1 SET CONTROL LOCK TOGGLE SEQUENCE MB2 WEAPON FIRE 1 IF WENABLED EQUAL_TO 1.0 THEN SET USER_VALUE 13/CHANGE=1/RATE=99 SEQUENCE MB3 SET CONTROL HOME VERTICAL SET CONTROL HOME HORIZONTAL SET RUDDER CENTER Note that the indentation of lines is not a required part of the keymap format. 2.1 Keymap Commands The following section includes descriptions of all the commands which can be placed into a keymap file. ABORT SEQUENCE Specifies that the current function sequence should stop execution. FORMAT ABORT SEQUENCE 1-18 The Flight Simulator Command Qualifiers Defaults None None PARAMETERS None DESCRIPTION Use the ABORT SEQUENCE command when you want to prematurely abort a sequence of commands bound to a key sequence. Usually, this command is only useful when used with the IF command. If placed in a function sequence without an IF command, the commands after the ABORT SEQUENCE command will never be executed. See the examples section of the IF command for an example of how the IF command is used in conjunction with the ABORT SEQUENCE command. QUALIFIERS None CAPTURE FRAME Tells FLIGHT to capture the current frame in PostScript format into the current film canister. FORMAT CAPTURE FRAME Command Qualifiers Defaults None None Customizing the Keyboard and Mouse 2-1 PARAMETERS None DESCRIPTION Use the CAPTURE FRAME command to capture the exact scene depicted in the world display window. It is appended to the end of whatever other frames were captured since the flight simulator was invoked or a new film canister was loaded. All frames are captured in color PostScript. QUALIFIERS None CYCLE VIEW Tells FLIGHT to cycle among the pilot view directions in order. FORMAT CYCLE VIEW Command Qualifiers Defaults None None PARAMETERS None DESCRIPTION Use the CYCLE VIEW command to cause the pilot view facing direction to move to the next direction in the sequence FORWARD, RIGHT, BACKWARD, LEFT, and UP. If the pilot view is DOWN when the CYCLE VIEW command is executed, the view is cycled to FORWARD. Note that this command changes the pilot view even if the view mode is not PILOT. This command has no effect on the ALTERNATE view mode. 2-2 Customizing the Keyboard and Mouse QUALIFIERS None ENGINE Specifies a new engine on/off state. FORMAT ENGINE state Command Qualifiers Defaults None None PARAMETERS state Specifies the new state for the engine. Possible values for this parameter are listed in Table 2-1. Table 2-1Engine Keywords Keyword Meaning START or IGNITE Turn the engine on. There is no difference between these keywords. Either one may be used to start any kind of aircraft engine. STOP or SHUTDOWN Turn the engine off. DESCRIPTION Use the ENGINE command when you want to start or stop the engine. Restrictions pertaining to starting engines apply only to aircraft that are non-invertable or are over their flameout altitude. If either of these characteristics apply and an engine start is attempted, the engine start will fail. Customizing the Keyboard and Mouse 2-3 QUALIFIERS None EXIT Tells FLIGHT to exit the current crew station. FORMAT EXIT Command Qualifiers Defaults None None PARAMETERS None DESCRIPTION Use the EXIT command to exit an aircraft crew station. When an aircraft crew station is exited, the crew station display is removed from the workstation it was being displayed to. Other crew stations are unaffected. If the last remaining crew station of a simulated object is exited, then that object is destroyed. If that is also the last remaining crew station of all objects in a simulation, the entire simulation is ended. QUALIFIERS None IF Specifies a simple level of flow control in the functions bound to a key sequence. FORMAT IF expression THEN command 2-4 Customizing the Keyboard and Mouse Command Qualifiers Defaults None None PARAMETERS expression Specifies a mathematical check against a simulation parameter. An expression is broken into three parts. The first part is a data basis keyword. A list of these keywords may be found in the FLIGHT Hangars document. The second part is a mathematical relation keyword. A list of these is shown in Table 2-2. The third part is a numeric value. See the following example expressions. Table 2-2Relation Keywords Keyword Meaning EQUAL_TO The data basis value must be exactly equal to the specified value GREATER_THAN The data basis value must be greater than the specified value. LESS_THAN The data basis value must be less than the specified value. IN_RANGE The data basis value must be in the range specified by the two. Those values follow this keyword and should be separated by a comma. command Specifies a key binding command to be executed if the expression evaluates to be true. Another IF command is a valid command for this parameter. Customizing the Keyboard and Mouse 2-5 DESCRIPTION Use the IF command when you want to conditionally execute commands when the user presses a key sequence. IF commands may be used with other commands freely. When the expression parameter is evaluated to be true, the command specified by the command parameter is executed. If the expression is not true, then the next command in the list of commands bound to the current key sequence is evaluated. QUALIFIERS None EXAMPLES IF ALTITUDE=RELATIVE GREATER_THAN 0.1 THEN ABORT SEQUENCE This command states that if the relative altitude of the aircraft is greater than 0.1 feet, then the ABORT SEQUENCE command should be executed. Note that the ABORT SEQUENCE command causes all the following commands to be ignored. If the aircraft were below an altitude of 0.1 feet (that is, on the ground), then the ABORT SEQUENCE command would not be executed and the command following the IF command would be executed. IF USER4 IN_RANGE 30,40 THEN IF ENGINE_ON EQUAL_TO 1.0 THEN SET BRAKES NONE This is an example of nesting IF commands. This command states that if the user value 4 has a value in the range of 30.0 to 40.0 (inclusive) then if the engine is running, then the SET BRAKES NONE command should be executed. If either the user value was in the wrong range or the engine was off, then the SET BRAKES NONE command would not be executed. 2-6 Customizing the Keyboard and Mouse INVOKE ASSIST Specifies that the closest takeoff assist should be invoked. FORMAT INVOKE ASSIST [=assist-number] Command Qualifiers Defaults None None PARAMETERS assist-number Specifies which assist to invoke. If omitted, FLIGHT will attempt to invoke the closest assist point. Valid assist numbers are 1 through 64. DESCRIPTION Use the INVOKE ASSIST command to cause the specified or closest takeoff assist defined in the world to check for validity of use and, if a valid invocation of the assist is detected, to use the assist for takeoff. A takeoff assist is FLIGHT's implementation of an aircraft carrier catapult. It may be used for other sorts of assisted takeoffs, however. FLIGHT performs the following basic validity checks on an assist: · the distance of the aircraft from the assist point must not exceed a certain value (defined by the world designer) · the aircraft must not be moving · the aircraft must be lined up with a certain angle to the diretion of the assist (defined by the world designer) Customizing the Keyboard and Mouse 2-7 QUALIFIERS None LOAD Tells FLIGHT to load either arms or fuel to the current aircraft FORMAT LOAD thing Command Qualifiers Defaults None None PARAMETERS thing Specifies whether FUEL or ARMAMENTS should be loaded into the current aircraft. DESCRIPTION Use the LOAD command to refuel or rearm the current aircraft. In order for this command to succeed, the aircraft must be stopped on the ground. Rearming and refueling can happen anywhere you can land and is accomplished immediately. When rearming, you receive full weapons, as when you took off. When refueling, you also get the amount at takeoff. So if you took off with 50% fuel and later refuel, you will again get a 50% fuel load. QUALIFIERS None SEQUENCE Declares the beginning of a new key binding. 2-8 Customizing the Keyboard and Mouse FORMAT SEQUENCE key [,key...] Command Qualifiers Defaults None None PARAMETERS key[,key...] Specifies the key sequence which is being defined. Table 2-3 lists all valid key names accepted by the SEQUENCE command. There is no limit to the length of a key sequence. A key sequence may not be started with a typing character from the main keyboard. However, a typing character may be used anywhere else in a key sequence, and as many times as desired. DESCRIPTION Use the SEQUENCE command to introduce a new key sequence to have functions bound to it. The functions to invoke follow a SEQUENCE command and are invoked in the order they are specified. Key bindings may be specified in any order. However, the order of the keys within a key sequence determine the order in which the user must press them. Up to 256 functions may be bound to a single key sequence. Table 2-3Valid Keywords for SEQUENCE Keywords E1 - E6 F1 - F20 DO HELP KP0 - KP9 COMMA MINUS PERIOD Customizing the Keyboard and Mouse 2-9 ENTER PF1 - PF4 LOWERCASE_A - LOWERCASE_Z MB1 - MB5 UPPERCASE_A - UPPERCASE_Z ZERO - NINE UP DOWN LEFT RIGHT FIND INSERT_HERE REMOVE SELECT PREV_SCREEN NEXT_SCREEN CR (Carriage return) VT (Vertical tab) LF (Line feed) HT (Horizontal tab) FF (Form feed) AMPERSAND (&) ASTERISK (*) AT_SIGN (@) BACKSLASH (\) CARET (^) COLON (:) DASH(-) DELETE DOLLAR_SIGN ($) DOT (.) DOUBLE_QUOTE (") EQUAL (=) ESCAPE EXCLAMATION_POINT (!) GRAVE_ACCENT (`) GREATER_THAN (>) LEFT_BRACE ({) LEFT_BRACKET ([) LEFT_PAREN (() LESS_THAN (<) MAIN_COMMA (,) MAIN_PLUS (+) NUMBER_SIGN (#) PERCENT_SIGN (%) QUESTION_MARK (?) QUOTE (') RIGHT_BRACE (}) RIGHT_BRACKET (]) RIGHT_PAREN ()) SEMICOLON (;) SLASH (/) SPACE TILDE (~) 2-10 Customizing the Keyboard and Mouse UNDERLINE (_) VERTICAL_LINE (|) QUALIFIERS None EXAMPLES SEQUENCE PF1,COMMA LOAD FUEL The SEQUENCE command declares the beginning of a new key sequence. The key sequence in this case is the PF1 key followed by the COMMA key (which is on the numeric keypad). Note that they are separated in the list of key names by commas. The single function to be invoked by this key sequence is LOAD FUEL. See a description of the LOAD command to understand what happens when the user presses the PF1 key followed by the keypad COMMA key. SEQUENCE MB3 SET CONTROL HOME VERTICAL SET CONTROL HOME HORIZONTAL SET RUDDER CENTER The SEQUENCE command declares the beginning of a new key sequence. Notice that the key sequence is a single press of the third mouse button on the mouse. Mouse buttons are treated exactly like keys on the keyboard. In this example, three functions are being executed, and each one appears on a separate line following the SEQUENCE command. They will be executed in the order they are specified. The indentation of the lines specifying the functions Customizing the Keyboard and Mouse 2-11 bound to this key sequence is not required, but makes the key bindings more readable. SET ALTERNATE_VIEW Sets the location from which you watch your aircraft in third person. FORMAT SET ALTERNATE_VIEW viewpoint-number Command Qualifiers Defaults None None PARAMETERS viewpoint-number Specifies the number of a viewpoint from which your aircraft should be viewed. These viewpoints are defined according to the world that you are flying in. The viewpoint-number may assume values from 1 to 20. DESCRIPTION Use the SET ALTERNATE_VIEW command to set the current viewpoint to be used when the current view mode is set to ALTERNATE (see the SET VIEW_MODE command). This command will set the viewpoint even if the current view mode is not ALTERATE. When the view mode does become ALTERNATE, the last viewpoint specified will be used. When a viewpoint is selected, a description of that viewpoint is displayed to the user in the title bar of the world view window. The description is specified by the world designer. 2-12 Customizing the Keyboard and Mouse QUALIFIERS None SET BRAKES Tells FLIGHT to apply a certain amount of braking pressure to the current aircraft's brakes. FORMAT SET BRAKES setting Command Qualifiers Defaults None None PARAMETERS setting Specifies what brake setting is desired. The possible values for the setting parameter are listed in Table 2-4. Table 2-4Brake Keywords Keyword Meaning INCREASE Increase the brake pressure. The amount of increase is determined by the aircraft designer. DECREASE Reduce the brake pressure. NONE Release the brakes. FULL Apply full brakes. DESCRIPTION Use the SET BRAKES command to set the aircraft's brakes to a certain brake level. Brakes are only effective while the aircraft is in contact with the ground. Customizing the Keyboard and Mouse 2-13 QUALIFIERS None SET CONTROL HOME Specifies that the current control instrument should be brought to a âknownã position. FORMAT SET CONTROL HOME axis Command Qualifiers Defaults None None PARAMETERS axis Specifies that the control instrument should be returned to its home position in one of two directions, or axes: VERTICAL or HORIZONTAL. DESCRIPTION Use the SET CONTROL HOME command to return the current control instrument to its defined home position. This may be done even if the instrument has been locked by use the the SET CONTROL LOCK command. Typically, the home position is the center of the control, but is defined by the designer of the instrument. The current control instrument is defined as the one which the pointer is positioned in when this command is executed. In fact, the pointer may be in multiple control instruments at any one time, and all of the control instruments that contain the pointer will be affected. QUALIFIERS None 2-14 Customizing the Keyboard and Mouse SET CONTROL LOCK Specifies that the current control instrument should have its lock state set to a particular setting. FORMAT SET CONTROL LOCK setting Command Qualifiers Defaults None None PARAMETERS setting Specifies that the control instrument should have its lock state set to either ON or OFF. You may also specify TOGGLE, which reverses the control's lock state. DESCRIPTION Use the SET CONTROL LOCK command to lock or unlock the current control instrument. When locked, a control instrument ignores pointer movement. Therefore, whatever position the control instrument was set to is where it stays. The current control instrument is defined as the one which the pointer is positioned in when this command is executed. In fact, the pointer may be in multiple control instruments at any one time, and all of the control instruments that contain the pointer will be affected. QUALIFIERS None SET FLAPS Specifies how the aircraft flaps should be Customizing the Keyboard and Mouse 2-15 positioned. FORMAT SET FLAPS setting Command Qualifiers Defaults None None PARAMETERS setting Specifies what flaps setting is desired. The possible values for the setting parameter are listed in Table 2-5. Table 2-5Flap Keywords Keyword Meaning INCREASE Lower the flaps a notch. The amount of increase is determined by the aircraft designer. DECREASE Raise the flaps a notch. NONE Raise the flaps completely. FULL Lower full flaps. DESCRIPTION Use the SET FLAPS command to set the aircraft's flaps to a certain position. Flaps are hinged panels on the trailing edge of a wing which are raised and lowered to change the lift and drag characteristics of a wing. Most commonly, they are lowered for takeoff and landing and kept raised during normal flight. QUALIFIERS None 2-16 Customizing the Keyboard and Mouse SET PILOT_VIEW Sets the current viewing direction for use when the current view mode is set to PILOT. FORMAT SET PILOT_VIEW view-direction Command Qualifiers Defaults /VIEW=number 1 PARAMETERS view-direction Specifies the direction, relative to aircraft-forward, that the pilot is considered to be facing. The view-direction parameter accepts the following directions: FORWARD, BACKWARD, RIGHT, LEFT, UP, and DOWN. DESCRIPTION Use the SET PILOT_VIEW command to set the current viewing direction to be used when the current view mode is set to PILOT (see the SET VIEW_MODE command). This command will set the view direction even if the current view mode is not PILOT. When the view mode does become PILOT, the last view direction specified will be used. QUALIFIERS /VIEW=number Specifies which of the current aircraft's available pilot views should be used. A pilot view should be treated just as if it were one of many camera positions. Usually, aircraft have a camera mounted in the cockpit. Some have more than one camera and these cameras can even be off Customizing the Keyboard and Mouse 2-17 the aircraft. The value of the /VIEW qualifier may assume values from 1 to 20. SET RECORDER Specifies how the flight recorder should be set. FORMAT SET RECORDER setting Command Qualifiers Defaults None None PARAMETERS setting Specifies the new setting for the flight recorder. The settings are very much like a normal tape recorder. See Table 2-6 for a list of possible recorder settings. Table 2-6Keywords for the Setting Parameter Keyword Meaning RECORD Starts the recorder recording. If already recording, this has no effect on the recorder. STOP Stops the recorder from recording or playing. If playing back a simulation, the user is returned to interactive control of the aircraft. REWIND If the recorder is stopped, it rewinds the flight recording to the beginning of 2-18 Customizing the Keyboard and Mouse the âtapeã. FPLAY Begins forward playback of the recording or slows down a fast reverse playback, or even pauses a normal speed reverse playback. Repeated execution of the FPLAY setting causes faster and faster forward playback. RPLAY Begins reverse playback of the recording or slows down a fast forward playback, or even pauses a normal speed playback. Repeated execution of the RPLAY setting causes faster and faster reverse playback. PPLAY Pauses playback regardless of whether playback was forward or backward, fast or slow. FFRAME When the recorder is paused, this causes a single-step forward in the flight recording. RFRAME When the recorder is paused, this causes a single-step backward in the flight recording. DESCRIPTION Use the SET RECORDER command to establish the current setting of the flight recorder. A flight recorder tape must be loaded before any SET RECORDER commands will take effect. There is no command in the key binding capability of FLIGHT to load a flight recording tape. That must be done interactively by the user. Note that a paused playback is actually drawing the current frame over and over Customizing the Keyboard and Mouse 2-19 again as fast as possible, so the CPU of the computer running FLIGHT is not being rested by doing a SET RECORDER PPLAY. QUALIFIERS None SET RUDDER Specifies how the aircraft's rudder should be positioned. FORMAT SET RUDDER setting Command Qualifiers Defaults /FULL None PARAMETERS setting Specifies what rudder position is desired. The possible values for the setting are LEFT, RIGHT and CENTER. LEFT moves the rudder to the left by an incremental amount (defined by each aircraft) and RIGHT moves the rudder to the right by the same incremental amount. CENTER centers the rudder. DESCRIPTION Use the SET RUDDER command to set the aircraft's rudder to a certain position. QUALIFIERS /FULL Used in conjunction with the LEFT or RIGHT setting keywords, causes the rudder to be moved completely to the left or right. 2-20 Customizing the Keyboard and Mouse SET STALL_WARNING Specifies how the aircraft stall warning should be set. FORMAT SET STALL_WARNING setting Command Qualifiers Defaults None None PARAMETERS setting Specifies which stall warning setting should be selected. The three possible values for this are ON, which sets the warning so that it is functional, OFF, which sets the warning so that it is non- functional, and TOGGLE, which will reverse whatever the current setting is. DESCRIPTION Use the SET STALL_WARNING command to establish the preferred setting for the stall warning indicator of the aircraft. Not all aircraft have stall warnings. When the warning is triggered by an aircraft stall detection, a series of bells will sound from the user's workstation. If the stall warning is set to the OFF position, these bells will be turned off and will not start again until the stall warning is turned back on and a stall is detected. The volume of the bells is established by the workstation Session Manager's customization capability. QUALIFIERS None Customizing the Keyboard and Mouse 2-21 SET THROTTLE Specifies how the aircraft throttle should be set. FORMAT SET THROTTLE setting Command Qualifiers Defaults None None PARAMETERS setting This parameter specifies what throttle setting is desired. The possible values for the setting parameter are listed in Table 2-7. Table 2-7Setting Keywords Keyword Meaning INCREASE Advance the power setting by one notch. The amount of advance is determined by the aircraft designer. It is not possible to advance into the afterburning range using INCREASE. DECREASE Back off the power setting by one notch. NONE Back off the power setting to engine idle. FULL Advance the power setting to full, or military thrust. AFTERBURNER Advance the power setting into the afterburning range for the engine. There is only one level of afterburner available in aircraft so equipped. If afterburner is already engaged, this command 2-22 Customizing the Keyboard and Mouse cancels the afterburner and returns the engine to the last non-afterburning throttle setting. While an engine is afterburning, fuel consumption is 3 times normal. Whether an aircraft has afterburning engines or not is determined by the aircraft designer. DESCRIPTION Use the SET THROTTLE command to set the aircraft's throttle to a certain position. Note that this is a request for the throttle to be set to a particular level, not the actual engine thrust. All engines require a certain amount of time to increase or decrease their power in response to throttle changes. This rate of change varies from aircraft to aircraft. QUALIFIERS None SET USER_VALUE Specifies a change to a âuser valueã. FORMAT SET USER_VALUE user-value-number Command Qualifiers Defaults /CHANGE=amount-of-change None. /NEW_VALUE None. /RATE_OF_CHANGE None. Customizing the Keyboard and Mouse 2-23 PARAMETERS user-value-number Specifies which user value to modify. There are 16 possible user values which may be modified. DESCRIPTION Use the SET USER_VALUE command to modify a user-defined value. These user values are used by the simulator to control aspects of an aircraft according to the aircraft design. For example, an aircraft may cause its landing gear to deploy when user value 7 changes between the values of 60 and 70. This is determined by the aircraft designer. For the default aircraft and keyboard bindings, many conventions exist between the user values and their meaning with respect to the aircraft. This allows a single collection of key bindings to be used for all known aircraft. If multiple SET USER_VALUE commands are executed on the same user value in a single key binding, the last SET USER_VALUE command is used. QUALIFIERS /CHANGE=amount-of-change Specifies an amount of change relative to the current user value. If /CHANGE is specified, do not specify /NEW_VALUE. /NEW_VALUE Specifies a new value for the user value, independant of the current user value. If /NEW_VALUE is specified, do not specify /CHANGE. /RATE_OF_CHANGE Specifies the rate at which the user value should move to the new value, regardless 2-24 Customizing the Keyboard and Mouse of whether it was specified by the /CHANGE or by the /NEW_VALUE mechanism. SET VIEW_MODE Tells FLIGHT to set the current viewing mode. FORMAT SET VIEW_MODE {alternate | pilot} Command Qualifiers Defaults /[NO]AIRCRAFT_VISIBLE None. PARAMETERS alternate | pilot Specifies which view mode is desired. DESCRIPTION Use the SET VIEW_MODE command to establish the current viewing mode. In FLIGHT, you are allowed to view yourself from a third-person perspective (called the ALTERNATE view mode) or from one of the aircraft-relative views (called the PILOT view mode). See also the SET PILOT_VIEW and SET ALTERNATE_VIEW commands. QUALIFIERS /[NO]AIRCRAFT_VISIBLE This qualifier may only be used in conjunction with the PILOT view mode. It tell FLIGHT whether or not to make the aircraft visible while you are viewing the world from inside the aircraft. The default is /NOAIRCRAFT_VISIBLE. SUSPEND Customizing the Keyboard and Mouse 2-25 Causes FLIGHT to create a file containing the current simulation state. FORMAT SUSPEND Command Qualifiers Defaults None None. PARAMETERS None DESCRIPTION Use the SUSPEND command to cause FLIGHT to save the current simulation state, placing that information into a file. This file can then be read back in by FLIGHT to begin a simulation under the exact situation as the simulated object was in at the time of the SUSPEND command. This includes all simulation information except for a few items such as current frequency of instruments and positions of toggles. QUALIFIERS None WEAPONS ARM Specifies a new setting for arming of weapons in the current aircraft FORMAT WEAPONS ARM setting Command Qualifiers Defaults None None 2-26 Customizing the Keyboard and Mouse PARAMETERS setting Specifies what the new setting for weapon arming should be. Possible values are ON, which arms the weapons, OFF, which disarms the weapons, and TOGGLE, which reverses the arming state of the weapons. DESCRIPTION Use the WEAPONS ARM command when you want to set the arming state of the weapons on the current aircraft. Weapons may not be released unless the current arming state is ON, and while weapons are armed, a sighting crosshair shows up in the PILOT view mode's FORWARD view. Arming weapons also causes the weapons in each weapon bank to begin using their guidance capability to locate a target if the weapons are so equipped. QUALIFIERS None WEAPONS FIRE Specifies that the next step in a firing sequence should be activated. FORMAT WEAPONS FIRE sequence-number Command Qualifiers Defaults None None PARAMETERS sequence-number Specifies a weapon sequence number. The next step in the sequence is activated, causing the release of between 1 and 4 Customizing the Keyboard and Mouse 2-27 weapons. You may also specify that the currently selected sequence should be activated (sequence-number of SELECTED). A sequence is selected via the WEAPONS SELECT command. DESCRIPTION Use the WEAPONS FIRE command to activate a single step from a weapon sequence. There are four weapon sequences, and the meaning of those sequences is determined by the designer of the aircraft being flown. The order of weapon release and direction of release is also fixed by the aircraft designer. QUALIFIERS None WEAPONS SELECT Specifies the weapon sequence to select FORMAT WEAPONS SELECT sequence-number Command Qualifiers Defaults None None PARAMETERS sequence-number Specifies a weapon sequence number. There are 4 weapon sequences possible per aircraft. The number of steps per sequence and the number of sequences per aircraft is determined by the aircraft designer. DESCRIPTION Use the WEAPONS SELECT command to select a 2-28 Customizing the Keyboard and Mouse particular weapon sequence to fire from. The WEAPONS FIRE command allows specification of a specific sequence or the selected sequence. The selected sequence is specified by this command. The ordered stepping through of a sequence is never disrupted by changes in sequence or by firing the non-selected sequence. QUALIFIERS None ZOOM Tells FLIGHT to increase or decrease the magnification level of the current view. FORMAT ZOOM direction Command Qualifiers Defaults /[NO]MAX /NOMAX PARAMETERS direction Specifies whether FLIGHT should zoom IN or OUT in the current viewport.. DESCRIPTION Use the ZOOM command from an alternate world viewpoint to zoom in and out from the current aircraft. The ZOOM command can also be used to select between the various magnification factors built into an aircraft's current pilotview. When the current viewpoint is from outside the aircraft, the zoom is a continuous effect in or out from the aircraft currently being simulated. Because an Customizing the Keyboard and Mouse 2-29 aircraft may only be a dot on the horizon from a given world viewpoint location, the ZOOM command is available to allow the user to frame the aircraft in the viewport at a size appropriate for observing the aircraft in a meaninful way. When the current viewpoint is within the the aircraft (a pilot view), the zoom is based on the magnification controls which the aircraft designer has built into the pilot view. It may only have a single magnification level (which is not necessarily 1X magnification), or it may have as many as 10. The effect from within the aircraft is that of a telescope or binoculars. QUALIFIERS /[NO]MAX For ZOOM IN, this specifies either · the zoom level should be set to 10 in the case of viewing from a world viewpoint, or · the 10th magnification level of the current pilot view should be used. For ZOOM OUT, this specifies either · the zoom level should be set to 0 (no zoom) in the case of viewing from a world viewpoint, or · the 1st magnification level of the current pilot view should be used. 3 Session Customization Other customizations may be made to the 2-30 Customizing the Keyboard and Mouse simulator besides the definitions of the keys (described in the previous chapter). Through the use of what are known as DECwindows resources and DCL qualifiers, you may specify preferences for things such as color usage and dialog placement. 3.1 Resources A resource is a DECwindows notion of a piece of significant information which should be stored away on disk on behalf of an application. In the case of FLIGHT, the user's preferences are the pieces of information considered significant. The user's preferences are established by using the various dialogs which appear as a result of interacting with the Customize pulldown in the flight simulator main dialog. The preferences are stored in a file called DECW$USER_DEFAULTS:FLT$DEFAULTS.DAT. Understanding the disk representation of the FLIGHT preferences information is left as an exercise to the user. The interactive controls are the supported interface to changing preferences. Note that there are local overrides to the preferences contained on disk. These overrides are the qualifiers on the FLIGHT command. The qualifiers allow overrides for only a few of the many preferences which you may specify. 3.2 DCL Qualifiers A variety of DCL qualifiers may be specified to override previously-stored preferences. See Section 1.2 for information about the available DCL level controls. Customizing the Keyboard and Mouse 2-31