MINIACFS PROGRAMMER's GUIDE 1. Information Sources 1.1 Acronyms 1.2 Users Guide 1.3 Frequently Asked Questions (FAQ) 2. Architecture 2.1 Client/Server 2.2 Interprocess Communication 2.3 Distributable 3. Processes 3.1 HOST - Host (Advanced Concepts Flight Simulator) 3.2 ACP - Aircraft Control Panel 3.3 AST (I/O System) 3.4 CDS - Colorado Data Systems 3.5 CDU - Control Display Unit 3.6 FMS - Flight Management System 3.7 MCP - Mode Control Panel 3.8 NDCP - Navigation Display Control Panel 3.9 PFD - Primary Flight Display 3.10 SFD - Secondary Flight Display 3.11 AUDIO (Sound System) 4. Procedures 4.1 Compiling and Linking 4.2 Modifying Global Variables 4.3 Changing HOST Model Scheduling 4.4 Creating Datalink Messages 4.5 Changing Datalink Autoloading Scripts 4.6 Changing Navigational Data 4.6.1 HOST Navigational Data 4.6.2 PFD Navication Data 4.6.3 FMS Navigational Data 4.7 Useful Commands 4.8 Running Real-Time 4.9 Compiling miniACFS under IRIX 6.2 1. Information Sources 1.1 Acronyms See acronyms.txt for a list of acronyms and corresponding definitions. 1.2 Users Guide See user_guide.txt for information regarding: * An introduction to the ACFS, miniACFS, and SSS. * Setup instructions regarding system configuration, installation, and configuration options. * Operation instructions for starting, shutting down, and freezing the simulation, as well as running processes in standalone and modifying simulation display configurations. * Scenario constuction tips in regards to initial positions, datalink, CDU scripts, various ATC simulation options, and data collection. * Flying examples including programming the FMS and taking off. 1.3 Frequently Asked Questions (FAQ) See faq.txt for a list of frequently asked questions and their corresponding answers. 2. Architecture 2.1 Client/Server The architecture of the miniACFS is based upon a client/server relationship. The main HOST process (modsch) contains the aircraft models and is designated as the client. The PFD, SFD, AST, MCP, FMS, and AUDIO processes are designated as servers. The AST process in turn also acts as a client for the NDCP1, NDCP2, ACP1, ACP2, ACP3, and ACP4 server processes. The HOST sends the AST the hostnames for where the NDCP and ACP processes will be running, so that the NDCP and ACP processes can run on different machines. In a similar fashion, the FMS process also acts as a client to the CDS server process, which in turn acts as a client to the CDU1 and CDU2 server processes. The HOST sends the FMS the hostnames for where the CDS and CDU processes will be running, and the FMS passes the hostnames for the CDU processes along to the CDS. (See Processes section for more information regarding the function of these separate processes). Servers are started before clients and they listen for a connection request. Clients make a connection request and if a server is listening on the proper port, will connect with the client. Then the client and server can pass data using a socket connection. 2.2 Interprocess Communication Several means of Interprocess communication (ICP) is used in the miniACFS for sending data back and forth between processes. As mentioned above, the major method of IPC is the use of sockets. However shared memory is used by the FMS, to share data between its two processes, and by the HOST, to provide global common access through the GCU. Several means of Interprocess communication (IPC) is used in the miniACFS for processes to send data back and forth. The major IPC is the socket. As mentioned above, client and server processes use sockets to establish communication paths. Shared memory is used by the Flight Management System server to share data between its two processes. IPC Messages is used by the PFD process to send audio filenames to a forked process playing audio files. 2.3 Distributable Using the client/server architecture with socket interprocess communication makes it very easy to distribute the miniACFS processes over one or more SGI workstations. Since the miniACFS can have many different displays being shown at one time, using many workstations allows the displays to be shown on many different monitors in order to avoid display overlap or having to revert to reduced display sizes or iconification. A distributed architecture also allows computation to be distributed over several processors, thus allowing an increased rate in the real-time execution of various models. 3. Processes 3.1 HOST - Host (Advanced Concepts Flight Simulator) The HOST process is the major module in which the aircraft models are executed. The HOST process communicates directly with the FMS, MCP, PFD, and SFD processes, and communicates with the ACP and NDCP processes via the AST process. The executable is "modsch" and runs at 30 HZ. 3.1.1 HOST Command Files HOST command files are located in the host/command directory. The following describes select command files: * makefile - "makehost" command file 3.1.2 HOST Data Files HOST data files are located in the host/data directory. The following describes select data files: * datalink.dat - Datalink message data file ASCII datalink definition file which contains the content for "canned" datalink messages. * mat.dat - Model Attribute Table data file ASCII model attribute table file which contains the attributes (ex. scheduling) for each model. * navdat03.dat - Navigation facility data file 3 Data file which contains Navigational Facility Data Records for a specified disk file (1 of 8) from NAVDAT01 thru NAVDAT08. [Note: the miniACFS simulation currently only utilizes Navigational Facility file 3]. * gc.dat - Global Common data file Data file contains the list of all structures/commons in the global common. 3.1.3 HOST Log Files HOST log files are located in the host/log directory. However, in addition, system log messages are written to /usr/adm/SYSLOG. 3.1.4 HOST Output Files HOST data collection output files are located in the host/output directory. However, data collection output files can be re-directed to an alternative directory by setting the "ACFS_DGS_DISK" environment variable in the file "LOGICALS.DEF". The data collection output filename is in the format "DC_MMDDYY_HHMM." where "MMDDYY" is the month, day and year, and "HHMM" is the time in hours and minutes. 3.1.5 HOST Executables HOST executables are located in the host/program directory. The following describes the executables: * modsch - Model Scheduler Main miniACFS executable which runs the aircraft models. This executable is normally run from the "sim" script, however it can be also be run by typing in "modsch" from the host/program directory. * dl_create_db - Datalink database utility Utility which reads and parses the ASCII datalink definition file ("datalink.dat") and creates the binary database for real time operations. To run the utility, type in "dl_create_db" from the host/program directory. * navcom - Navigation facilities Compiler This utility processes Navigational Facility Data Records for a specified disk file (1 of 8) from NAVDAT01 thru NAVDAT08 and creates "compiled" files NAVFIL01 thru NAVFIL08. Data for individual facilities may be added, revised or deleted. Additionally, listings may be requested in one of six logical orderings. [Note: the miniACFS simulation currently only utilizes Navigational Facility file 3]. To run the utility, type in "navcom" from the host/program directory and then enter "3" and "A" at the associated prompts. Run "navcom" prior to running "navbld". * navbld - Navigation facilities pre-select file Build utility This utility reads one of the 8 Navigational Facilities files (as specified) and builds the corresponding pre-selected data file for real-time access. [Note: the miniACFS simulation currently only utilizes Navigational Facility file 3]. To run the utility, type in "navbld" from the host/program directory. Run "navcom" prior to running "navbld". 3.1.6 HOST Scenario Files HOST scenario files are located in the host/scenario directory. Additional files can be created in order to establish alternative initial position (IP) points, or the trigger scenario events (such as malfunctions). Scenario files are loaded at run time when specified in the "sim" command (ex. "sim ksfo28r.dat"). 3.1.7 HOST Include Files HOST global common include files are located in the host/support directory. The following describes select files: * .ddl Contains the Data Dictionary Language definition of each variable within the structure/common. * ddlconvert - Data Dictionary Lanuage (DDL) Conversion utility Utility which processes the *.ddl files and generates the necessary global common include files. To run the utility, type in "ddlconvert" to process all structures/commons, from the host/support directory. Non-global common related HOST include files are located in the host/include directory. The following describes select include files: * model.stc Defines a table of real-time model names and the corresponding address of each model. 3.1.8 HOST Source Code Directories HOST source code directories are located in the host/work directory. The following describes the source code directories: * acaws - Advisory Caution & Warning System Contains source code for Advisory Caution & Warning System. * acsys - Aircraft Systems Contains models for Air Data Computer, Adverse Weather System, Electrical System, Environment System, Fire Protection System, Fuel System, Ground Proximity Warning System, Landing Gear System, Lighting System, and Propultion System (Engines). * afs - Auto Flight System (miniACFS only) Contains models of the Auto Flight System's Signal Processor, Mode & Engage Logic, Pitch Control Laws, Roll Control Laws, Yaw Control Laws, Pitch Flight Director, Roll Flight Director, and Automatic Stabilizer Trim. * asl - Aeronautical Systems Lab (SSS only) Contains AFS and ATS replacement logic. * ast (I/O system) Contains source code for communicating with the AST process. * atc - Air Traffic Control Contains source code for communicating with Air Traffic Control system (such as ASL's pseudo plane/ATC system and CTAS). * ats - Auto Throttle System (miniACFS only) Contains models of the Auto Throttle System's Signal Processor, Mode & Engage Logic, Thrust Management System, and Throttle Drive Control Laws. * chklst - Checklist System Contains source code for Checklist System. * dcs - Data Collection System Contains source code for the Data Collection System. * ddl - Data Dictionary Language Contains source code for utility which processes Data Dictionary Language data files and generates the associated global common include files. (Generates "ddl_convert"). * dl - Datalink Generates "dl_create_db". * dlm - Datalink Manager Contains source code for processing datalink messages. * dssprc - Data Source Select Processsing Contains source code for various Data Source Select Processing such as ADC and IRS Transfer Switch Processing and processing for MLS and VOR/ILS Navigation Mode. * dts - Data Transmission Server Contains source code for passing data to a data collection processor. * eos - Experimentor Operator System Contains source code for Experimentor Operator System which provides interface for simulation control. * exec - Executive Contains source code for model scheduler (modsch). (Generates "modsch"). * fcsurf - Flight Control Surfaces Contains source code for modeling Elevator, Ailerons, Rudder, Stabilizer, Flaps & Slats, Spoilers, Aileron Trim and Rudder Trim. * fltcont - Flight Controls Contains source code for Stall Warning System. * fltenv - Flight Environment Contains source code for modeling Atmosphere, Aerodynamic Coefficients, Weight & Inertia, Flight Dynamics, and Ground Dynamics. * fms - Flight Management System Contains source code for communicating with the FMS process. * gc - Global Common Contains source code for mapping into the global common. * gcu - Global Common Utility Contains source code for utility which provides access to global common variables through shared memory. * lib - Library Contains object libraries for other source code directories. This directory contains no source code. * mcp - Mode Control Panel Contains source code for communicating with the MCP process. * navaids - Navaids Contains source code for modeling Navigation Receivers, Inertial Reference System, ILS, VOR, DME, Marker Beacon, and Radar Altimeter. * navdb - Navigational Database Contains source code for utility which generates the navigational database. (Generates "navcom" and "navbld"). * nca - Neural Control Automation Contains source code for neural network supported propulsion control. * panel - Comm/Nav Panel Contains source code for Comm/Nav Panel Logic and Comm/Nav Management. * parser - Parsing Utility Contains source code for file parsing utilities. * pfd - Primary Flight Display Contains source code for communicating with the PFD process. * plot - Plot Utility Contains source code for utility which provides the capability of collecting and plotting global common variables accessed through shared memory. * scenario - Scenario Contains source code for processing scenario data files. * sfd - Secondary Flight Display Contains source code for communicating with the SFD process. * shm - Shared Memory Contains source code for creating and opening shared memory sections. * sysutils - System Utilities Contains source code for various system utilities. * tcas - Traffic Alert and Collision Avoidance System Contains source code for modeling TCAS II logic. * util - Simulation Utilities Contains source code for various simulation utilities. 3.1.9 HOST Global Common Utility The HOST global common utility directory contains the global common utility, and associated data files, which provides access to global common variables through shared memory. To run this utility, type in "gcu .dbg" from the host/gcu directory. The global common variables, listed in the file host/gcu/.dbg, will be displayed on a screen which shows the value of each variable and allows that value to be changed. 3.1.9 HOST Global Common Utility The HOST global common utility directory contains the global common utility, and associated data files, which provides access to global common variables through shared memory. To run this utility, type in "gcu .dbg" from the host/gcu directory. The global common variables, listed in the file host/gcu/.dbg, will be displayed on a screen which shows the value of each variable and allows that value to be changed. The global common utility data files (.dbg) contain the names of user selected global common variables which are accessed by the GCU. 3.1.10 HOST Plot Utility The HOST plot utility directory contains the collection and plot utilities, and associated data files, which collects and plots global common variables. To collect data: 1) Create a regular GCU input file ".dbg" 2) Type: collect -i .dbg -o . 3) When you wish to stop data collection, enter a . This will stop data collection 4) Plot the data by typing: plot . "." "." ... If you want to plot everything, enter: plot . The plot utility data files (.dbg) are the same as the global common utility data files, and contain the names of user selected global common variables which are to be collected. 3.2 ACP - Aircraft Control Panel The ACP process displays various Aircraft Control Panels, which provide pilot access to such control devices as throttles, flaps, speed brakes, and landing gear. The ACP process communicates with the HOST (or modsch) process via the AST process. The source code and associated files are located under the "acp" directory. The executables are "acp1_exec", "acp2_exec", "acp3_exec", and "acp4_exec", which can be configured to display any combination of control devices on up to four different computer screens. 3.2.1 ACP Command Files ACP command files are located in the acp/command directory. The following describes select command files: * makefile - "makeacp" command file 3.2.2 ACP Data Files ACP data files are located in the acp/data directory. The following describes select data files: * acp_config.dat - Optional ACP Configuration data file Data file which contains ACP configuration options including "FLAPS_acp#", "FLAPS_origin", "FLAPS_scale_factor", "GEAR_acp#", "GEAR_origin", "GEAR_scale_factor", "THROTTLES_acp#", "THROTTLES_origin", "THROTTLES_scale_factor", "WARN1_acp#", "WARN1_origin", "WARN1_scale_factor", "WARN2_acp#", "WARN2_origin", "WARN2_scale_factor", "ENGFIRE_acp#", "ENGFIRE_origin", "ENGFIRE_scale_factor", "NAVCOMM1_acp#", "NAVCOMM1_origin", "NAVCOMM1_scale_factor", "NAVCOMM2_acp#", "NAVCOMM2_origin", "NAVCOMM2_scale_factor", "DCP1_acp#", "DCP1_origin", "DCP1_scale_factor", "DCP2_acp#", "DCP2_origin", "DCP2_scale_factor", "PREDICT_acp#", "PREDICT_origin", "PREDICT_scale_factor", "border_option", and "sound_on". 3.2.3 ACP Include Files ACP include files are located in the acp/include directory. 3.2.4 ACP Log Files ACP log files are located in the acp/log directory. 3.2.5 ACP Executables ACP executables are located in the acp/program directory. The executables "acp1_exec", "acp2_exec", "acp3_exec", and "acp4_exec" are normally run from the "sim" script, however they can also be run from the acp/program directory either as a client (ex. "acp1_exec c") or in standalone mode (ex. "acp_exec a"). 3.2.6 ACP Source Code Directories ACP source code directories are located in the acp/work directory. 3.3 AST (I/O System) The AST process simulates a Link AST input/output system. The AST process provides the communication interface between the HOST (or modsch) process and the ACP process, the NDCP process, and optional graphical or hardware joystick control devices. The source code and associated files are located under the "ast" directory. The executable is "ast_exec". 3.3.1 AST Command Files AST command files are located in the ast/command directory. The following describes select command files: * makefile - "makeast" command file 3.3.2 AST Data Files AST data files are located in the ast/data directory. The following describes select data files: * ast_config.dat - Optional AST Configuration data file Data file which contains AST configuration options including "flybox_enable", "softstick_enable", "STICK_origin", "scale_factor", and "border_option". * calibrate.dat - Joystick Calibration data file Data file which contains the offset, max, and min data to calibrate the left and right joysticks. This file can be auto-generated by running the ast process in standalone (ex. "ast_exec a") and pressing the trigger at maximum and minimum deflection for each axis, and then pressing the trigger again at zero deflection (for each joystick). 3.3.3 AST Include Files AST include files are located in the ast/include directory. 3.3.4 AST Log Files AST log files are located in the ast/log directory. 3.3.5 AST Executables AST executables are located in the ast/program directory. The executable "ast_exec" is normally run from the "sim" script, however it can also be run from the ast/program directory either as a client (ex. "ast_exec c") or in standalone mode (ex. "ast_exec a"). By running the AST executable in standalone mode (ex. "ast_exec a") it is possible to calibrate the joysticks by pressing the trigger at maximum and minimum deflection for each axis, and then pressing the trigger again at zero deflection (for each joystick). 3.3.6 AST Source Code Directories AST source code directories are located in the ast/work directory. 3.4 CDS - Colorado Data Systems The CDS process simulates a Colorado Data Systems input/output system. The CDS process provides the communication interface between the FMS process and the CDU process. The source code and associated files are located under the "cds" directory. The executable is "cds_exec". 3.4.1 CDS Command Files CDS command files are located in the cds/command directory. The following describes select command files: * makefile - "makecds" command file 3.4.2 CDS Data Files CDS data files are located in the cds/data directory. 3.4.3 CDS Include Files CDS include files are located in the cds/include directory. 3.4.4 CDS Log Files CDS log files are located in the cds/log directory. 3.4.5 CDS Executables CDS executables are located in the cds/program directory. The executable "cds_exec" is normally run from the "sim" script, however it can also be run from the cds/program directory either as a client (ex. "cds_exec c") or in standalone mode (ex. "cds_exec a"). 3.4.6 CDS Source Code Directories CDS source code directories are located in the cds/work directory. 3.5 CDU - Control Display Unit The CDU process displays the Control Display Unit, which provides pilot access to the FMS. The CDU process communicates with the FMS process via the CDS process. The source code and associated files are located under the "cdu" directory. The executables are "cdu1_exec" and "cdu2_exec", which displays the Captain's CDU and the First Officer's CDU respectively. 3.5.1 CDU Command Files CDU command files are located in the cdu/command directory. The following describes select command files: * makefile - "makecdu" command file 3.5.2 CDU Data Files CDU data files are located in the cdu/data directory. The following describes select data files: * cdu_config.dat - Optional CDU Configuration data file Data file which contains CDU configuration options including "CDU1_origin", "CDU2_origin", "scale_factor", "border_option", and "sound_on". 3.5.3 CDU Include Files CDU include files are located in the cdu/include directory. 3.5.4 CDU Log Files CDU log files are located in the cdu/log directory. 3.5.5 CDU Executables CDU executables are located in the cdu/program directory. The executables "cdu1_exec" and "cdu2_exec" are normally run from the "sim" script, however they can also be run from the cdu/program directory either as a client (ex. "cdu1_exec c") or in standalone mode (ex. "cdu1_exec a"). 3.5.6 CDU Source Code Directories CDU source code directories are located in the cdu/work directory. 3.6 FMS - Flight Management System The FMS process simulates the Flight Management System, which provides such features as flight planning, performance, navigation, guidance and control. The FMS process communicates directly with the HOST (or modsch) process, and communicates with the CDU process(es) via the CDS process. The source code and associated files are located under the "fms" directory. The executables are "fms_exec" and "aproc", which contain the foreground process and background process respectively. 3.6.1 FMS Command Files FMS command files are located in the fms/command directory. The following describes select command files: * makefile - "makefms" command file 3.6.2 FMS Data Files FMS data files are located in the fms/data directory. 3.6.3 FMS Log Files FMS log files are located in the fms/log directory. 3.6.4 FMS Executables FMS executables are located in the fms/program directory. The executable "fms_exec" is normally run from the "sim" script, however it can also be run from the fms/program directory either as a client (ex. "fms_exec c") or in standalone mode (ex. "fms_exec a"). The "fms_exec" executable runs the "aproc" executable. 3.6.5 FMS Include Files FMS include files are located in the fms/support directory. 3.6.6 FMS Source Code Directories FMS source code directories are located in the fms/work directory. 3.7 MCP - Mode Control Panel The MCP process displays the Mode Control Panel, which provides pilot access to automated features such as heading, altitude, and speed control. The MCP process communicates with the HOST (or modsch) process. The source code and associated files are located under the "mcp" directory (see MCP Directory Structure). The executable is "mcp_exec". 3.7.1 MCP Command Files MCP command files are located in the mcp/command directory. The following describes select command files: * makefile - "makemcp" command file 3.7.2 MCP Data Files MCP data files are located in the mcp/data directory. The following describes select data files: * mcp_config.dat - Optional MCP Configuration data file Data file which contains MCP configuration options including "MCP_origin", "scale_factor", "border_option", "sound_on", "pca_enable", "touch_config", and "bank_limit". 3.7.3 MCP Include Files MCP include files are located in the mcp/include directory. 3.7.4 MCP Log Files MCP log files are located in the mcp/log directory. 3.7.5 MCP Executables MCP executables are located in the mcp/program directory. The executable "mcp_exec" is normally run from the "sim" script, however it can also be run from the mcp/program directory either as a client (ex. "mcp_exec c") or in standalone mode (ex. "mcp_exec a"). 3.7.6 MCP Source Code Directories MCP source code directories are located in the mcp/work directory. 3.8 NDCP - Navigation Display Control Panel The NDCP process displays the Navigation Display Control Panel, which provides pilot access to control over the HSI display (see PFD). The NDCP process communicates with the HOST (or modsch) process via the AST process. The source code and associated files are located under the "ndcp" directory. The executables are "ndcp1_exec" and "ndcp2_exec", which displays the Captain's NDCP and the First Officer's NDCP respectively. 3.8.1 NDCP Command Files NDCP command files are located in the ndcp/command directory. The following describes select command files: * makefile - "makendcp" command file 3.8.2 NDCP Data Files NDCP data files are located in the ndcp/data directory. The following describes select data files: * ndcp_config.dat - Optional NDCP Configuration data file Data file which contains NDCP configuration options including "NCP1_origin", "NDCP2_origin", "scale_factor", "border_option", "sound_on", and "vsd_enable". 3.8.3 NDCP Include Files NDCP include files are located in the ndcp/include directory. 3.8.4 NDCP Log Files NDCP log files are located in the ndcp/log directory. 3.8.5 NDCP Executables NDCP executables are located in the ndcp/program directory. The executables "ndcp1_exec" and "ndcp2_exec" are normally run from the "sim" script, however they can also be run from the ndcp/program directory either as a client (ex. "ndcp1_exec c") or in standalone mode (ex. "ndcp1_exec a"). 3.8.6 NDCP Source Code Directories NDCP source code directories are located in the ndcp/work directory. 3.9 PFD - Primary Flight Display The PFD process displays the Primary Flight Display, which consists of an Attitude Direction Indicator (ADI) and a Horizontal Situation Indicator (HSI). The PFD process communicates with the HOST (or modsch) process. The source code and associated files are located under the "pfd" directory. The executables are "pfd1_exec" and "pfd2_exec", which display the Captain's PFD and the First Officer's PFD respectively. 3.9.1 PFD Command Files PFD command files are located in the pfd/command directory. The following describes select command files: * makefile - "makepfd" command file 3.9.2 PFD Data Files PFD data files are located in the pfd/data directory. The following describes select data files: * pfd_config.dat - Optional PFD Configuration data file Data file which contains PFD configuration options including "PFD1_ADI_origin", "PFD1_HSI_origin", "PFD2_ADI_origin", "PFD2_HSI_origin", "scale_factor", "border_option", and "curser_option". * vsd_config.dat - VSD Configuration data file Datalink contains configuration options for VSD display. 3.9.3 PFD Include Files PFD include files are located in the pfd/include directory. 3.9.4 PFD Log Files PFD log files are located in the pfd/log directory. 3.9.5 PFD Executables PFD executables are located in the pfd/program directory. The executables "pfd1_exec" and "pfd2_exec" are normally run from the "sim" script, however they can also be run from the pfd/program directory either as a client (ex. "pfd1_exec c") or in standalone mode (ex. "pfd1_exec a"). 3.9.6 PFD Source Code Directories PFD source code directories are located in the pfd/work directory. 3.10 SFD - Secondary Flight Display The SFD process displays the Secondary Flight Display, which provides information on aircraft systems as well as contains an automated checklist system. The SFD process communicates with the HOST (or modsch) process. The source code and associated fils are located under the "sfd" directory. The executables are "sfd1_exec", "sfd2_exec", "sfd3_exec", and "sfd4_exec" which displays the Captain's SFD, the engine/EICAS SFD, the flight surface display SFD, and the First Officer's SFD respectively. 3.10.1 SFD Command Files SFD command files are located in the sfd/command directory. The following describes select command files: * makefile - "makesfd" command file 3.10.2 SFD Data Files SFD data files are located in the sfd/data directory. The following describes select data files: * sfd_config.dat - Optional SFD Configuration data file Data file which contains SFD configuration options including "SFD1_origin", "SFD2_origin", "SFD3_origin", "SFD4_origin", "SFD1_scale_factor", "SFD2_scale_factor", "SFD3_scale_factor", "SFD4_scale_factor", and "scale_factor". 3.10.3 SFD Include Files SFD include files are located in the sfd/include directory. 3.10.4 SFD Log Files SFD log files are located in the sfd/log directory. 3.10.5 SFD Executables SFD executables are located in the sfd/program directory. The executables "sfd1_exec", "sfd2_exec", and "sfd3_exec" are normally run from the "sim" script, however they can also be run from the sfd/program directory either as a client (ex. "sfd1_exec c") or in standalone mode (ex. "sfd1_exec a"). 3.10.6 SFD Source Code Directories SFD source code directories are located in the pfd/work directory. 3.11 AUDIO (Sound System) The AUDIO process plays select simulation sound files. 3.11.1 AUDIO Command Files AUDIO command files are located in the audio/command directory. The following describes select command files: * makefile - "makeaudio" command file 3.11.2 AUDIO Data Files AUDIO data files are located in the audio/data directory. The following describes select data files: * audio_config.dat - Optional Audio Configuration data file Data file which contains AUDIO configuration options including "greeting_on", "disconnect_on", "tcas_on", "chime_on", "altitude_on", "firebell_on". 3.11.3 AUDIO Include Files AUDIO include files are located in the audio/include directory. 3.11.4 AUDIO Log Files AUDIO log files are located in the audio/log directory. 3.11.5 AUDIO Executables AUDIO executables are located in the audio/program directory. The executables "audio1_exec" and "audio2_exec" are normally run from the "sim" script, however they can also be run from the audio/program directory either as a client (ex. "audio1_exec c") or in standalone mode (ex. "audio1_exec a"). 3.11.6 AUDIO Source Code Directories AUDIO source code directories are located in the audio/work directory. 4. Procedures 4.1 Compiling and Linking 4.1.1 Compiling the Entire MiniACFS To compile the entire miniACFS, run the 'makeall' script in the command directory. 4.1.2 Compiling Individual Processes Make aliases exist for each process. The alias names begin with "make" and end with the name of the process. For example, to compile the host (modsch) process, type "makehost" or to compile the acp process, type "makeacp". Another compilation method is to run the make aliases within the process directory. This involves running an alias to setup a make alias. The name of this alias is the process name suffixed with "_alias". For example, "host_alias" or "pfd_alias". Then the new "make" alias should be run. The make alias should be run in the process work subdirectory to create the object library and then in the work/exec directory to create the program. For example, a source file in the pfd/work/display directory was modified. Run "pfd_alias". Then run "make" in the pfd/work/display directory to create the library file, libdisp. Then run "make" in the pfd/work/exec directory to link and compile the PFD executable. 4.2 Modifying Global Variables Use the Data Dictionary Language(DDL) conversion utility to modify global variables for the HOST (modsch) process. This utility uses DDL files to specify the miniACFS global variables. To modify a global variable, edit the DDL file used by the Data Dictionary Language(DDL) conversion utility. The DDL files located in the host/support directory have a ".ddl" suffix. A file exists for each global structure. For example afs.ddl, ats.ddl, fltenv.ddl and pfd.ddl. Run the "ddlconvert" utility in the host/program directory to process the DDL files and to generate the necessary global common include files. 4.3 Changing HOST Model Scheduling The Model Attribute Table(MAT) lists all of the models for modsch to schedule to run. It also specifies the cycles that the model should run. The MAT is named mat.dat and located in host/data. 4.4 Creating Datalink Messages To create canned datalink messages, modify the host/data/datalink.dat file. The beginning of this file describes the format of the messages. Process the datalink.dat file by running "dl_create_db" in the host/program directory. 4.5 Changing Datalink Autoloading Scripts Modify cdu_script.dat in the fms/data directory. No compilation necessary. 4.6 Changing Navigational Data The HOST, PFD and FMS process each have navigational databases. 4.6.1 HOST Navigational Facility Data The HOST navigational facility data contains VOR, airport and other navigation data used by the modsch process. To modify the the navigational database for modsch: - Edit host/data/navdat03.dat. - Run "navcom" from the host/program directory and then enter "3" and "A" at the associated prompts. - Run "navbld". For more information regarding the data file, navdat03.dat, see HOST Data Files. For more information regarding the executables, navcom and navbld, see HOST Executables. In the event the desired initial aircraft position is not covered by the existing navigational database (and additional navigational data is not readily available), the simulated ground altitude and magnetic variation may be "hard coded". To changing the initial values of the corresponding variables (i.e. "g_eos.gnd_alt" and "g_eos.magvar"), modify the file "host/work/eos/acfs_input.f" and rebuild the simulation (i.e. "makehost"). 4.6.2 PFD Navigational Data The PFD uses the navigational data to display airport, runway and VOR markers on the HSI. The navigational data is stored in two files: pfd/data/arpt.dat and pfd/data/navdb.dat. Edit pfd/data/arpt.dat to change runway and airport identification, latitude and longitude data. Edit pfd/data/navdb.dat to modify VOR and GRP (i.e. waypoint) information for the PFD. 4.6.3 FMS Navigational Data The FMS process simulates the Flight Management System, which provides features such as flight planning, performance, navigation, guidance and control. The FMS needs navigational data such as company routes, STARs, SIDs, airways, waypoints, airport and runway information. This data is stored in the fms/data directory (i.e. "apprch.dat", "aprt.dat", "jairways.dat", "navdb.dat", "route.dat", "runway.dat", "sid.dat", and "star.dat"). 4.7 Useful Commands In the command directory, there are several useful scripts. These scripts can be modified for your particular needs. cmd - changes directory to the miniACFS/command directory. sim (or sim.) - runs the simulation (from the command directory). cleanup - kills the miniACFS processes. c - changes directory to the miniACFS//command directory. d - changes directory to the miniACFS//data directory. i - changes directory to the miniACFS//support (or include) directory. l - changes directory to the miniACFS//log directory. p - changes directory to the miniACFS//program directory. w - changes directory to the miniACFS//work directory. scenario - changes directory to the miniACFS/host/scenario directory. output - changes directory to the miniACFS/host/output directory. gcudir - changes directory to the miniACFS/host/gcu directory. plotdir - changes directory to the miniACFS/host/plot directory. makeall - compiles and links all miniACFS executables. make - compiles and links all miniACFS/ executables. alias;make - compiles the current directory (ex. miniACFS//work/*). 4.8 Running Real-time The modsch process attempts to lower its priority to get a higher resolution of the realtime clock. To do this, it must be owned by root. Also, the permissions of modsch must be modified so other users can execute it. To run modsch in realtime mode, execute the following commands in the host/program directory: chown root modsch chmod +s modsch To use a utility to automatically convert "modsch" for running in realtime mode: 1) Have your system administrator login in as root, and follow the directions in TOOLS/src/mkroot/README, to re-build the "mkroot" utility in the TOOLS/src/mkroot directory. This should generate the "mkroot" utility in the TOOLS/bin directory with the ownership of root, the same group id (as the desired users), and with the "+s" attribute set. 2) To manually use the "mkroot" utility, go to the host/program directory and type in "mkroot modsch". To automatically use the "mkroot" utility, uncomment out the line containing the "mkroot" command in the file "host/work/exec/Makefile" (ex. "# cd $(ACFS_BIN); mkroot modsch"). 4.9 Compiling miniACFS under IRIX 6.2 Compiling miniACFS to run under IRIX 6.2 is relatively easy. Only one makefile must be modified. To compile miniACFS to run on IRIX 6.2, modify the makefile in the cdu/work/exec directory. Under IRIX 5, the flag -D_SGINAP5 must be used to compile. Under IRIX 6, don't compile with this flag. Modify the CCFLAGS option in the cdu/work/exec/makefile based on the operating system. For IRIX 5: CCFLAGS = -g -fullwarn -I$(ACFS_CLASS)/include -D_BSD_SIGNALS -D_SGINAP5 For IRIX 6: CCFLAGS = -g -fullwarn -I$(ACFS_CLASS)/include -D_BSD_SIGNALS