曝光台 注意防骗
网曝天猫店富美金盛家居专营店坑蒙拐骗欺诈消费者
a dedicated function FDCDIR is used to determine the full pathnames
of FDC directories. The functions DATADIR and HELPDIR handle the special cases of
locating the FDC data and help directories, respectively.
12.3.1 FDCDIR
The utility FDCDIR generates full pathnames for FDC directories. In practice, this
feature is primarily used to locate the DATA and HELP directories of the FDC toolbox,
but it can handle other subdirectories too. This offers the flexibility that is required
to deal with the FDCINIT feature to change the FDC root- and subdirectories.
Usage:
D = fdcdir returns the root-directory of the FDC toolbox into the string variable D.
D = fdcdir(NAME) returns the complete path of the FDC subdirectory specified in
the string variable NAME.
D = fdcdir(NAME1,NAME2) returns the complete path of the FDC sub-subdirectory
specified in the string variable NAME2, which itself is contained in the FDC subdirectory
specified in the string variable NAME1.
More input arguments are allowed to specify deeper subdirectory levels, which may
be useful for future toolbox enhancements — currently, this option is not yet very
practical. Notice that all input arguments must be string variables.
12.4. Data load functions 211
Examples:
Let’s assume that the FDC root-directory as specified in FDC.INI (which was generated
by the function FDCINIT) is:
c:\matlab\toolbox\fdc14
(using MS Windows path separators for convenience; replace these by the relevant
symbology if you use a different operating system).
Then:
D = fdcdir will return:
D = “c:\matlab\toolbox\fdc14”
D = fdcdir(’models’) will return:
D = “c:\matlab\toolbox\fdc14\models”
and:
D = fdcdir(’models’,’aircraft’) will return:
D = “c:\matlab\toolbox\fdc14\models\aircraft”.
FDCDIR will verify whether the specified path actually exists; a warning message
will be displayed if the path cannot be found. Since ..\fdc14\models\aircraft is not
a standard FDC directory, the above examples will in fact cause this path warning
message to be displayed, unless this directory was created by the user.
12.3.2 DATADIR, HELPDIR
In practice, the FDCDIR utility is mainly used for referencing the DATA and HELP
directories of the FDC toolbox. The complete path to these directories can be obtained
by calling FDCDIR with the input argument ’data’ or ’help’, respectively:
fdcdir(’data’) or fdcdir(’help’).
However, to simplify this even further, and also to get rid of this last part of directory
hard-coding, two simple ‘wrapper functions’ DATADIR and HELPDIR were
created to take care of these FDCDIR calls. All other FDC functions that need to
know the location of these directories will simply call these wrapper functions, instead
of hard-coding the actual pathname or calling FDCDIR directly. If you ever
create additional FDC functions that require access to these directories, it is highly
recommended to use the same strategy.
DATADIR can be run by simply typing datadir at the command-line, which will
yield the text string “$FDCROOT$\DATA” ($FDCROOT$ being the FDC root-directory).
HELPDIR can be called by typing helpdir at the command-line, which will return the
string “$FDCROOT$\HELP”. Should the location of these directories ever be changed
in the future (for whatever reason), the only files that need to be changed to reflect
this change will be DATADIR.M and HELPDIR.M.
12.4 Data load functions
The FDC toolbox uses a separate data directory (the subdirectory DATA) to store various
kinds of information, such as model parameters, trimmed flight conditions, and
212 Chapter 12. Support functions reference
system matrices of linearized models. Although different file-extensions will be used
to distinguish different kinds of data, all datafiles will use the MATLAB data format
which is normally used for MAT-files.
Model parameter files can be recognized by the extension .DAT, linearized model
datafiles use the extension .LIN, and trimmed flight conditions use the extension
.TRI. A support function FDCLOAD allows quick retrieval of arbitrary datafiles from
the data-directory, while some dedicated functions are available to retrieve files of a
specific type (e.g. DATLOAD for DAT-files).
12.4.1 FDCLOAD
The utility FDCLOAD retrieves datafiles from the FDC data-directory, using a graphical
user-interface that is built on the UIGETFILE command of MATLAB. The datadirectory
is used as starting point to browse through the datafiles; the exact location
of this directory is retrieved using the function DATADIR (see section 12.3.2).
中国航空网 www.aero.cn
航空翻译 www.aviation.cn
本文链接地址:
FDC 1.4 – A SIMULINK Toolbox for Flight Dynamics and Contro(95)