This directory and subdirectories contain the source and executable code to run the flight safety autotest utility on the JPATS trainer.  

On the JPATS project communication takes place between the host (written in ADA) and the IOS (written in C).  Because of software licensing issues
and contractual requirements the existing Flight Safety autotest code written in Fortran (normally a background task on the host)  was installed on the IOS.   
The  JPATS architecture did not permit installing the existing Autotest directly as a background task.  Autotest could not be run in realtime without causing 
frame overruns.  Consequently the existing software was divided into three functions (one realtime, two background)  which reside on the IOS.  In addition
two executable packages were written to activate the online software in an offline mode.

Directory For_AT contains the Fortran software that resides and runs on the IOS.  See the auto_driver_cat directory for the host ADA autotest code.

Directory FLT_utility contains the original utilities which process flight test or manufacturers data into flight safety format.  
Refer to the flight safety autotest users manual.  This software has been modified to process the JPATS data.

The original flight safety code was run as a single main (fat_control.f90) and was run as a background task on the host computer.

The three main functions must be installed on the IOS in the release/autotest/ directory (for_at.dll, getdata.exe, jpatsplot.exe).  for_at.dll is linked to the C libraries
and may have to be recompiled and reinstalled on the IOS software or the C library changes.  If autotest quits working try that first.

Test Data files (.tdf, .pom, .acd ) are stored in D:/data on the IOS
Host - IOS file transfer is through the d:/host_data/ directory on the IOS
If autotest is used offline on a pc, create these two directories (or change the pathnames in the code)

for_at.dll is in the real time thread and is dynamically linked to the IOS via a C wrapper.  Its function is to handle autotest communication between the
IOS computer and the Host and to activate the two other applications as background tasks when required  

When a test ID number is input on the ios autotest control page for_at.dll activates getdata.exe.  getdata.exe reads the TDF, POM, and ACD (see the flight safety autotest users manual)
files stored on the IOS disk and creates two files which are read by the host:  Testic.dat and Histin.csv.

	Testic.dat contains the initial conditions set for running a particular test.
              Histin.dat contains the time histories of required simulator actions and flight test histories of aircraft activity.

The host runs the test after reading these files and sends back two other files: icout.csv and histout.csv which are the results of the initial trim and the time history
of the trainer response to the input drivers.

When the host notifies for_at.dll that the test is complete for_at activates jpatsplot.exe.  jpatsplot.exe analyzes test results, formats the output for text and graphical
output and sends the output to the screen or printer. 

In general most of the existing Flight Safety autotest subroutines were untouched.  Changes mainly involved formatting issues for ADA input/output and increasing array sizes 

JPATSPLOT and GETDATA can be run standalone by entering 
      jpataplot.exe xxx
      getdata.exe xxx
where xxx is the QTG test id number.  This standalone mode is generally used to set up or modify the TDF/ACD/POM
files and check if the output files are created without error messages.

Autotest_log.txt is created in the data directory and provides error messages
