Hank Compilation and Execution
-For Windows
system (2000, XP)
l
Five parts in Hank system
Currently, Hank
driving simulation system is running on a local network of PCs. It has five
functional parts (see system overview). Each part
runs as a separate program. These programs communicate through TCP connections
in real time. There are six CVS modules: five for the real time system and one
for remote execution. Source codes of these modules are available through
WinCVS checkout operations. There is also a checkout
example for the main module -Hank simulator. Below list the names of the
modules.
l
Hank - Hank simulator
l
OSGVisual - 3D graphics server
l
BikeIOServer
-
Bike IO server
l
SoundServer - Sound server
l
HankGUI
-
2D GUI experimenter
l
HankRPC
- RPC application for remote execution.
l
Hank compilation
Except that
HankGUI code is written in Java, all the other codes are written in C/C++.
Since the compilation of Hank simulator is the
most complicated, a how-to introduction is given.
After the
compilation, there will be one or two executable files generated from each
module. Copy them to corresponding PCs and add their paths to the value of
system variable
PATH, so they can
be executed as Windows commands.

Before execution, check that all necessary files are
accessible on each machine. It is suggested that put Hank simulator and 2D GUI
experimenter on the same machine for the ease of use.
|
Machine |
Executable Files |
From CVS modules |
|
Hank simulator & 2D GUI experimenter |
new_hank.exe, HI.jar, RPCcall.exe, RPCListen.exe |
Hank, HankGUI, HankRPC |
|
3D Graphics servers |
fltviewer.exe, RPClisten.exe |
OSGVisual, HankRPC |
|
Sound server |
soundserver.exe, RPCListen.exe |
SoundServer, HankRPC |
|
Bike IO server |
bikeioserver.exe, RPCListen.exe |
BikeIOServer, HankRPC |
For all machines with
RPCListen.exe, set
RPCListen
as a Startup command.

l
Hank data acquisition
Below is a list of data types used in Hank system.
l
Environment definition files - .edf files
l
Scenario definition files - .sdl files
l
Task scheduler files - .tsk files
HankData.zip
contains a group of the first
three types of files. Unzip it to your local directory and you will see them as below.

l
3D graphics data files - hierarchical flight files (.flt) which define 3D
models rendered by graphics servers.
Copy these 3D models to all graphics servers.
The models are available by requests.
l
Hank configuration file - A file
used by any execution which specifies the names of environment file, scenario
files, task scheduler file, 3D graphics file (optional), and machines names
(optional) for graphics server(s), sound server, and bike IO server. This file
is loaded at the beginning of the execution of Hank simulator. An example of the
configuration file is shown below.

l
Set environment variables
Set two
environment variables:
HANK_CONFIG - specifies a default configuration file to be used
unless a configuration file is given as a command argument when executing Hank simulator.
CLASSPATH - specifies the path of
ANTLR files. (e.g. C:\antlr-2.7.1)
l
Hank execution
Hank simulator serves as a MASTER of the whole system. It can automatically start all the other programs through remote procedure calls (RPC). To start the whole system, just run Hank simulator (new_hank.exe). You can specify a configuration file in the command line as the following.
C: /newhank [configuration file]