曝光台 注意防骗
网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者
directories shown in the command window.
FDC will first call FDC_SPLASH, which displays the splash-screen from figure 7.2,
and next FDCINIT, which manages the list of FDC directories and appends them to
the MATLAB search path (figures 7.3 to 7.5). Finally, the welcome message from figure
7.6 will be shown to indicate that the software is ready. The source file FDC.M
is located in the FDC root-directory, to provide easy access; FDC_SPLASH.M and FDCINIT.
M are located in the PROGRAMS subdirectory.
The modifications made to the MATLAB search path by FDCINIT remain effective
until MATLAB itself is closed; they are not stored permanently. For this reason, the
initialisation routine FDC needs to be run every time the toolbox is to be used after
starting a new MATLAB session. If the toolbox is used frequently, it may be convenient
to permanently include the FDC root-directory to the MATLAB path, so that
FDC can be started right away by typing fdc, without having to navigate to the FDC
root-directory first.
12.2. Toolbox initialisation functions 209
$FDCROOT$ aircraft
apilot
data
doc
examples
help
navigate
programs
tools
wind
Figure 12.1: Default FDC directory structure
12.2.2 FDCINIT
Since the toolbox has been organised over several subdirectories, it is necessary for
the FDC directories to be appended to the MATLAB path, in order to obtain direct
command-line access to all functions, models, and helpfiles. The function FDCINIT
handles this task, and it provides a simple user-interface to accommodate changes
in the FDC directory structure, which may be useful should the toolbox ever be reorganised
or enhanced in the future.
Figure 12.1 shows the default directory structure of the FDC toolbox. See section
7.6 for an explanation of the purpose of these directories. $FDCROOT$ represents
the default location of the root-directory of the FDC toolbox, which is equal to:
$FDCROOT$ = $MATLABROOT$\TOOLBOX\FDC14
with $MATLABROOT$ being the root-directory of MATLAB itself. By default, FDCINIT
uses this directory list for the toolbox initialisation; these are the default directories
to be appended to the MATLAB path.
If the directory list does not correspond to the actual directory structure, it can be
modified by the user, using the relevant menu options from FDCINIT. For instance, in
section 7.4 it was explained how the FDCINIT menu options can be used to specify a
different FDC root-directory, should the toolbox be installed to a non-default location.
Similar options are available to modify the list of FDC subdirectories.
FDCINIT will append the FDC directories to the MATLAB path after the user confirms
the directory definitions. The confirmed list will be stored in the file FDC.INI
in the directory PROGRAMS (the location that also holds the file FDCINIT.M). Each
next time FDCINIT is started, it will use the list from FDC.INI instead of the default
list from figure 12.1. The default list will be used if the file FDC.INI cannot be found;
deleting this file makes FDCINIT behave as if it was run for the first time.
210 Chapter 12. Support functions reference
Notice that FDCINIT will not verify if specified directories actually exist. Therefore,
if the user uses the options to add, remove, or rename (sub-) directories, a mismatch
between the actual structure of the toolbox and the directory list used by FDCINIT
will occur. It is the responsibility of the user to ensure that the directory list used by
FDCINIT corresponds to the actual situation.
Although the options to change the directories provide flexibility, the mandatory
directory verification during initialisation may become rather inconvenient if you
don’t intend to change the directory structure often. For this reason, FDCINIT offers
an option to suppress the directory-check for future sessions. To restore the directory
modification options afterward, it is necessary to delete the file FDC.INI. Figure 7.5
shows the directory verification process and the ‘suppress’ option in action.
12.2.3 FDC_SPLASH
FDC_SPLASH displays the splash screen for the FDC toolbox, which was shown earlier
in figure 7.2, until the user presses ‘Enter’ or clicks inside the splash-screen with
the mouse pointer. It is relatively easy to modify this function to display other kinds
of graphics, so re-using the splash-screen code for other purposes is quite possible.
The source-file FDC_SPLASH.M can be found in the directory PROGRAMS.
12.3 Directory functions
Some FDC functions require access to specific subdirectories. To assure flexibility
and maintainability of the code, especially with regard to future changes and enhancements,
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:
FDC 1.4 – A SIMULINK Toolbox for Flight Dynamics and Contro(94)