**********************************************************************************
**********************************************************************************
**** SimulationExample DIRECTORY
**********************************************************************************
**********************************************************************************

This directory contains example files that demonstrate the use of the AVDS/Matlab 
   toolbox to make the connections necessary between AVDS and Matlab/Simulink to
   run an interactive simulation.


To run any of these examples, 
   - make sure the files in the directory 
     "Utilities\MATLABToolbox\Toolbox\RequiredAVDSFiles" are install according to 
     the instructions in the file "ReadMe.RequiredAVDSFiles.txt".

   - install the AVDS/Matlab toolbox

   - in Matlab, change to the directory containing these examples and then follow 
     the directions below.


There are two types of interactive near real-time simulations: 

1. AVDS_FCS - Flight control system (FCS) implemented in MATLAB and aircraft (AC) 
     model inplemented in AVDS.

2. AVDS_AC - AC implemented in MATLAB and FCS model inplemented in AVDS.


**********************************************************************************
**** Matlab Examples
**********************************************************************************

AVDS_AC_Matlab.m - 
   To start the simulation:
   1) Start AVDS
   2) Load the simulation initialization file "MATLAB_AC.sim.ini". From the AVDS 
      menu select "File->Simulation Init->Open" and choose the file "MATLAB_AC.sim.ini".
   3) In MATLAB run the AVDS_AC_Matlab.m script
   4) In AVDS, choose Simulation Mode and press the "Start" button.
 
   To stop the simulation:
   1) Press the AVDS "Stop" button.


AVDS_FCS_Matlab.m - 
   To start the simulation:
   1) Start AVDS
   2) Load the simulation initialization file "MATLAB_FCS.sim.ini". From the AVDS 
      menum, select "File->Simulation Init->Open" and choose the file "MATLAB_FCS.sim.ini".
   3) In MATLAB run the AVDS_FCS.m script
   4) In AVDS, choose Simulation Mode and press the "Start" button.
 
   To stop the simulation:
   1) Press the AVDS "Stop" button.

**********************************************************************************
**** Simulink Examples
**********************************************************************************

ExampleAC.mdl - 
   To start the simulation:
   1) Start AVDS
   2) Load the simulation initialization file "MATLAB_AC.sim.ini". From the AVDS 
      menu select "File->Simulation Init->Open" and choose the file "MATLAB_AC.sim.ini".
   3) Open the Simulink model "ExampleAC.mdl".
   4) Start the Simulink simulation.
   5) In AVDS, choose Simulation Mode and press the "Start" button.
 
   To stop the simulation:
   1) Press the AVDS "Stop" button.
   2) Stop the Simulink simulation.
 
AVDS_AC_Simulink.m - Called by the Simulink model "ExampleAC.mdl" for vehicle dynamics 
   simulation.

ExampleFCS.mdl - 
   To start the simulation:
   1) Start AVDS
   2) Load the simulation initialization file "MATLAB_FCS.sim.ini". From the AVDS 
      menum, select "File->Simulation Init->Open" and choose the file "MATLAB_FCS.sim.ini".
   3) Open the Simulink model "ExampleFCS.mdl".
   4) Start the Simulink simulation.
   4) In AVDS, choose Simulation Mode and press the "Start" button.
 
   To stop the simulation:
   1) Press the AVDS "Stop" button.
   2) Stop the Simulink simulation.

AVDS_FCS_Simulink.m - Called by the Simulink model "ExampleFCS.mdl" for flight control 
   system simulation.


