Chapter 12
Support functions reference
The FDC toolbox includes several support utilities that assist the user in interacting
with the simulation models and analytical tools, taking care of tasks such as toolbox
initialisation, directory selection, data handling, on-line help display, and screen formatting.
In addition, some model-specific functions help with the definition of model
parameters and the presentation of simulation results. Some of the more generic
support utilities may be useful for other applications too.
This chapter provides a detailed overview of all FDC support functions. With a
few exceptions, all programs discussed here are located in the PROGRAMS subdirectory
of the FDC toolbox. See the previous chapter for a description of the analytical
functions of the FDC toolbox; see chapter 15 for information about the support utilities
for the autopilot models.
12.1 A brief overview of the support utilities
Although the support functions perform a quite diverse number of tasks, we can
roughly distinguish five main categories:
1. Toolbox initialisation functions
Initialisation of the toolbox is handled by the utility FDC, which calls the functions
FDCINIT and FDC_SPLASH and displays a welcome message. FDCINIT
appends the FDC directories to the MATLAB path, and provides a simple user
interface to change these directories when required, e.g. in order to enhance
the toolbox with new models or tools; FDC_SPLASH displays a splash-screen
for the FDC toolbox.
2. Directory functions
The function FDCDIR assists in obtaining full pathnames of arbitrary FDC subdirectories.
DATADIR and HELPDIR provide quick pointers to the DATA and
HELP subdirectories, using FDCDIR to build the respective directory paths.
3. Data load functions
The function FDCLOAD is used to retrieve FDC datafiles in general. DATLOAD,
LINLOAD, MATLOAD, and TRILOAD apply this utility to retrieve datafiles with
extensions .DAT, .LIN, .MAT, and .TRI, respectively.
208 Chapter 12. Support functions reference
4. Generic helper functions
BROWSE displays HTML helpfiles in the default web browser or the MATLAB
help browser, NEWMSGBOX displays simple message boxes, NUM2STR2
converts numericals to strings, SCREENSIZE returns screen dimensions in several
units, and TXTMENU displays menus of choices in the MATLAB commandwindow.
5. Model-specific helper functions
MODBUILD is used to generate the datafile AIRCRAFT.DAT, which contains the
aircraft model parameters. FIXSTATE can be used to initialize the xfix block in
the SIMULINK model of the aircraft (see chapter 8), RESULTS re-orders aircraft
simulation results in the MATLAB workspace, and RESPLOT is a quick and
dirty plotting function to visualise those results.
In the next sections these support functions will be described in more detail. Type
help fname, helpwin fname, or browse fname to obtain on-screen help for the function
fname in the MATLAB command-window, the MATLAB help window, or your
web browser (or alternatively: the MATLAB help browser), respectively.
12.2 Toolbox initialisation functions
The toolbox initialisation is handled by the startup utility FDC. It calls two other support
functions: FDC_SPLASH, which displays a splash-screen, and FDCINIT, which
maintains a list of FDC directories to be appended to MATLAB search path and allows
the user to modify this list if required.
12.2.1 FDC
The startup utility FDC organises the initialisation of the FDC toolbox. A detailed
explanation of all steps involved in the installation and initialisation of the toolbox
has already been given in section 7.4, but in short the initialisation procedure comes
down to running FDC by navigating to the FDC root-directory (using CD or CHDIR),
typing fdc at the command-line, and validating (and possibly altering) the list of
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:FDC 1.4 – A SIMULINK Toolbox for Flight Dynamics and Contro(93)