Playback Write Data Block

Description:

Used to manage data for output to an AVDS playback file. This block opens/clears an ASCII (text) file at the beginning of the simulation and uses it to save the input vector in rows, based on simulation time. The file name is derived by appending the vehicle ID number to the end of the base data file name. AVDS playback data files are ASCII files with the data in columns. The columns can be in any order and the only requirement on the content/number of columns is that there must be at least one column that contains time information, elapsed or delta, in seconds. The order of the columns must be configured either by using the source code and changing the AVDSPlaybackSetup function or by using the Playback Configuration dialog window in AVDS. The default inputs for this block are the inputs that are configured with the Playback Configuration File Block. This block uses the S-function, "AVDSPlaybackSave" to perform its functions.

Inputs:

TimeSeconds, NorthPositionFeet, EastPositionFeet, DownPositionFeet, PsiRotationDeg, ThetaRotationDeg, PsiRotationDeg, craftmask, crafttype, EngineLevel, AlphaDeg, BetaDeg, G, VFtSec, MachNumber, DeltaSurface01Rad, DeltaSurface02Rad, DeltaSurface03Rad, DeltaSurface04Rad, DeltaSurface05Rad, DeltaSurface06Rad, DeltaSurface07Rad, DeltaSurface08Rad, DeltaSurface09Rad, DeltaSurface10Rad, DeltaSurface11Rad, DeltaSurface12Rad, DeltaSurface13Rad, DeltaSurface15Rad, DeltaSurface15Rad, WeaponsSelect, WeaponsLaunch, Explode

Note: For the definitions of these variables see the AVDS User’s Manual, Table 5-1 Dynamic Items.

Outputs:

None.

Parameters:

BaseDataFileName

– This name is used as part of the playback data file name. Note: When using the Playback Configuration File Block, this name must be the same as the BaseDataFileName for that block.

VehicleID

– This is a unique numerical identification number for the vehicle/entity. This number is used, along with the BaseDataFileName to build the file name. Note: When using the Playback Configuration File Block, this number must be in the range of [1, NumberVehicles].

NumberInputs

– This parameter determines the number of inputs to this block. Note: if it is desired to use a subset of the inputs listed , starting with the time, then the configuration file will not have to be altered, i.e. if the simulation outputs are time, X position, Y position and Z position, then use 4 inputs.

Examples:

The Playback Write Data block is used in the example:

"

MATLABToolbox\Examples\PlaybackExample\PlaybackExample.mdl".